/* ================= Reset ================= */
*{margin:0;padding:0;box-sizing:border-box}

/* ================= Theme Vars ================= */
:root{
  --bg-grad-1:#dff3a2;
  --bg-grad-2:#cdefff;
  --panel-bg:#ffffff;
  --panel-radius:24px;
  --shadow-sm:0 2px 6px rgba(0,0,0,.06);
  --shadow-md:0 8px 20px rgba(0,0,0,.08);
  --primary:#c33b2e; /* 搜索按钮红色 */
  --muted:#6b7280;
  --line:#e5e7eb;
  --chip:#f8fafc;
  --chip-border:#dbeafe;
}

/* ================= Base ================= */
body.admin-body{
  font-family: 'Arial', sans-serif;
  background: linear-gradient(180deg,var(--bg-grad-1),var(--bg-grad-2));
  min-height:100vh;
  color:#111827;
}
img{max-width:100%;height:auto;display:block}

/* 居中容器（个别区块会用到） */
.container{max-width:1200px;margin:0 auto;padding:20px}

/* ================= Top Bar ================= */
.admin-header{
  height:72px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 20px 0 24px;
  background:#fff;
  box-shadow: var(--shadow-sm);
}
.brand-wrap{display:flex;align-items:center;gap:10px}
.brand-logo{width:40px;height:40px;object-fit:contain}
.brand-name{font-size:20px;font-weight:700}
.admin-title{font-size:22px;font-weight:700}
.header-actions{display:flex;gap:10px}

/* ================= Shell Layout ================= */
.admin-shell{
  display:grid;
  grid-template-columns: 240px 1fr;
  gap: 16px;
  padding: 16px;
}

/* Sidebar */
.admin-sidebar{
  background:#fff;
  border-radius:12px;
  padding:16px;
  box-shadow: var(--shadow-sm);
  display:flex;
  flex-direction:column;
  gap:14px;
}
.menu-btn{
  width:100%;
  padding:14px 12px;
  border-radius:12px;
  background:#eefaff;
  border:1px solid #d7eef9;
  font-size:16px;
  cursor:pointer;
  transition: all .2s ease;
}
.menu-btn:hover{transform: translateY(-1px)}
.menu-btn.active{
  background:#c9f3ff;
  border-color:#90e0ff;
  box-shadow: var(--shadow-sm);
}

/* Main Panel */
.admin-main{min-height: calc(100vh - 72px - 32px)}
.panel{
  background: var(--panel-bg);
  border-radius: var(--panel-radius);
  box-shadow: var(--shadow-md);
  padding: 20px 20px 28px;
}
.panel-header{
  display:flex;align-items:center;justify-content:center;padding:10px 0 8px
}
.panel-header h2{font-size:20px;font-weight:700}

/* 视图开关（与 JS 协作） */
.view{display:none}
.view.active{display:block}

/* ================= Search ================= */
.search-wrap{
  margin:12px auto 12px;
  display:flex;
  gap:12px;
  max-width:760px;
}
/* 更稳妥：直接作用于 input.search */
input.search{
  flex:1;height:44px;padding:0 14px;border-radius:12px;
  border:2px solid #e46b6b;background:#fff;outline:none;font-size:16px;
}
input.search:focus{box-shadow:0 0 0 3px rgba(228,107,107,.15)}

