/* ===== 移动端导航栏样式（与combo页面一致）===== */
.home_container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-bottom: 120px;
    background: #f5f5f5;
}

/* 导航栏整体容器 - 无需特殊样式 */

/* 日期显示 */
.home_date-display {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 8px 15px;
    margin-bottom: 2px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#home_current-date {
    font-size: 20px;
    font-weight: bold;
    color: #4a5568;
    text-align: center;
}

/* 母菜单容器 */
.home_parent-menu-container {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 5px;
    margin-bottom: 2px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.home_parent-menu-scroll-container {
    flex: 1;
    overflow: hidden;
    margin: 0 0;
}

.home_parent-menu-scroll {
    display: flex;
    transition: transform 0.3s ease;
}

.home_parent-menu {
    display: flex;
    gap: 10px;
}

.home_parent-menu-item {
    padding: 6px 24px;
    background: #f7fafc;
    border: 1px solid #28a745;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: normal;
    color: #4a5568;
    white-space: nowrap;
}

.home_parent-menu-item:hover {
    background: #edf2f7;
    border-color: #218838;
}

.home_parent-menu-item.active {
    background: #8dd19d;
    color: #000000;
    border-color: #8dd19d;
    box-shadow: 0 4px 15px rgba(141, 209, 157, 0.3);
    font-weight: bold;
}

/* 子菜单容器 */
.home_child-menu-container {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 5px;
    margin-bottom: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.home_child-menu-scroll-container {
    flex: 1;
    overflow: hidden;
    margin: 0 0;
}

.home_child-menu-scroll {
    display: flex;
    transition: transform 0.3s ease;
}

.home_child-menu {
    display: flex;
    flex-shrink: 0;
    width: 100%;
    justify-content: flex-start;
    align-items: center;
    gap: 4px;
    padding: 1px;
}

.home_child-menu.home_hidden {
    display: none;
}

.home_child-menu-item {
    flex-shrink: 0;
    padding: 6px 16px;
    background-color: #f0f0f0;
    border: 1px solid #ffd700;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    white-space: nowrap;
    min-width: 80px;
    text-align: center;
    z-index: 10;
    position: relative;
}

.home_child-menu-item:hover {
    background-color: #e0e0e0;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.home_child-menu-item.active {
    background-color: #abf6bd;
    color: #000000;
    border-color: #abf6bd;
    box-shadow: 0 4px 15px rgba(171, 246, 189, 0.3);
    font-weight: bold;
}

/* 菜单箭头按钮 */
.home_parent-menu-arrow,
.home_child-menu-arrow {
    background: #28a745;
    color: white;
    border: none;
    border-radius: 0;
    width: 24px;
    height: 36px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.home_parent-menu-arrow-left,
.home_child-menu-arrow-left {
    border-radius: 8px 0 0 8px;
}

.home_parent-menu-arrow-right,
.home_child-menu-arrow-right {
    border-radius: 0 8px 8px 0;
}

.home_parent-menu-arrow:hover,
.home_child-menu-arrow:hover {
    background: #218838;
}

/* 主要内容区域 */
.main-content {
    flex: 1;
    padding: 0;
    background: #f5f5f5;
}

/* 顶部操作栏 */
.top-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 16px;
    padding: 0 4px;
}

/* ===== 原有样式修改 ===== */

/* 全选按钮样式（保存按钮左侧） */
.select-all-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 6px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: bold;
    transition: all 0.3s ease;
    margin-right: 10px; /* 与保存按钮保持间距 */
}

.select-all-btn:hover {
    background-color: #0069d9;
    transform: translateY(-2px);
}

/* 全选激活状态 */
.select-all-btn.active {
    background-color: #dc3545; /* 红色表示取消全选状态 */
}

/* 食材卡片中的套餐信息样式 */
.menu-info {
    margin: 5px 0;
    color: #444;
    font-size: 14px;
}

/* 任一套餐（menuid=0）的红字加粗样式 */
.menu-info .any-combo {
    color: #dc3545; /* 红色 */
    font-weight: bold; /* 加粗 */
}

/* 普通套餐的ID样式 */
.menu-info .menu-id {
    color: #666;
    font-size: 0.9em;
}

/* 右侧套餐卡片选中样式强化 */
.combo-config-card.selected {
    border: 2px solid #007bff;
    padding: 3px;
    background-color: #f0f7ff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25); /* 选中光晕效果 */
}

/* 右侧全选按钮容器样式 */
.select-all-container {
    padding: 10px 20px;
    text-align: right; /* 靠右显示 */
}

/* 其他原有样式保持不变... */
body {
    margin: 0;
    padding: 0;
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    color: #333;
}

/* 移动端主容器 */
#ingredient-list-container {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-bottom: 20px;
    border: 1px solid #f1f3f4;
}
.pagination {
    background: white;
    padding: 12px 16px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 16px;
}
.pagination .page-nav-button {
    width: 35px; /* 从 40px 减少到 35px */
    height: 35px; /* 从 40px 减少到 35px */
    border: 1px solid #ddd;
    background-color: #fff;
    border-radius: 4px; /* 从 5px 减少到 4px */
    cursor: pointer;
    font-size: 16px; /* 从 18px 减少到 16px */
    font-weight: bold;
    color: #555;
    transition: background-color 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    line-height: 1;
}
.pagination .page-nav-button:hover:not(:disabled) {
    background-color: #f0f0f0;
}
.pagination .page-nav-button:disabled {
    background-color: #f5f5f5;
    color: #ccc;
    cursor: not-allowed;
}
.pagination .page-info {
    font-size: 14px; /* 从 16px 减少到 14px */
    font-weight: bold;
    color: #333;
    min-width: 100px; /* 从 120px 减少到 100px */
    text-align: center;
}
.loading-text, .error-text {
    text-align: center;
    color: #888;
    padding: 20px;
}
.ingredient-card {
    display: flex;
    flex-direction: column;
    padding: 16px;
    margin-bottom: 12px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #e8e9ea;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.ingredient-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    border-color: #d1ecf1;
}

