/* 👨‍🍳 私厨模块样式（配色全部走主题变量，跟随主体/主题切换） */

/* ---------- 顶部 ---------- */
.dish-head { padding: 16px 20px; }
.dish-head-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.dish-head-top h2 { margin-bottom: 6px; }
.dish-tabs { display: flex; gap: 8px; margin-top: 14px; }
.dish-tab {
  flex: 0 0 auto; padding: 8px 16px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--border); background: var(--card); color: var(--text);
  font-size: 14px; transition: all .2s;
}
.dish-tab b { font-weight: 600; color: var(--muted); margin-left: 4px; }
.dish-tab.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.dish-tab.on b { color: #fff; }
.dish-tab .dish-dot {
  display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px;
  background: #fff; color: var(--primary); border-radius: 9px; font-size: 12px;
}

/* ---------- 分类筛选 + 搜索 ---------- */
.dish-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.dish-chip {
  padding: 6px 12px; border-radius: 999px; cursor: pointer; font-size: 13px;
  border: 1px solid var(--border); background: transparent; color: var(--text); transition: all .2s;
}
.dish-chip b { font-weight: 500; color: var(--muted); margin-left: 3px; }
.dish-chip.on { background: var(--accent); border-color: var(--primary); color: var(--secondary); }
body[data-theme="galaxy"] .dish-chip.on { color: var(--text); }
.dish-search { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.dish-search input {
  flex: 1 1 auto; padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--card); color: var(--text); font-size: 14px; outline: none;
}
.dish-search input:focus { border-color: var(--primary); }

/* ---------- 菜谱卡片 ---------- */
.dish-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(238px, 1fr)); gap: 14px; }
.dish-card {
  border: 1px solid var(--border); border-radius: 14px; overflow: hidden;
  background: var(--card); display: flex; flex-direction: column; transition: box-shadow .2s;
}
.dish-card:hover { box-shadow: var(--shadow); }
.dish-cover {
  position: relative; height: 148px; background: linear-gradient(135deg, var(--accent), var(--border));
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.dish-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dish-cover-ph { font-size: 42px; opacity: .75; }
.dish-cat-badge {
  position: absolute; left: 8px; top: 8px; padding: 2px 8px; border-radius: 999px;
  background: rgba(0, 0, 0, .45); color: #fff; font-size: 12px; backdrop-filter: blur(2px);
}
.dish-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1 1 auto; }
.dish-name { font-size: 15px; font-weight: 600; }
.dish-intro { font-size: 13px; color: var(--muted); line-height: 1.5; }
.dish-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.dish-tag { font-size: 12px; color: var(--secondary); background: var(--accent); padding: 1px 7px; border-radius: 999px; }
.dish-meta { font-size: 12px; color: var(--muted); }
.dish-ops { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 8px; }
.dish-ops .btn.small { padding: 6px 10px; font-size: 13px; }
.dish-recipe {
  margin-top: 6px; padding: 10px 12px; border-radius: 10px; background: var(--bg);
  border: 1px dashed var(--border); font-size: 13px; line-height: 1.75; color: var(--text);
}
.dish-empty {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 34px 12px; color: var(--muted); font-size: 13px; text-align: center;
}
.dish-empty > :first-child { font-size: 34px; opacity: .8; }

