/* ============================================================
   响应式菜单页面模板 · 组件样式（menu_template.php）
   ------------------------------------------------------------
   组件结构：
     .menu-week-table        周历矩阵表容器（≥768 显示；手机由 r-hide-sm 隐藏）
       .menu-matrix            矩阵 <table>
         thead .col-day         列头（周几 + 日期 + 今日高亮）
         .meal-sep              餐次分隔行（早/午分组，无切换）
           .mwc-meal-ic/.label/.count   餐次图标/标签/计数
         .col-cat               品类列（sticky 左列）
         .menu-cell             单元格（is-today/is-empty）
           .mwc-dish             单菜（点 + 名称 + 操作）
     .menu-today            当天卡片容器（<768 显示；≥768 隐藏）
       .mwc-day-mobile          当日卡（日头 + 餐次区 + 品类分组）
     .week-nav              周导航（上周/本周/下周，桌面可见）
   设计令牌复用全局变量（--primary/--card/--border/--radius/--shadow-*）
   ============================================================ */

/* ---------- 品类徽章与色点（模板自包含）---------- */
.cat-badge{
  display:inline-flex;align-items:center;font-size:12px;font-weight:600;
  padding:1px 8px;border-radius:4px;background:rgba(0,0,0,.06);color:rgba(0,0,0,.65);
}
.dish-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:#c8ccd0;flex-shrink:0}
.dish-dot.cat-主{background:#1a56db}
.dish-dot.cat-热{background:#c81e1e}
.dish-dot.cat-汤{background:#a04a16}
.dish-dot.cat-应{background:var(--primary,#1aa179)}
.cat-badge.cat-主{background:#e6effe;color:#1a56db}
.cat-badge.cat-热{background:#fdeaea;color:#c81e1e}
.cat-badge.cat-汤{background:#fbf0e6;color:#a04a16}
.cat-badge.cat-应{background:var(--primary-l,#e7f6f0);color:var(--primary,#1aa179)}

/* ---------- 日卡片 ---------- */
.mwc-day{
  background:var(--card,#fff);border:1px solid var(--border,#d9d9d9);
  border-radius:var(--radius-lg,8px);padding:0;overflow:hidden;
  box-shadow:var(--shadow-sm,0 1px 2px rgba(0,0,0,.04));
  display:flex;flex-direction:column;
}
.mwc-day.is-today{border-color:var(--primary,#1aa179);box-shadow:0 0 0 1px var(--primary,#1aa179),var(--shadow-sm,0 1px 2px rgba(0,0,0,.04))}
.mwc-day.is-empty{opacity:.7}

.mwc-day-head{
  display:flex;align-items:center;gap:8px;flex-wrap:wrap;
  padding:12px 14px;border-bottom:1px solid var(--border,#f0f0f0);
  background:rgba(0,0,0,.02);
}
.mwc-wd{font-size:14px;font-weight:600;color:var(--text,rgba(0,0,0,.88))}
.mwc-date{font-size:12px;color:var(--muted,rgba(0,0,0,.45))}
.mwc-today-tag{
  font-size:11px;font-weight:600;color:#fff;background:var(--primary,#1aa179);
  padding:1px 8px;border-radius:10px;line-height:1.6;
}
.mwc-count{margin-left:auto;font-size:12px;color:var(--muted,rgba(0,0,0,.45));font-weight:400}
.mwc-day-empty{padding:18px 14px;text-align:center;color:var(--muted,rgba(0,0,0,.45));display:flex;flex-direction:column;align-items:center;gap:4px}

/* ---------- 餐次区 ---------- */
.mwc-meal{padding:10px 14px;border-bottom:1px solid var(--border,#f0f0f0)}
.mwc-meal:last-child{border-bottom:none}
.mwc-meal-head{display:flex;align-items:center;gap:6px;margin-bottom:8px}
.mwc-meal-ic{
  display:inline-flex;align-items:center;justify-content:center;
  width:22px;height:22px;border-radius:6px;flex-shrink:0;
}
.mwc-meal-breakfast .mwc-meal-ic{background:var(--primary-l,#e7f6f0);color:var(--primary,#1aa179)}
.mwc-meal-lunch .mwc-meal-ic{background:var(--warn-l,#fffbe6);color:var(--warn,#faad14)}
.mwc-meal-label{font-size:13px;font-weight:600;color:var(--text,rgba(0,0,0,.88))}

/* ---------- 品类分组 ---------- */
.mwc-cat{padding:6px 0}
.mwc-cat + .mwc-cat{border-top:1px dashed var(--border,#f0f0f0)}
.mwc-cat-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:4px}
.mwc-cat-count{font-size:11px;color:var(--muted,rgba(0,0,0,.45))}

/* ---------- 菜品列表 ---------- */
.mwc-dishes{list-style:none;margin:0;padding:0}
.mwc-dish{
  display:flex;align-items:center;gap:8px;padding:5px 0;
  font-size:13px;line-height:1.5;color:var(--text,rgba(0,0,0,.88));
}
.mwc-dish-name{flex:1;min-width:0;word-break:break-word}
.mwc-dish-ops{display:flex;align-items:center;gap:2px;flex-shrink:0}
.mwc-dish-ops .link{font-size:12px;padding:0 6px;min-height:auto;min-width:auto;display:inline-flex}

/* ---------- 周历矩阵表（桌面 ≥768 显示；手机由 r-hide-sm 隐藏）----------
   视觉风格参考：食堂周菜单日历表 — 餐次列整块染色（早餐绿/午餐黄），
   餐次列 rowspan 合并，餐次标签垂直居中；品类独立列（浅色底）；
   菜品纯文本左对齐，无圆点装饰；编辑/删除 hover 才显，不破坏纯文本布局。
   关键布局：border-collapse: separate + border-spacing: 0（支持 sticky+rowspan）
--------------------------------------------------------------------- */
.menu-matrix{
  --meal-col-w:  88px;   /* 餐次列宽 */
  --cat-col-w:   88px;   /* 品类列宽 */
  --day-col-w:  156px;   /* 日列宽 */
}
.menu-week-table{
  width:100%;overflow-x:auto;margin-bottom:16px;
  -webkit-overflow-scrolling:touch;
  border-radius:6px;
  background:#fff;
}
.menu-matrix{
  min-width:calc(var(--meal-col-w) + var(--cat-col-w) + 5 * var(--day-col-w));
  border-collapse:separate;   /* 关键：separate 支持 sticky 与 rowspan 共存 */
  border-spacing:0;
  font-size:14px;width:100%;
  table-layout:fixed;
}
/* 单元格边框：仅设右侧和底部，实现单线表格效果 */
.menu-matrix th,.menu-matrix td{
  box-sizing:border-box;
  border-right:1px solid #a8c9b4;
  border-bottom:1px solid #a8c9b4;
  padding:8px 10px;
  text-align:left;vertical-align:middle;
  line-height:1.55;
  background:#fff;   /* 默认白色背景，被 sticky 行的背景覆盖 */
}
/* 最后一列去掉右边框 */
.menu-matrix th:last-child,
.menu-matrix td:last-child{border-right:none}
/* 表头去掉底部边框由自己的 border-bottom 决定 */
.menu-matrix thead th{
  font-size:14px;font-weight:700;color:#2c3e35;
  background:#eaf2ee;
  border-bottom:2px solid #74a287;
  border-top:1px solid #8cb59a;
  text-align:center;
  white-space:nowrap;
  position:sticky;top:0;z-index:3;
}
.menu-matrix thead tr th:first-child{border-left:1px solid #8cb59a}

/* 餐次列（早/午，rowspan 合并）：整列背景色 + sticky */
.menu-matrix .col-meal{
  width:var(--meal-col-w);min-width:var(--meal-col-w);max-width:var(--meal-col-w);
  vertical-align:middle;text-align:center;
  position:sticky;left:0;z-index:2;
  border-right:2px solid #8cb59a;
  font-weight:700;font-size:16px;color:#2c3e35;
  background:#c8e6c9;   /* 默认早餐绿 */
}
/* 午餐列背景色覆盖 */
.menu-matrix tr.mwc-meal-lunch td.col-meal{background:#ffe8a3}

.menu-matrix .mwc-meal-cell{
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:6px;width:100%;box-sizing:border-box;
}
/* 品类列：浅灰/浅米底色，sticky 跟随餐次列 */
.menu-matrix .col-cat{
  width:var(--cat-col-w);min-width:var(--cat-col-w);max-width:var(--cat-col-w);
  background:#f2f2ec;
  font-weight:700;font-size:14px;color:#2c3e35;text-align:center;
  position:sticky;left:var(--meal-col-w);z-index:1;
  border-right:1px solid #a8c9b4;
  white-space:normal;word-break:break-word;
  line-height:1.4;
}
.menu-matrix .col-cat .cat-badge{display:none}   /* 纯品类文字，不用 badge */
/* 日列：内容居中 */
.menu-matrix .col-day{
  width:var(--day-col-w);min-width:var(--day-col-w);
  text-align:center;
}
/* 今日列 */
.menu-matrix thead .col-day.is-today{background:#eaf2ee;color:#237a51;font-weight:700}
.menu-matrix .col-day.is-today{background:#f1faf4}
.menu-matrix .col-day.is-today .day-label{color:#237a51}
.menu-matrix .col-day.is-today .day-date{color:#237a51}
.menu-matrix .menu-cell.is-today{background:#f4fbf6}
.menu-matrix .day-label{font-size:15px;font-weight:700;color:#2c3e35;display:block;line-height:1.2}
.menu-matrix .day-date{font-size:12px;color:#5d7a6c;margin-top:3px;display:block;line-height:1.2}

/* 餐次图标/标签 */
.menu-matrix .mwc-meal-ic{display:none}   /* 纯文字 */
.menu-matrix .mwc-meal-label{font-size:16px;font-weight:700;color:#2c3e35;letter-spacing:1px}
.menu-matrix .mwc-meal-count{font-size:11px;color:#5d7a6c;font-weight:400;margin-top:2px}

/* 餐次分块：午餐块首行加粗顶边 */
.menu-matrix tr.mwc-meal-lunch:first-child td{border-top:2px solid #8cb59a}

/* 菜品单元格：纯文本左对齐 */
.menu-matrix .menu-cell{vertical-align:middle;text-align:left;padding:6px 10px;background:#fff}
.menu-matrix .menu-cell.is-empty{background:#fafaf7;text-align:center;color:#a7b0aa}
.menu-matrix .cell-empty{display:inline-block;color:#a7b0aa}

/* 单菜行：纯文本，每行一个菜 */
.menu-matrix .mwc-dish{
  display:flex;align-items:flex-start;gap:6px;
  padding:3px 0;
  font-size:14px;line-height:1.6;color:#2c3e35;
  border-bottom:1px dashed #e3ece6;
}
.menu-matrix .mwc-dish:last-child{border-bottom:none;margin-bottom:0}
.menu-matrix .mwc-dish .dish-dot{display:none}
.menu-matrix .mwc-dish-name{flex:1 1 auto;min-width:0;word-break:break-word}

/* 管理员操作：紧凑内联，hover 才显 */
.menu-matrix .mwc-dish-ops{
  flex:0 0 auto;display:inline-flex;align-items:center;gap:2px;
  opacity:0;transform:translateX(4px);
  transition:opacity .18s, transform .18s;
  white-space:nowrap;font-size:11px;line-height:1;
}
.menu-matrix .mwc-dish:hover .mwc-dish-ops,
.menu-matrix .menu-cell:hover .mwc-dish-ops{opacity:1;transform:translateX(0)}
.menu-matrix .mwc-dish-ops .link{
  display:inline-flex;align-items:center;justify-content:center;
  padding:3px 6px;border-radius:4px;
  color:#7a9a86;background:transparent;
  font-size:11px;font-weight:500;line-height:1;
  transition:color .15s, background .15s;
  text-decoration:none;cursor:pointer;
}
.menu-matrix .mwc-dish-ops .link:hover{color:#237a51;background:#eaf2ee}
.menu-matrix .mwc-dish-ops .link.danger{color:#c76360}
.menu-matrix .mwc-dish-ops .link.danger:hover{color:#fff;background:#c76360}
/* 表单紧凑内联，避免换行 */
.menu-matrix .mwc-dish-ops form.inline{display:inline-flex;align-items:center;gap:0}
.menu-matrix .mwc-dish-ops form.inline input[type=hidden]{display:none}
.menu-matrix .mwc-dish-ops form.inline button.link{
  font:inherit;border:none;cursor:pointer;background:transparent;
  padding:3px 6px;border-radius:4px;color:#7a9a86;font-size:11px;font-weight:500;line-height:1;
  transition:color .15s, background .15s;margin:0;
}
.menu-matrix .mwc-dish-ops form.inline button.link.danger{color:#c76360}
.menu-matrix .mwc-dish-ops form.inline button.link:hover{color:#fff;background:#c76360}
.menu-matrix .mwc-dish-ops form.inline button.link.danger:hover{color:#fff;background:#c76360}
.menu-matrix .menu-cell:hover .mwc-dish-name{color:#237a51}

/* 最后一行去掉底部边框 */
.menu-matrix tbody tr:last-child td{border-bottom:none}

/* ---------- 周导航 ---------- */
.week-nav{display:flex;align-items:center;gap:8px;margin-bottom:14px;flex-wrap:wrap}
.week-nav-bar{margin-bottom:14px;flex-wrap:wrap}
.week-nav-bar .nav-divider{
  display:inline-block;width:1px;height:22px;
  background:#d0dcd4;margin:0 4px;
}
@media (max-width:767px){
  .week-nav-bar .nav-divider{display:none}
}

/* ---------- 当日卡容器（手机 <768 显示；桌面由下方媒体查询隐藏）---------- */
.menu-today{display:block}
.menu-today .admin-nav{margin-top:12px}

/* ============================================================
   平板及以上（≥768px）：隐藏当日卡（周历矩阵表由 r-hide-sm 控制）
   ============================================================ */
@media (min-width:768px){
  .menu-today{display:none}
}

/* ============================================================
   桌面端（≥1024px）：增大变量与留白
   ============================================================ */
@media (min-width:1024px){
  .menu-matrix{
    --meal-col-w: 100px;
    --cat-col-w:  100px;
    --day-col-w:  176px;
  }
  .menu-matrix th,.menu-matrix td{padding:10px 12px}
  .menu-matrix thead th{font-size:15px}
  .menu-matrix .col-meal{font-size:17px}
  .menu-matrix .col-cat{font-size:15px}
  .menu-matrix .day-label{font-size:16px}
  .menu-matrix .day-date{font-size:12px}
  .menu-matrix .mwc-meal-label{font-size:17px}
  .menu-matrix .mwc-meal-count{font-size:12px}
  .menu-matrix .mwc-dish{font-size:15px;line-height:1.7;padding:4px 0}
  .menu-matrix .menu-cell{padding:8px 12px}
}

@media (min-width:1280px){
  .menu-matrix{
    --meal-col-w: 112px;
    --cat-col-w:  112px;
    --day-col-w:  200px;
  }
  .menu-matrix th,.menu-matrix td{padding:12px 14px}
  .menu-matrix thead th{font-size:16px}
  .menu-matrix .day-label{font-size:17px}
  .menu-matrix .mwc-dish{font-size:15px;line-height:1.8}
}

@media (min-width:1600px){
  .menu-matrix{--day-col-w:240px}
}

/* ============================================================
   菜品表单弹窗（新增/编辑）
   ============================================================ */
.modal-menu-form{
  max-width:480px;
  overflow:visible;
}
.modal-menu-form .modal-head h3{
  font-size:17px;font-weight:700;color:#2c3e35;
}
.modal-menu-form .modal-body{
  padding:0;
  overflow:visible;
}
.modal-menu-form .modal-body .form{
  padding:20px 24px 8px;
  max-width:none;
}
.modal-menu-form .modal-body .field{
  margin-bottom:16px;
}
.modal-menu-form .modal-body .field label{
  display:block;font-size:13px;font-weight:600;
  color:#5a7a66;margin-bottom:6px;
}
.modal-menu-form .modal-body .field input,
.modal-menu-form .modal-body .field select,
.modal-menu-form .modal-body .field textarea{
  width:100%;border:1px solid #cfd9d2;
  border-radius:8px;font-size:14px;background:#fff;
  color:#2c3e35;transition:border-color .15s, box-shadow .15s;
  outline:none;
}
.modal-menu-form .modal-body .field input:focus,
.modal-menu-form .modal-body .field select:focus{
  border-color:#59a971;box-shadow:0 0 0 3px rgba(89,169,113,.15);
}
.modal-menu-form .modal-body .field select{
  cursor:pointer;appearance:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%237a9a86'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 12px center;
  padding-right:32px;
}
.modal-menu-form .modal-body .field input.invalid,
.modal-menu-form .modal-body .field select.invalid{
  border-color:#e57373;background:#fff5f5;
}
.modal-menu-form .modal-body .form-actions{
  display:flex;gap:10px;justify-content:flex-end;
  padding:12px 24px 20px;margin-top:8px;
  border-top:1px solid #edf2ef;
}
.modal-menu-form .modal-body .form-actions .btn{
  padding:9px 20px;font-size:14px;border-radius:8px;
}
.modal-menu-form .modal-body .form-actions .btn-primary{
  background:#237a51;color:#fff;border:none;
}
.modal-menu-form .modal-body .form-actions .btn-primary:hover{background:#1d6643}
.modal-menu-form .modal-body .form-actions .btn{
  background:#f0f4f1;color:#5a7a66;border:1px solid #d5e0d9;
}
.modal-menu-form .modal-body .form-actions .btn:hover{background:#e3ebe6}
.modal-menu-form .modal-body .alert{
  margin:0 24px 12px;padding:10px 14px;border-radius:8px;
  font-size:13px;
}
.modal-menu-form .modal-body .alert-error{
  background:#fdf2f2;color:#c76360;border:1px solid #f5c6c5;
}
.modal-menu-form .modal-loading,
.modal-menu-form .modal-error{
  padding:40px 24px;text-align:center;color:#7a9a86;
}
.modal-menu-form .modal-error{color:#c76360}
.modal-menu-form .section-title{
  font-size:13px;font-weight:600;color:#5a7a66;
  margin:16px 24px 8px;padding-bottom:8px;
  border-bottom:1px solid #edf2ef;
}

/* 导入导出弹窗内部区块 */
.io-modal-section{padding:16px 24px}
.io-modal-section:first-child{padding-top:20px}
.io-modal-section:last-child{padding-bottom:20px}
.io-modal-section .io-section-title{
  margin:0 0 4px;font-size:15px;font-weight:700;color:#2c3e35;
}
.io-modal-section .io-desc{margin:0 0 12px}
.io-modal-divider{
  height:1px;background:#edf2ef;margin:0 24px;
}
.io-modal-section .upload-drop{
  display:block;margin-bottom:12px;
}
.io-modal-section .form-actions{
  margin-top:8px;padding:0;
}
.io-modal-section .btn{padding:9px 20px;font-size:14px;border-radius:8px}

@media (max-width:767px){
  .modal-menu-form{max-width:100%;border-radius:14px 14px 0 0;max-height:90vh}
  .modal-menu-form .modal-body .form{padding:16px}
  .modal-menu-form .modal-body .form-actions{padding:12px 16px 16px}
  .io-modal-section{padding:14px 16px}
  .io-modal-divider{margin:0 16px}
}

/* 商品批量删除工具条 */
.batch-toolbar{
  display:flex;align-items:center;gap:12px;
  padding:10px 16px;margin-top:12px;
  background:#fff4f4;border:1px solid #f0d6d6;border-radius:8px;
}
.batch-toolbar .batch-count{font-size:14px;color:#c0392b}
.batch-toolbar .btn-danger{
  background:#e74c3c;color:#fff;border:none;
  padding:6px 16px;border-radius:6px;cursor:pointer;font-size:14px;
  display:inline-flex;align-items:center;gap:4px;
}
.batch-toolbar .btn-danger:hover{background:#c0392b}

/* 弹窗内错误提示条 */
.modal-error-bar{
  background:#fdecea;color:#c0392b;
  padding:10px 16px;border-radius:8px;margin:0 0 12px;
  font-size:14px;
}

/* 弹窗内表单字段横排 */
.modal-menu-form .field-row{margin-bottom:0}
.modal-menu-form .field-row .field{margin-bottom:12px}

/* ============================================================
   分类管理弹窗
   ============================================================ */
.modal-category-manager{
  max-width:720px;
  max-height:calc(100vh - 40px);
  display:flex;
  flex-direction:column;
  overflow:hidden;
}
.modal-category-manager .modal-head{flex:0 0 auto;padding:18px 28px}
.modal-category-manager .modal-body{
  min-width:0;padding:0;overflow-x:hidden;overflow-y:auto;
}
.category-modal-content{width:100%;color:#2c3e35}
.category-section{padding:24px 28px}
.category-create-section{background:#fbfdfc;border-bottom:1px solid #edf2ef}
.category-list-section{padding-top:22px;padding-bottom:28px}
.category-section-title{
  margin:0;font-size:16px;line-height:1.4;font-weight:700;color:#2c3e35;
}
.modal-category-manager .modal-body .category-create-form{
  max-width:none;margin:20px 0 0;padding:0;
}
.category-form-grid{
  display:grid;grid-template-columns:minmax(0,1fr) 112px;
  gap:16px;align-items:end;
}
.modal-category-manager .category-create-form .field{min-width:0;margin:0}
.modal-category-manager .category-create-form .field label{
  display:block;margin:0 0 7px;font-size:13px;font-weight:600;color:#5a7a66;
}
.modal-category-manager .category-create-form .field input{
  width:100%;height:38px;min-width:0;padding:4px 11px;
  border:1px solid #cfd9d2;border-radius:7px;background:#fff;
  color:#2c3e35;font-size:14px;line-height:1.4;outline:none;
  transition:border-color .15s,box-shadow .15s;
}
.modal-category-manager .category-create-form .field input:hover{border-color:#8fc4a5}
.modal-category-manager .category-create-form .field input:focus{
  border-color:#59a971;box-shadow:0 0 0 3px rgba(89,169,113,.15);
}
.category-form-actions{
  display:flex;justify-content:flex-end;align-items:center;
  margin-top:18px;padding-top:16px;border-top:1px solid #edf2ef;
}
.category-create-btn{
  min-height:36px;height:36px;padding:0 18px;border-radius:7px;
  background:#237a51;color:#fff;border:1px solid #237a51;
  box-shadow:none;transform:none;font-size:14px;
  display:inline-flex;align-items:center;justify-content:center;
}
.category-create-btn:hover{
  background:#1d6643;color:#fff;border-color:#1d6643;
  box-shadow:none;transform:none;
}
.category-list-heading{
  display:flex;align-items:center;gap:10px;margin-bottom:14px;
}
.category-count{
  display:inline-flex;align-items:center;justify-content:center;
  min-height:24px;padding:2px 9px;border-radius:12px;
  background:#e7f6f0;color:#237a51;font-size:12px;line-height:1.4;
}
.category-table-wrap{
  width:100%;overflow-x:auto;border:1px solid #e3ece6;border-radius:8px;
  background:#fff;-webkit-overflow-scrolling:touch;
}
.modal-category-manager .category-table{
  width:100%;min-width:0;table-layout:fixed;border-collapse:collapse;
  font-size:14px;background:#fff;
}
.category-table .category-col-sort{width:78px}
.category-table .category-col-products{width:92px}
.category-table .category-col-actions{width:136px}
.modal-category-manager .category-table thead th{
  position:static;padding:11px 14px;background:#f7faf8;
  border-bottom:1px solid #e3ece6;color:#476151;font-size:13px;
  font-weight:600;white-space:nowrap;text-transform:none;letter-spacing:0;
}
.modal-category-manager .category-table thead th:nth-child(n+2){text-align:center}
.modal-category-manager .category-table td{
  height:56px;padding:9px 14px;border-bottom:1px solid #edf2ef;
  color:#2c3e35;font-size:14px;vertical-align:middle;
}
.modal-category-manager .category-table tbody tr:last-child td{border-bottom:none}
.modal-category-manager .category-table tbody tr:hover{background:#f6fbf8!important}
.category-name-cell{min-width:0}
.category-name-input{
  display:block;width:100%;min-width:0;height:34px;padding:4px 10px;
  border:1px solid #cfd9d2;border-radius:6px;background:#fff;
  color:#2c3e35;font:inherit;line-height:1.4;outline:none;
  transition:border-color .15s,box-shadow .15s;
}
.category-name-input:hover{border-color:#8fc4a5}
.category-name-input:focus{
  border-color:#59a971;box-shadow:0 0 0 3px rgba(89,169,113,.15);
}
.category-sort-cell,.category-products-cell{text-align:center;color:#607668!important}
.category-actions-cell{white-space:nowrap}
.category-actions{
  display:flex;align-items:center;justify-content:flex-start;gap:4px;
  white-space:nowrap;
}
.category-actions form.inline{display:block;margin:0;padding:0}
.category-actions .link{
  display:inline-flex;align-items:center;justify-content:center;
  min-width:0;min-height:32px;height:32px;padding:4px 7px;margin:0;
  border-radius:5px;font-size:13px;line-height:1.2;text-decoration:none;
}
.category-actions .category-save-link{color:#1b9b72}
.category-actions .category-delete-link{color:#e0524d}
.category-actions .category-save-link:hover{background:#e7f6f0;color:#167653}
.category-actions .category-delete-link:hover{background:#fdecea;color:#c63e39}
.category-empty{
  padding:30px 16px;border:1px dashed #d8e6dd;border-radius:8px;
  background:#fbfdfc;text-align:center;font-size:13px;
}
.modal-category-manager .category-modal-error{
  margin:16px 28px 0;
}

@media (max-width:767px){
  .modal-category-manager{max-width:100%;max-height:90vh}
  .modal-category-manager .modal-head{padding:14px 16px}
  .category-section{padding:20px 16px}
  .category-list-section{padding-top:20px;padding-bottom:22px}
  .modal-category-manager .modal-body .category-create-form{margin-top:16px;padding:0}
  .category-form-grid{grid-template-columns:minmax(0,1fr) 96px;gap:12px}
  .category-form-actions{margin-top:16px;padding-top:14px}
  .category-create-btn{min-height:40px;height:40px}
  .modal-category-manager .category-table thead th{padding:10px 10px}
  .modal-category-manager .category-table td{height:54px;padding:8px 10px}
  .category-table .category-col-sort{width:70px}
  .category-table .category-col-products{width:82px}
  .category-table .category-col-actions{width:128px}
}

@media (max-width:480px){
  .modal-category-manager .category-table{min-width:0}
  .category-table .category-col-sort{width:48px}
  .category-table .category-col-products{width:62px}
  .category-table .category-col-actions{width:100px}
  .modal-category-manager .category-table thead th,
  .modal-category-manager .category-table td{padding-left:5px;padding-right:5px}
  .category-name-input{padding-left:7px;padding-right:7px;font-size:13px}
  .category-actions{justify-content:center;gap:2px}
  .category-actions .link{padding-left:3px;padding-right:3px;font-size:13px}
}

@media (max-width:360px){
  .category-form-grid{grid-template-columns:1fr}
  .category-sort-field{max-width:120px}
  .category-form-actions{justify-content:stretch}
  .category-create-btn{width:100%}
  .category-table .category-col-sort{width:40px}
  .category-table .category-col-products{width:50px}
  .category-table .category-col-actions{width:90px}
  .category-actions .link{font-size:12px}
}