.ingredient-card.selected {
    border-color: #007bff;
    background-color: #f8f9ff;
    box-shadow: 0 4px 20px rgba(0, 123, 255, 0.15);
    transform: translateY(-1px);
}

.info .name-category {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 5px;
}
.info .name-category span {
    font-weight: normal;
    font-size: 14px;
    color: #666;
    margin-left: 10px;
}
.info p {
    margin: 5px 0;
    color: #444;
}
.adjust-button {
    background: linear-gradient(135deg, #ffc107 0%, #ffca2c 100%);
    color: #212529;
    border: none;
    padding: 6px 12px;
    border-radius: 16px;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(255, 193, 7, 0.3);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.adjust-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}

.adjust-button:hover::before {
    left: 100%;
}

.adjust-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(255, 193, 7, 0.4);
    background: linear-gradient(135deg, #e0a800 0%, #f0b90b 100%);
}
.actions .remove-button {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-left: 10px;
}
.actions .remove-button:hover {
    background-color: #c82333;
}
.pagination .add-button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 6px 12px; /* 从 8px 16px 减少到 6px 12px */
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-left: 10px; /* 从 15px 减少到 10px */
    font-size: 13px; /* 添加字体大小 */
}
/* 移除桌面端的左右分栏布局 */
/* .content-wrapper, .left-content, .right-content 样式已移除 */
.op-container {
    width: 100%;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.header-actions {
    display: flex;
    align-items: center;
}
.nav-btn {
    text-decoration: none;
    background-color: #5bc0de;
    color: white;
    padding: 6px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    margin-right: 10px;
}
.nav-btn:hover {
    background-color: #46b8da;
    transform: translateY(-2px);
}
.save-btn {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 6px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
}
.save-btn:hover {
    background-color: #218838;
    transform: translateY(-2px);
}
.op-main-content {
    display: flex;
    gap: 10px; /* 从 15px 减少到 10px */
    padding: 5px 15px 15px; /* 减少顶部内边距从 10px 到 5px */
    overflow: hidden;
    align-items: flex-start;
    min-height: calc(100vh - 70px); /* 从 80px 减少到 70px */
    flex-grow: 1;
}
.config-panel {
    flex-grow: 1;
    max-width: 100%;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    padding: 10px; /* 从 15px 减少到 10px */
    display: flex;
    flex-direction: column;
    min-height: 610px;
}
.card-group-display {
    flex-grow: 1;
    height: auto;
    overflow-y: auto;
}
.combo-grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.combo-config-card {
    background-color: #fcfcfc;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
    cursor: pointer;
}
.combo-config-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}
.combo-image {
    width: 100%;
    max-height: 180px;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
    margin-bottom: 6px;
}
.combo-info {
    text-align: center;
    padding: 0 8px;
    margin-bottom: 6px;
}
.combo-info h3 {
    margin: 0 0 3px;
    font-size: 1.0em;
    font-weight: 600;
}
.combo-info .description {
    font-size: 0.75em;
    color: #7f8c8d;
    margin-bottom: 5px;
    max-height: 3.0em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3; /* 标准属性 */
    -webkit-box-orient: vertical;
}
.combo-info .price {
    font-size: 1.0em;
    font-weight: bold;
    color: #e67e22;
}

