/* ============================================
   丝路食光 · 后台样式（FastAdmin 风格）
   ============================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: 14px;
  color: #333;
  background: #f5f6fa;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

/* ===== 布局 ===== */
.admin-body { display: flex; min-height: 100vh; }

.sidebar {
  width: 200px;
  flex: none;
  background: #1e2d3d;
  color: #c9d3e0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.side-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 16px;
  color: #fff;
  font-size: 17px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, #e0a13e, #c66b45);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
}
.side-nav { flex: 1; padding: 10px 8px; overflow-y: auto; }
.side-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: #c9d3e0;
  margin-bottom: 2px;
}
.side-nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.side-nav a.on { background: #2b7de9; color: #fff; font-weight: 600; }
.nav-ic { width: 20px; text-align: center; font-size: 15px; }
.side-foot {
  padding: 14px 16px;
  font-size: 12px;
  color: #6b7a8d;
  border-top: 1px solid rgba(255,255,255,.08);
}

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 54px;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.crumb { font-size: 14px; color: #888; }
.user-box { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 13px; }
.role-tag {
  background: #eef2f7;
  color: #5a6a7d;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 12px;
}
.role-tag.super { background: #fff3e0; color: #b9791f; }
.logout { color: #2b7de9; }
.logout:hover { text-decoration: underline; }

.content { padding: 18px 20px 40px; }

/* ===== 页头 ===== */
.page-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.page-head h2 { font-size: 18px; }
.page-head span { color: #999; font-size: 13px; }
.page-head .btn { margin-left: auto; }

/* ===== 卡片面板 ===== */
.panel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 16px;
}
.panel-h {
  font-size: 15px;
  font-weight: 600;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid #f0f1f3;
}
.panel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}
.panel-form { max-width: 640px; }

/* ===== 统计卡片 ===== */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}
.stat {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 20px 18px;
}
.stat-num { font-size: 26px; font-weight: 700; color: #1e2d3d; }
.stat-label { font-size: 12px; color: #999; margin-top: 6px; }

/* ===== 柱状图 ===== */
.chart { display: flex; align-items: flex-end; gap: 10px; height: 200px; padding-top: 10px; }
.chart .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; }
.bar-wrap { flex: 1; width: 100%; display: flex; align-items: flex-end; }
.bar {
  width: 100%;
  max-width: 42px;
  margin: 0 auto;
  background: linear-gradient(180deg, #4a90d9, #2b7de9);
  border-radius: 6px 6px 0 0;
  min-height: 3px;
}
.bar-val { font-size: 12px; color: #2b7de9; font-weight: 600; }
.bar-day { font-size: 12px; color: #888; }
.bar-cnt { font-size: 11px; color: #bbb; }

/* ===== 状态分布 ===== */
.pie-list { display: flex; flex-direction: column; gap: 14px; padding: 6px 0; }
.pie-row { display: flex; align-items: center; gap: 12px; }
.pie-label { width: 56px; font-size: 13px; color: #666; flex: none; }
.pie-track { flex: 1; height: 10px; background: #f0f1f3; border-radius: 5px; overflow: hidden; }
.pie-fill { height: 100%; background: linear-gradient(90deg, #e0a13e, #c66b45); border-radius: 5px; }
.pie-val { font-size: 12px; color: #999; width: 90px; text-align: right; flex: none; }

/* ===== 表格 ===== */
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left;
  font-size: 13px;
  color: #666;
  font-weight: 600;
  padding: 10px 12px;
  border-bottom: 2px solid #f0f1f3;
  white-space: nowrap;
}
.table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f5f6f8;
  font-size: 13px;
  vertical-align: middle;
}
.table tr:hover td { background: #fafbfd; }
.td-img {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  object-fit: cover;
  margin-right: 10px;
  vertical-align: middle;
}
.td-price { color: #c66b45; font-weight: 600; }
.old-price { color: #bbb; text-decoration: line-through; font-weight: 400; margin-left: 6px; font-size: 12px; }
.td-addr { max-width: 320px; }
.op { white-space: nowrap; }
.op .btn { margin-right: 4px; }

/* ===== 标签 ===== */
.tag-ok { background: #e8f5ee; color: #2e7d5b; border-radius: 4px; padding: 2px 8px; font-size: 12px; }
.tag-bad { background: #fdeaea; color: #c0392b; border-radius: 4px; padding: 2px 8px; font-size: 12px; }
.tag-warn { background: #fff3e0; color: #b9791f; border-radius: 4px; padding: 2px 8px; font-size: 12px; }
.tag-soft { background: #eef2f7; color: #5a6a7d; border-radius: 4px; padding: 2px 8px; font-size: 12px; }
.tag-hot { background: #ffe9e0; color: #c66b45; border-radius: 4px; padding: 2px 8px; font-size: 12px; }

/* ===== 按钮 ===== */
.btn {
  display: inline-block;
  border: 1px solid #d5d9e0;
  background: #fff;
  color: #444;
  border-radius: 6px;
  font-size: 13px;
  padding: 7px 16px;
  cursor: pointer;
  text-align: center;
  line-height: 1.4;
}
.btn:hover { border-color: #2b7de9; color: #2b7de9; }
.btn-primary { background: #2b7de9; border-color: #2b7de9; color: #fff; }
.btn-primary:hover { background: #1f6cd0; border-color: #1f6cd0; color: #fff; }
.btn-danger { background: #e74c3c; border-color: #e74c3c; color: #fff; }
.btn-danger:hover { background: #d43a2a; border-color: #d43a2a; color: #fff; }
.btn-warn { background: #f5a623; border-color: #f5a623; color: #fff; }
.btn-warn:hover { background: #e0950d; border-color: #e0950d; color: #fff; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-block { display: block; width: 100%; }

/* ===== 搜索栏 ===== */
.search-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.search-bar input, .search-bar select {
  border: 1px solid #d5d9e0;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 13px;
  min-width: 160px;
  outline: none;
}
.search-bar input:focus, .search-bar select:focus { border-color: #2b7de9; }

/* ===== 表单 ===== */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 13px;
  color: #555;
  margin-bottom: 6px;
  font-weight: 600;
}
.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
  width: 100%;
  border: 1px solid #d5d9e0;
  border-radius: 6px;
  padding: 9px 12px;
  font-size: 13px;
  outline: none;
  font-family: inherit;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: #2b7de9; }
.form-group textarea { resize: vertical; line-height: 1.6; }
.form-row { display: flex; gap: 14px; }
.form-row .form-group { flex: 1; }
.form-actions { margin-top: 20px; padding-top: 16px; border-top: 1px solid #f0f1f3; }
.upload-row { display: flex; gap: 10px; }
.upload-row input[type="text"] { flex: 1; }
.upload-preview { margin-top: 10px; display: none; }
.upload-preview img { max-height: 120px; border-radius: 8px; border: 1px solid #eee; }
.cat-icon {
  display: inline-flex;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #f9ede3;
  color: #a5522e;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

/* ===== 分页 ===== */
.pager { margin-top: 14px; text-align: right; }
.pagination { display: inline-flex; gap: 4px; list-style: none; }
.pagination li { display: inline; }
.pagination a, .pagination span {
  display: inline-block;
  border: 1px solid #d5d9e0;
  padding: 5px 11px;
  border-radius: 5px;
  font-size: 13px;
  color: #555;
}
.pagination .current span, .pagination .active span {
  background: #2b7de9;
  color: #fff;
  border-color: #2b7de9;
}
.pagination a:hover { border-color: #2b7de9; color: #2b7de9; }
.pagination .disabled span { color: #ccc; }

/* ===== 其它 ===== */
.kv { display: flex; padding: 9px 0; font-size: 13px; border-bottom: 1px dashed #f0f1f3; }
.kv span { width: 90px; color: #999; flex: none; }
.kv b { font-weight: 500; }
.kv .price { color: #c66b45; font-size: 16px; font-weight: 700; }
.empty { text-align: center; color: #bbb; padding: 40px 0; font-size: 13px; }

/* ===== 登录页 ===== */
.login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1e2d3d 0%, #2b3f55 55%, #3d5569 100%);
}
.login-card {
  width: 380px;
  background: #fff;
  border-radius: 14px;
  padding: 36px 34px 26px;
  box-shadow: 0 18px 50px rgba(0,0,0,.25);
}
.login-logo { text-align: center; margin-bottom: 26px; }
.login-logo .logo-mark {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  font-size: 26px;
  margin: 0 auto 12px;
}
.login-logo h1 { font-size: 22px; }
.login-logo p { color: #999; font-size: 13px; margin-top: 6px; }
.login-form .form-group label { color: #666; }
.login-msg { color: #c0392b; font-size: 13px; min-height: 18px; margin-bottom: 6px; }
.login-tip { text-align: center; color: #bbb; font-size: 12px; margin-top: 16px; }