/* ---------- 订单列表 ---------- */
.dish-order-list { display: flex; flex-direction: column; gap: 10px; }
.dish-order {
  display: flex; gap: 12px; padding: 12px; border: 1px solid var(--border);
  border-radius: 12px; background: var(--card);
}
.dish-order.st-pending { border-left: 4px solid var(--primary); }
.dish-order.st-cooking { border-left: 4px solid #f0a53e; }
.dish-order.st-served { border-left: 4px solid #4caf7d; opacity: .92; }
.dish-order.st-canceled { border-left: 4px solid var(--border); opacity: .62; }
.do-cover {
  flex: 0 0 66px; width: 66px; height: 66px; border-radius: 10px; overflow: hidden;
  background: linear-gradient(135deg, var(--accent), var(--border));
  display: flex; align-items: center; justify-content: center;
}
.do-cover img { width: 100%; height: 100%; object-fit: cover; }
.do-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.do-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.do-name { font-size: 15px; font-weight: 600; }
.do-portion { font-size: 13px; color: var(--secondary); }
.do-status {
  margin-left: auto; font-size: 12px; padding: 2px 9px; border-radius: 999px;
  background: var(--accent); color: var(--secondary);
}
body[data-theme="galaxy"] .do-status { color: var(--text); }
.dish-order.st-served .do-status { background: rgba(76, 175, 125, .16); color: #3c8f66; }
.dish-order.st-canceled .do-status { background: transparent; color: var(--muted); border: 1px solid var(--border); }
.do-who { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.do-orderer { color: var(--text); font-weight: 500; }
.do-orderer i {
  font-style: normal; font-size: 11px; margin-left: 4px; padding: 0 5px; border-radius: 6px;
  background: var(--primary); color: #fff;
}
.do-time { color: var(--muted); font-size: 12px; }
.do-detail { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12px; color: var(--muted); }
.do-note { font-size: 12px; color: var(--secondary); }
.do-ops { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.do-ops .btn.small { padding: 6px 12px; font-size: 13px; }

/* ---------- 弹层 / 表单 ---------- */
.dish-mask {
  position: fixed; inset: 0; z-index: 300; background: rgba(0, 0, 0, .42);
  display: flex; align-items: flex-end; justify-content: center; padding: 0;
}
.dish-modal {
  width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto;
  background: var(--card); color: var(--text); border-radius: 16px 16px 0 0;
  padding: 16px 18px 20px; box-shadow: 0 -6px 30px rgba(0, 0, 0, .22);
  animation: dishUp .22s ease;
}
@keyframes dishUp { from { transform: translateY(18px); opacity: .4; } to { transform: translateY(0); opacity: 1; } }
@media (min-width: 620px) {
  .dish-mask { align-items: center; padding: 20px; }
  .dish-modal { border-radius: 16px; }
}
.dish-modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.dish-modal-head h3 { font-size: 16px; }
.dish-modal-close {
  border: none; background: transparent; font-size: 22px; line-height: 1;
  color: var(--muted); cursor: pointer;
}
.dish-form { display: flex; flex-direction: column; gap: 12px; }
.df-row { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.df-row > span i { font-style: normal; color: #e74c3c; }
.df-row input, .df-row select, .df-row textarea {
  padding: 9px 11px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--bg); color: var(--text); font-size: 14px; font-family: inherit;
  outline: none; width: 100%;
}
.df-row input:focus, .df-row select:focus, .df-row textarea:focus { border-color: var(--primary); }
.df-row textarea { resize: vertical; line-height: 1.6; }
.df-cover { display: flex; gap: 12px; align-items: flex-start; }
.df-cover-box {
  flex: 0 0 108px; width: 108px; height: 108px; border-radius: 12px; overflow: hidden;
  border: 1px dashed var(--border); background: linear-gradient(135deg, var(--accent), var(--border));
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  font-size: 12px; color: var(--secondary); text-align: center;
}
.df-cover-box img { width: 100%; height: 100%; object-fit: cover; }
.df-cover-tip { font-size: 12px; line-height: 1.6; }
.df-portion { display: flex; align-items: center; gap: 12px; }
.df-portion b { font-size: 16px; min-width: 22px; text-align: center; }
.df-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }
.do-pick { display: flex; gap: 12px; align-items: center; padding-bottom: 6px; border-bottom: 1px dashed var(--border); }
.do-pick-img {
  flex: 0 0 60px; width: 60px; height: 60px; border-radius: 10px; overflow: hidden;
  background: linear-gradient(135deg, var(--accent), var(--border));
  display: flex; align-items: center; justify-content: center;
}
.do-pick-img img { width: 100%; height: 100%; object-fit: cover; }
.do-pick-name { font-size: 15px; font-weight: 600; margin-bottom: 3px; }

/* 小屏收窄 */
@media (max-width: 640px) {
  .dish-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .dish-cover { height: 116px; }
  .dish-order { flex-direction: row; }
  .do-cover { flex: 0 0 54px; width: 54px; height: 54px; }
}