/* 出入库记录表格样式 */
.record-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 13px; /* 整体字体稍小 */
}

.record-table th, .record-table td {
    border: 1px solid #dee2e6;
    padding: 6px; /* 减少内边距让表格更紧凑 */
    text-align: left;
    vertical-align: middle;
}

.record-table th {
    background-color: #f8f9fa;
    font-weight: bold;
    font-size: 12px;
    color: #495057;
    padding: 8px 6px; /* 减少水平内边距 */
    text-align: left;
    border: 1px solid #dee2e6;
}

.record-table tr:nth-child(even) {
    background-color: #f9f9f9;
}
.record-table tr:hover {
    background-color: #f1f1f1;
}

/* 操作类型徽章样式 */
.action-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: bold;
    text-align: center;
}

.action-badge.入库 {
    background-color: #d4edda;
    color: #155724;
}

.action-badge.出库 {
    background-color: #f8d7da;
    color: #721c24;
}

.action-badge.盘点 {
    background-color: #fff3cd;
    color: #856404;
}

/* 变化量颜色 */
.positive-change {
    color: #28a745;
    font-weight: bold;
}

.negative-change {
    color: #dc3545;
    font-weight: bold;
}

/* 记录容器样式 */
.records-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 15px;
    margin-top: 10px;
}

.records-container h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

/* 记录列表样式 - 卡片风格 */
.records-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 15px;
    max-height: 500px;
    overflow-y: auto;
}

.record-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: box-shadow 0.2s ease;
}

.record-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.record-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.record-card-header .record-date {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.record-card-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.record-quantity {
    display: flex;
    align-items: center;
}

.record-operator {
    font-size: 12px;
    color: #666;
}

.record-note {
    font-size: 12px;
    color: #666;
    background: #f8f9fa;
    padding: 8px;
    border-radius: 4px;
    border-left: 3px solid #007bff;
    margin-top: 8px;
}

.no-records-placeholder {
    text-align: center;
    color: #888;
    padding: 40px 20px;
    font-size: 14px;
}

/* 保留原有的操作徽章样式 */
.action-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    white-space: nowrap;
}

.action-badge.入库 {
    background-color: #d4edda;
    color: #155724;
}

.action-badge.出库 {
    background-color: #f8d7da;
    color: #721c24;
}

.action-badge.盘点 {
    background-color: #fff3cd;
    color: #856404;
}

.no-records {
    text-align: center;
    color: #999;
    padding: 40px 20px;
}

/* 模态框基础样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal.show {
    display: block;
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 20px;
    border-radius: 12px;
    width: 600px; /* 为卡片布局增加宽度 */
    max-width: 95%; /* 在小屏幕上保持响应式 */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    position: relative;
}

/* 表单样式 */
form {
    padding: 20px 25px 25px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.form-group input[readonly] {
    background-color: #f8f9fa;
    color: #6c757d;
}

/* 修正三列布局：分类、单位、当前库存 */
.form-group-row {
    margin-bottom: 16px;
}

.label-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px; /* 减少间距 */
    margin-bottom: 6px;
}

.label-row label {
    margin: 0;
    font-weight: 500;
    color: #333;
    font-size: 14px;
    text-align: left; /* 确保左对齐 */
}

.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px; /* 与label-row保持一致 */
}

.input-row input {
    width: 100%; /* 确保填满网格单元 */
    padding: 8px 10px; /* 减少内边距 */
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box; /* 重要：包含边框在内的总宽度 */
    transition: border-color 0.2s;
}

.input-row input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.input-row input[readonly] {
    background-color: #f8f9fa;
    color: #6c757d;
}