.btn{
  height:44px;padding:0 16px;border-radius:12px;border:1px solid var(--line);
  background:#fff;cursor:pointer;font-size:16px;
}
.btn.primary{background:var(--primary);color:#fff;border-color:var(--primary)}
.btn.ghost{background:#fff}

/* ================= Category Chips ================= */
.chips{
  display:flex;flex-wrap:wrap;gap:10px;align-items:center;
  margin:6px auto 10px;max-width:760px;
}
.chip{
  padding:8px 14px;border-radius:12px;background:var(--chip);
  border:1px solid var(--chip-border);box-shadow:var(--shadow-sm);cursor:pointer;font-size:14px;
}
.chip.is-active{background:#e6f6ff;border-color:#9bdcff}

/* Divider */
.panel-divider{border:0;border-top:1px solid var(--line);margin:14px 0 18px}

/* ================= Product Grid ================= */
.card-grid{display:grid;grid-template-columns: repeat(4, 1fr);gap:22px}
@media (max-width:1200px){.card-grid{grid-template-columns: repeat(3, 1fr)}}
@media (max-width:900px){
  .admin-shell{grid-template-columns:1fr}
  .admin-sidebar{flex-direction:row;gap:12px}
  .card-grid{grid-template-columns: repeat(2, 1fr)}
}
@media (max-width:560px){.card-grid{grid-template-columns:1fr}}

/* ===== Product Card · 简洁款（图片-名称-类别/ID-价格） ===== */
.product-card.simple{
  position:relative;
  background:#fff;
  border-radius:16px;
  box-shadow:0 6px 18px rgba(0,0,0,.06), inset 0 0 0 1px #e9f5fb;
  overflow:hidden;
  transition:transform .06s ease, box-shadow .2s ease;
  cursor:pointer;
}
.product-card.simple:hover{
  transform:translateY(-1px);
  box-shadow:0 10px 24px rgba(0,0,0,.1), inset 0 0 0 1px #dff2fb;
}
.product-card .delete-product-button{
  position:absolute;
  top:8px; right:8px;
  width:34px; height:34px;
  border:none; border-radius:10px;
  background:#fff; box-shadow:0 2px 10px rgba(0,0,0,.12);
  color:#c00; font-size:16px; line-height:34px;
  z-index:2; cursor:pointer;
}
.product-card .delete-product-button:hover{ background:#ffecec; }

.product-card .product-image{
  width:100%;
  height:240px;
  background:#f8fafc;
  border-bottom:1px solid #eef2f6;
  overflow:hidden;
}
.product-card .product-image img{
  width:100%; height:100%; object-fit:cover;
}
.product-card .product-info.simple{
  padding:12px 12px 14px;
}
.product-card .prod-name{
  font-size:16px; font-weight:700; line-height:1.25; color:#111827;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical;
  overflow:hidden;
}
.product-card .prod-meta{
  display:flex; justify-content:space-between; align-items:center;
  margin-top:6px; font-size:12px; color:#6b7280;
}
.product-card .prod-meta .prod-cat{ max-width:65%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.product-card .prod-price{
  margin-top:8px; font-size:18px; font-weight:800; color:#0b3142;
}

/* ================= Pagination ================= */
.pagination{
  display:flex;justify-content:center;gap:8px;margin-top:20px;
}
.pagination .page, .pagination button{
  min-width:36px;height:36px;border-radius:8px;border:1px solid var(--line);background:#fff;cursor:pointer;
}
.pagination .active{border-color:#7cc9ff;background:#eaf7ff}

/* ================= Category Admin (表单 + 表格) ================= */
.cat-admin{display:grid;grid-template-columns:360px 1fr;gap:20px}
@media (max-width:1000px){.cat-admin{grid-template-columns:1fr}}
.cat-form{
  display:grid;gap:12px;background:#fafafa;border:1px solid var(--line);
  border-radius:16px;padding:16px;
}
.cat-form label{display:flex;flex-direction:column;gap:6px;font-size:14px}
.cat-form input,.cat-form select{
  height:40px;padding:0 10px;border-radius:10px;border:1px solid var(--line)
}
.cat-form .row{display:flex;gap:12px;align-items:center}
.cat-form .actions{display:flex;gap:10px;margin-top:6px}

.table-wrap{overflow:auto;border:1px solid var(--line);border-radius:16px}
.table{width:100%;border-collapse:collapse}
.table th,.table td{padding:12px 10px;border-bottom:1px solid var(--line);text-align:left;font-size:14px}

/* ================= Desk fallback box ================= */
.desk-fallback{padding:16px;border:1px dashed #cbd5e1;border-radius:16px;background:#fafafa}

/* ================== Upload · 上传产品（新版三栏布局） ================== */
#upload-view .upload-container{
  background:#fff;
  border-radius:16px;
  padding:24px 22px;
  max-width:1200px;
  margin:0 auto;
}
#upload-view h2{
  text-align:center;
  font-size:28px;
  margin:6px 0 18px;
  font-weight:800;
}

/* 新版网格：左列基础信息｜中列中文详情+图片｜右列英文详情+供货信息 */
.upload-grid{
  display:grid;
  grid-template-columns: 1fr 1.15fr 1.15fr;
  grid-template-areas:
    "nameZh   descZh    descEn"
    "nameEn   descZh    descEn"
    "category images    supplier"
    "subcategory images  supplier"
    "price    images    supplier"
    "submit   images    supplier";
  gap:18px 36px;
  align-items:start;
}

/* grid area 映射 */
.fg-name-zh{grid-area:nameZh;}
.fg-name-en{grid-area:nameEn;}
.fg-category{grid-area:category;}
.fg-subcategory{grid-area:subcategory;}
.fg-price{grid-area:price;}
.fg-submit{grid-area:submit;}
.fg-desc-zh{grid-area:descZh;}
.fg-images{grid-area:images;}
.fg-desc-en{grid-area:descEn;}
.fg-supplier{grid-area:supplier;}

/* 表单控件统一外观 */
.upload-grid .form-group label,
.upload-grid .supplier-box .form-row label{
  display:block;
  margin:2px 0 8px;
  color:#2b3a42;
  font-weight:600;
  font-size:14px;
}
.upload-grid input[type="text"],
.upload-grid input[type="number"],
.upload-grid select,
.upload-grid textarea{
  width:100%;
  box-sizing:border-box;
  background:#fff;
  border:1.5px solid var(--line);
  border-radius:12px;
  padding:10px 14px;
  font-size:14px;
  outline:none;
  transition:border-color .15s, box-shadow .15s;
}
.upload-grid textarea{ min-height:140px; resize:vertical; }
.upload-grid input:focus,
.upload-grid select:focus,
.upload-grid textarea:focus{
  border-color:#93c5fd;
  box-shadow:0 0 0 3px rgba(147,197,253,.35);
}

/* select 箭头 */
.upload-grid select{
  appearance:none;
  background-image:
    linear-gradient(45deg, transparent 50%, #607d8b 50%),
    linear-gradient(135deg, #607d8b 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% - 3px),
                       calc(100% - 12px) calc(50% + 3px);
  background-size:6px 6px, 6px 6px;
  background-repeat:no-repeat;
  padding-right:36px;
}

/* 图片区 */
.fg-images label{ margin-bottom:10px; }
.fg-images input[type="file"]{ display:block; margin-bottom:8px; }
.image-zone{
  min-height:320px;
  border:1.5px dashed #cfd8e3;
  border-radius:16px;
  background:#f9fbff;
  padding:10px;
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-content:flex-start;
}
#thumbs img{
  width:90px !important;
  height:90px !important;
  object-fit:cover;
  border-radius:10px;
  box-shadow:0 4px 10px rgba(0,0,0,.08);
  border:1px solid #eef2f6;
}

/* 供应商信息盒 */
.fg-supplier{
  border:1px solid #eef2f6;
  border-radius:16px;
  background:#fbfdff;
  padding:14px;
  display:grid;
  gap:12px;
  margin-top: 80px;
}
.fg-supplier .form-row input{
  height:44px;
  padding:0 12px;
  border:1px solid var(--line);
  border-radius:12px;
  outline:none;
}
.fg-supplier .form-row input:focus{
  border-color:#93c5fd;
  box-shadow:0 0 0 3px rgba(147,197,253,.35);
}

/* 提交按钮 */
.upload-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:48px;
  padding:0 22px;
  border-radius:12px;
  background:#9fe7f5;
  color:#0b3142;
  font-weight:700;
  font-size:16px;
  border:none;
  cursor:pointer;
  box-shadow:0 6px 18px rgba(0,0,0,.08);
  transition:transform .04s, box-shadow .12s, background .2s;
}
.upload-btn:hover{ box-shadow:0 8px 22px rgba(0,0,0,.10); }
.upload-btn:active{ transform:translateY(1px); }

/* 响应式 */
@media (max-width:1080px){
  .upload-grid{
    grid-template-columns:1fr 1fr;
    grid-template-areas:
      "nameZh   descZh"
      "nameEn   descZh"
      "category images"
      "subcategory images"
      "price    images"
      "submit   images"
      "descEn   descEn"
      "supplier supplier";
  }
}
@media (max-width:720px){
  .upload-grid{
    grid-template-columns:1fr;
    grid-template-areas:
      "nameZh"
      "nameEn"
      "category"
      "subcategory"
      "price"
      "descZh"
      "images"
      "descEn"
      "supplier"
      "submit";
    gap:14px 16px;
  }
  .upload-btn{ width:100%; }
}

/* 上传：隐藏系统旧箭头/焦点/禁用 */
#upload-view .upload-form select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:#fff;background-image:url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%236b7280'>\
<path d='M5.23 7.21a.75.75 0 011.06.02L10 10.17l3.71-2.94a.75.75 0 111.06 1.06l-4.24 3.36a.75.75 0 01-.94 0L5.21 8.29a.75.75 0 01.02-1.08z'/>\
</svg>");background-repeat:no-repeat;background-position:right 12px center;background-size:16px 16px;padding-right:40px;line-height:44px;}
#upload-view .upload-form select::-ms-expand{display:none;}
#upload-view .upload-form select:focus{border-color:#93c5fd;box-shadow:0 0 0 3px rgba(147,197,253,.35);}
#upload-view .upload-form select:disabled{color:#9ca3af;background-color:#f9fafb;cursor:not-allowed;}

/* 预览缩略图 */
#upload-view .thumbs{display:flex; gap:10px; flex-wrap:wrap; margin-top:8px;}
#upload-view .thumb-item{
  position:relative; width:72px; height:72px;
  border:1px solid #e5e7eb; border-radius:10px; overflow:hidden;
  background:#fff; box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
#upload-view .thumb-item img
{
    width:100%; 
    height:100%; 
    object-fit:cover; 
    display:block;
    
}
#upload-view .thumb-remove{
  position:absolute; top:4px; right:4px;
  width:18px; height:18px; border:none; border-radius:50%;
  background:#111; color:#fff; line-height:18px; font-size:12px; opacity:.8; cursor:pointer;
}
#upload-view .thumb-remove:hover{ opacity:1; }

/* ================== Product Detail · 商品详情 ================== */
#product-detail-view .panel-header h2{ font-weight:800; font-size:24px; }

/* 两列栅格：左侧画廊 + 右侧信息 */
#productDetailContainer{
  max-width: 1200px;
  margin: 0 auto;
  padding: 8px 8px 28px;
  display: grid;
  grid-template-columns: minmax(420px, 1.1fr) minmax(340px, 1fr);
  gap: 24px;
  align-items: start;
}

/* 画廊 */
.pd-gallery{}
.pd-gallery .gallery-main{
  position: relative;
  width: 100%;
  min-height: 440px;
  border-radius: 14px;
  overflow: hidden;
  background: #f6f8fb;
  box-shadow: var(--shadow-sm);
  display:flex; align-items:center; justify-content:center;
}
.pd-gallery .gallery-main img{
  width: 100%;
  height: auto;
  max-height: 580px;
  object-fit: contain;
}
.pd-gallery .nav{
  position:absolute; top:50%; transform:translateY(-50%);
  border:none; width:38px; height:38px; border-radius:50%;
  background:#111; color:#fff; opacity:.75; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 6px 14px rgba(0,0,0,.15);
}
.pd-gallery .nav:hover{ opacity:1; }
.pd-gallery .nav.prev{ left:10px; }
.pd-gallery .nav.next{ right:10px; }

.pd-gallery .gallery-thumbs{
  margin-top: 12px;
  display:flex; gap:10px; overflow-x:auto; padding-bottom:4px;
}
.pd-gallery .gallery-thumbs .thumb{
  width: 80px; height: 80px;
  border-radius: 10px; overflow: hidden;
  border: 2px solid transparent;
  background:#fff; box-shadow: var(--shadow-sm);
  cursor: pointer; flex: 0 0 auto;
  object-fit: cover;
}
.pd-gallery .gallery-thumbs .thumb.active{ border-color:#86d3ff; }

/* 右侧信息 */
.product-detail-info{ padding: 6px 2px; }
.product-detail-title{ font-size:24px; font-weight:800; line-height:1.25; }
.product-detail-title-en{ margin-top:8px; color:#6b7280; font-size:15px; }
.product-detail-price{
  margin:8px 0 14px;
  display:flex; gap:10px; align-items:baseline;
}
.product-detail-price .product-detail-price-usd{ font-size:22px; font-weight:800; color:#0b3142; }
.product-detail-price .product-detail-price-cny{ font-size:14px; color:#6b7280; }

/* 类目 + 编号（在价格下方） */
.pd-meta-inline{
  display:flex; gap:10px; align-items:center;
  margin:6px 0 10px; color:#6b7280; font-size:14px;
}
.pd-cat-tag{
  background:#eef6ff; border:1px solid #cde7ff; color:#0b3142;
  padding:3px 8px; border-radius:999px; line-height:1;
}
.pd-id-tag{ color:#0b3142; font-weight:600; }

.product-detail-description{ margin:12px 0; line-height:1.8; color:#374151; font-size:15px; }

.product-detail-actions{ margin:12px 0 16px; display:flex; gap:10px; flex-wrap:wrap; }
.product-detail-actions .action-button{
  height:40px; padding:0 14px; border-radius:10px; border:1px solid var(--line);
  background:#fff; cursor:pointer;
}
.product-detail-actions .action-button.primary{ background:#111; color:#fff; border-color:#111; }
.product-detail-actions .action-button.danger{ background:#fff0f0; color:#b91c1c; border-color:#fecaca; }

/* 供应商卡片 */
.supplier-card{
  margin-top:8px; border:1px solid #eef2f6; border-radius:12px;
  padding:12px; background:#fbfdff;
}
.supplier-card .supplier-title{ font-weight:700; margin-bottom:8px; font-size:16px; }
.supplier-card .supplier-row{ display:flex; gap:6px; margin:4px 0; font-size:14px; }
.supplier-card .label{ color:#6b7280; }
.supplier-card .value{ color:#111827; }

/* 画廊灯箱（点击大图放大） */
.pd-lightbox{ position:fixed; inset:0; display:flex; align-items:center; justify-content:center; background:rgba(0,0,0,.8); z-index:9999; }
.pd-lightbox.hidden{ display:none; }
.pd-lightbox .pd-lightbox-backdrop{ position:absolute; inset:0; }
.pd-lightbox .pd-lb-img{ max-width:90vw; max-height:86vh; object-fit:contain; border-radius:6px; box-shadow:0 16px 50px rgba(0,0,0,.35); }
.pd-lightbox .pd-lb-prev,
.pd-lightbox .pd-lb-next{
  position:absolute; top:50%; transform:translateY(-50%);
  width:44px; height:44px; border:none; border-radius:22px; background:#111; color:#fff; opacity:.9; cursor:pointer;
}
.pd-lightbox .pd-lb-prev{ left:26px; }
.pd-lightbox .pd-lb-next{ right:26px; }
.pd-lightbox .pd-lb-close{
  position:absolute; top:20px; right:24px;
  width:40px; height:40px; border:none; border-radius:20px;
  background:#fff; color:#111; cursor:pointer; font-size:22px; font-weight:700;
}

/* 顶部工具条：返回按钮 */
.pd-toolbar{
  grid-column: 1 / -1;
  display:flex; align-items:center; justify-content:space-between;
  margin: 0 0 12px;
}
.pd-back{
  height:36px; padding:0 14px; border-radius:10px;
  border:1px solid var(--line); background:#fff; cursor:pointer;
  font-size:14px; font-weight:700;
  box-shadow: var(--shadow-sm);
}
.pd-back:hover{ background:#f8fafc; }

/* 响应式 */
@media (max-width: 980px){
  #productDetailContainer{ grid-template-columns: 1fr; }
  .pd-gallery .gallery-main{ min-height: 360px; }
}

/* ================= 客服工作台（内嵌布局） ================ */
.cs-shell{
  display:grid;
  grid-template-columns: 300px 1fr;
  gap:16px;
  padding: 0 8px 12px;
}
.cs-sidebar{
  background:#fff;
  border-radius:16px;
  box-shadow: var(--shadow-sm);
  border:1px solid var(--line);
  display:flex;
  flex-direction:column;
  min-height:520px;
}
.cs-token,
.cs-search{
  padding:10px;
  border-bottom:1px solid var(--line);
  display:flex;
  align-items:center;
  gap:8px;
}
.cs-input{
  flex:1;
  height:44px;
  padding:0 12px;
  border:1px solid var(--line);
  border-radius:10px;
  outline:none;
  background:#fff;
}
.cs-input:focus{ border-color:#93c5fd; box-shadow:0 0 0 3px rgba(147,197,253,.35); }
.cs-input-sm{ height:36px; }

.cs-btn{
  height:36px;
  padding:0 12px;
  border-radius:10px;
  border:1px solid var(--line);
  background:#fff;
  cursor:pointer;
}
.cs-btn:hover{ box-shadow: var(--shadow-sm); }
.cs-btn-primary{ background:#111; color:#fff; border-color:#111; }

.cs-sessions{
  flex:1; overflow:auto; padding:6px;
  background:#fff;
}
.cs-session{
  display:flex; gap:10px; align-items:flex-start;
  padding:10px 10px;
  border-radius:12px;
  border:1px solid var(--line);
  background:#fff;
  box-shadow:0 1px 0 rgba(0,0,0,.02);
  margin-bottom:8px;
  cursor:pointer;
  transition: box-shadow .15s, transform .06s, background .2s, border-color .2s;
}
.cs-session:hover{ background:#f8fafc; box-shadow: var(--shadow-sm); }
.cs-session.is-active{ background:#e6f6ff; border-color:#9bdcff; box-shadow:0 0 0 2px rgba(155,220,255,.35) inset; }

.cs-avatar{
  width:34px; height:34px; border-radius:50%;
  background:#e2e8f0; color:#334155;
  display:flex; align-items:center; justify-content:center;
  font-weight:700; font-size:12px; flex:0 0 34px;
  overflow:hidden;
}
.cs-avatar img{ width:100%; height:100%; object-fit:cover; display:block; }

.cs-session-main{ flex:1; min-width:0; }
.cs-line1{ display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:4px; }
.cs-name{ font-weight:700; color:#0f172a; max-width:70%; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cs-time{ color:#64748b; font-size:12px; white-space:nowrap; }
.cs-line2{ display:flex; align-items:center; gap:8px; }
.cs-preview{ color:#475569; font-size:13px; flex:1; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cs-unread{
  background:#ef4444; color:#fff; border-radius:12px;
  padding:0 7px; height:18px; line-height:18px; font-size:12px;
}

.cs-main{
  background:#fff;
  border-radius:16px;
  box-shadow: var(--shadow-sm);
  border:1px solid var(--line);
  display:flex; flex-direction:column;
  min-height:520px;
}
.cs-header{
  padding:12px 14px;
  border-bottom:1px solid var(--line);
  display:flex; justify-content:space-between; align-items:center; gap:10px;
}
.cs-title{ font-weight:800; }
.cs-tools{ display:flex; gap:8px; }

.cs-messages{
  flex:1;
  overflow:auto;
  padding:14px;
  display:flex; flex-direction:column; gap:10px;
  background:#fafafa;
}
.cs-msg{
  max-width:72%;
  padding:10px 12px;
  border-radius:12px;
  white-space:pre-wrap;
  line-height:1.45;
}
.cs-msg.is-user{
  align-self:flex-start;
  background:#fff;
  color:#111;
  border:1px solid #e5e7eb;
}
.cs-msg.is-agent{
  align-self:flex-end;
  background:#111;
  color:#fff;
}
.cs-footer{
  border-top:1px solid var(--line);
  background:#fff;
  padding:10px;
  display:flex; align-items:center; gap:8px;
}

/* 小屏自适应 */
@media (max-width: 980px){
  .cs-shell{ grid-template-columns: 1fr; }
  .cs-sidebar{ order:2; }
  .cs-main{ order:1; }
}

/* 消息区空态提示 */
.cs-messages:empty::before{
  content:"请选择左侧会话开始沟通"; color:#94a3b8; font-size:14px;
  display:block; text-align:center; margin-top:28px;
}
/* 侧边栏菜单角标 */
.menu-btn.has-badge { position: relative; }
.menu-btn .menu-badge{
  position: absolute;
  top: 6px;
  right: 10px;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ef4444; /* 红 */
  color: #fff;
  font-size: 12px;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
  pointer-events: none;
}

.admin-login-overlay{position:fixed;inset:0;z-index:99999;display:grid;place-items:center;background:rgba(15,23,42,.6)}
.admin-login-form{width:min(380px,92vw);background:white;padding:28px;border-radius:16px;display:grid;gap:18px}.admin-login-form label{display:grid;gap:8px}.admin-login-form input{padding:12px;border:1px solid #cbd5e1;border-radius:8px;width:100%;box-sizing:border-box}.login-error{color:#b91c1c;min-height:1.3em}

.product-spec-fields{grid-column:1/-1;display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px}.product-spec-fields label{display:grid;gap:6px}.product-spec-fields input{padding:10px;border:1px solid #cbd5e1;border-radius:6px}.delete-product-button{font-size:13px;min-width:40px}.search-wrap{flex-wrap:wrap}

.metrics-summary{font-size:13px;color:#475569;display:flex;flex-wrap:wrap;gap:12px;padding:12px 0}.metrics-summary p{flex-basis:100%}.inquiry-tracker{padding:16px 0}.inquiry-record{border:1px solid #e2e8f0;padding:14px;border-radius:8px;margin:10px 0}.inquiry-record p{margin:8px 0;overflow-wrap:anywhere}.inquiry-record select{padding:8px}