/* 操作标签样式 */
.operation-tabs {
    display: flex;
    margin-bottom: 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.operation-tab {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background-color: #f8f9fa;
    color: #6c757d;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border-right: 1px solid #ddd;
}

.operation-tab:last-child {
    border-right: none;
}

.operation-tab:hover {
    background-color: #e9ecef;
    color: #495057;
}

.operation-tab.active {
    font-weight: bold;
}

.operation-tab[data-operation="出库"].active {
    background-color: #dc3545;
    color: white;
}

.operation-tab[data-operation="入库"].active {
    background-color: #28a745;
    color: white;
}

.operation-tab[data-operation="盘点"].active {
    background-color: #ffc107;
    color: #212529;
}

/* 按钮样式 */
.modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.confirm-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.confirm-btn:hover {
    background-color: #0056b3;
}

.cancel-btn {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.cancel-btn:hover {
    background-color: #545b62;
}

/* 隐藏当前库存列（新增模式） */
.current-quantity-label.hidden,
.input-row input#currentQuantity.hidden {
    display: none;
}

/* 当新增模式时，调整为两列布局 */
.form-group-row.new-mode .label-row,
.form-group-row.new-mode .input-row {
    grid-template-columns: 1fr 1fr;
}

/* 模态框内容区域确保有足够宽度 */
.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 0;
    border-radius: 8px;
    width: 520px; /* 增加宽度 */
    max-width: 95%; /* 在小屏幕上保持响应式 */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    position: relative;
}

/* 表单容器内边距调整 */
#adjustForm {
    padding: 20px 25px 25px; /* 增加左右内边距 */
}

/* 响应式设计优化 */
@media (max-width: 600px) {
    .modal-content {
        width: 95%;
        margin: 5% auto;
    }
    
    .label-row,
    .input-row {
        grid-template-columns: 1fr; /* 移动端单列布局 */
        gap: 8px;
    }
    
    .label-row label {
        margin-bottom: 4px;
    }
    
    #adjustForm {
        padding: 15px 20px 20px;
    }
}

@media (max-width: 480px) {
    .modal-content {
        width: 98%;
        margin: 3% auto;
    }
    
    .input-row input {
        padding: 10px 8px;
        font-size: 16px; /* 防止iOS缩放 */
    }
}

/* 在现有样式后添加天数标签样式 */

/* 卡片头部：名字、分类、天数、库存在同一行 */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.left-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.name-and-category {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.badges-row {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: space-between;
    width: 100%;
}

.quantity-info {
    display: flex;
    align-items: center;
    gap: 2px;
}

.right-info {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 食材名称样式 */
.ingredient-name {
    font-weight: 600;
    font-size: 18px;
    color: #2c3e50;
    line-height: 1.3;
    margin: 0;
}

/* 分类标签样式 */
.ingredient-category {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

/* 天数标签样式 */
.tracking-days-badge {
    background-color: #28a745;
    color: white;
    padding: 4px 8px;
    border-radius: 14px;
    font-size: 11px;
    font-weight: 700;
    min-width: 40px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
    position: relative;
}

.tracking-days-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 100%);
    border-radius: 14px;
}

/* 根据天数不同显示不同颜色 */
.tracking-days-badge.warning {
    background-color: #ffc107;
    color: #212529;
    box-shadow: 0 2px 4px rgba(255, 193, 7, 0.4);
}

.tracking-days-badge.danger {
    background-color: #dc3545;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.4);
}

.tracking-days-badge.info {
    background-color: #17a2b8;
    box-shadow: 0 2px 4px rgba(23, 162, 184, 0.4);
}

/* 库存数量样式 */
.ingredient-quantity {
    font-weight: 700;
    font-size: 16px;
    color: #28a745;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid #b8dabc;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.1);
    min-width: 60px;
    text-align: center;
}

.quantity-label {
    font-size: 14px;
    color: #6c757d;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.card-description {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f1f3f4;
    width: 100%;
}

.card-description p {
    margin: 0;
    font-size: 13px;
    color: #6c757d;
    line-height: 1.4;
    font-style: italic;
    text-align: left;
}

/* 响应式设计：小屏幕下调整布局 */
@media (max-width: 768px) {
    .ingredient-card {
        padding: 14px;
        margin-bottom: 10px;
    }
    
    .card-header {
        margin-bottom: 10px;
    }
    
    .ingredient-name {
        font-size: 16px;
    }
    
    .ingredient-category {
        font-size: 10px;
        padding: 3px 8px;
    }
    
    .tracking-days-badge {
        font-size: 10px;
        padding: 3px 6px;
        min-width: 35px;
    }
    
    .ingredient-quantity {
        font-size: 14px;
        padding: 5px 10px;
    }
    
    .adjust-button {
        padding: 5px 10px;
        font-size: 11px;
    }
    
    .badges-row {
        gap: 8px;
    }
}