/* ========== 店铺管理 (Shop) 模块样式 ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --s-blue: #1D4ED8;
  --s-blue-hover: #335FDC;
  --s-blue-light: rgba(79,110,247,0.08);
  --s-bg: #F7F8FA;
  --s-surface: #FFFFFF;
  --s-text: #1A1D26;
  --s-text-2: #4A5068;
  --s-text-3: #8B90A0;
  --s-border: #E8ECF0;
  --s-border-light: #F0F2F5;
  --s-success: #22C55E;
  --s-warn: #F59E0B;
  --s-error: #EF4444;
  --s-shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --s-shadow-md: 0 2px 8px rgba(0,0,0,0.06);
  --s-radius: 10px;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
  background: #FFFFFF;
  color: var(--s-text);
  line-height: 1.5;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
.shop-main {
  margin-left: 244px;
  padding: 92px 36px 60px; /* 60 topbar + 32 顶部呼吸 */
  transition: margin-left 0.3s ease;
}
.sidebar.collapsed ~ .shop-main,
.shop-main.sidebar-collapsed { margin-left: 100px; }

.shop-page-title {
  font-family: var(--edy-font-display);
  font-size: 20px; font-weight: 500; color: #1A1D26;
  letter-spacing: normal; line-height: 1.2;
  margin: 0 0 16px;
}
.shop-page-desc { font-size: 14px; color: #4b5563; margin: 0 0 28px; }

/* ========== 卡片 ========== */
.shop-card {
  background: var(--s-surface);
  margin-top: 16px;
  margin-bottom: 16px;
  overflow: hidden;
}
.shop-card-head {
  padding: 16px 0;
  border-bottom: 1px solid var(--s-border-light);
  display: flex; align-items: center; justify-content: space-between;
}
.shop-card-title {
  font-size:14px; font-weight: 600; color: var(--s-text);
  display: flex; align-items: center; gap: 8px;
}
.shop-card-title::before {
  content: ''; width: 3px; height: 16px; background: var(--s-blue); border-radius: 2px;
}
.shop-card-body { margin-top: 16px; }

/* ========== 信息行 (label - value) ========== */
.info-grid { display: grid; grid-template-columns: repeat(2, 1fr); column-gap: 32px; row-gap: 16px; }
.info-row { display: flex; gap: 12px; min-width: 0; }
.info-row .label { color: var(--s-text-3); width: 110px; flex-shrink: 0; }
.info-row .value { color: var(--s-text); flex: 1; min-width: 0; word-break: break-all; }
.info-row .value.muted { color: var(--s-text-3); }

/* ========== 按钮 ========== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 32px; min-width: 60px; padding: 4px 12px; line-height: 22px;
  border-radius: 4px;
  font-size: 14px; font-weight: 500; cursor: pointer;
  border: 1px solid transparent; transition: all 0.2s; font-family: inherit; text-decoration: none;
  box-sizing: border-box;
}
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-primary { color: #fff; }
.btn-primary:disabled { background: #CBD5E1; cursor: not-allowed; box-shadow: none; }
.btn-secondary { background: #fff; color: var(--s-text-2); border-color: var(--s-border); }
.btn-secondary:hover { color: var(--s-blue); border-color: var(--s-blue); }
.btn-danger { background: #fff; color: var(--s-error); border-color: #FCA5A5; }
.btn-danger:hover { background: #FEF2F2; }
.btn-link { background: transparent; color: var(--s-blue); padding: 4px 0; }
.btn-link:hover { text-decoration: underline; }

/* ========== 标签 ========== */
.tag { display: inline-flex; align-items: center; padding: 2px 10px; font-size: 12px; border-radius: 10px; line-height: 18px; }
.tag-success { background: #DCFCE7; color: #15803D; }
.tag-warn { background: #FEF3C7; color: #B45309; }
.tag-error { background: #FEE2E2; color: #B91C1C; }
.tag-info { background: var(--s-blue-light); color: var(--s-blue); }
.tag-default { background: #F1F5F9; color: var(--s-text-2); }

/* ========== 表格 ========== */
.shop-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.shop-table thead th {
  background: #F9FAFB; padding: 12px 16px; text-align: left;
  font-weight: 500; color: var(--s-text); font-size: 13px; border-bottom: 1px solid #F3F4F6;
}
.shop-table tbody td {
  padding: 14px 16px; border-bottom: 1px solid var(--s-border-light); color: var(--s-text);
  vertical-align: middle; font-size: 13px;
}
.shop-table tbody tr:hover { background: #EFF6FF; }
.shop-table tbody tr:nth-child(even) { background: transparent; }
.shop-table tbody tr:nth-child(even):hover { background: #EFF6FF; }
.shop-table .table-actions a { color: var(--s-blue); margin-right: 12px; text-decoration: none; }
.shop-table .table-actions a:hover { text-decoration: underline; }

/* ========== 表单 ========== */
.form-row { display: flex; gap: 16px; margin-bottom: 16px; }
.form-item { flex: 1; min-width: 0; }
.form-label { display: block; font-size: 13px; color: var(--s-text-2); margin-bottom: 6px; }
.form-label .req { color: var(--s-error); margin-right: 2px; }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 8px 12px; border: 1px solid var(--s-border); border-radius: 6px;
  font-size: 13px; font-family: inherit; background: #fff; color: var(--s-text);
  transition: border-color 0.2s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none; border-color: var(--s-blue); box-shadow: 0 0 0 3px var(--s-blue-light);
}
.form-input.is-error, .form-select.is-error, .form-textarea.is-error { border-color: var(--s-error); }
.form-textarea { resize: vertical; min-height: 80px; }
.form-error { display: block; color: var(--s-error); font-size: 12px; margin-top: 4px; min-height: 16px; }
.form-hint { color: var(--s-text-3); font-size: 12px; margin-top: 4px; }
.form-actions { display: flex; gap: 12px; justify-content: flex-end; padding: 16px 24px; border-top: 1px solid var(--s-border-light); background: #fff; }
.form-actions.left { justify-content: flex-start; }

/* ========== 空状态 ========== */
.empty-state {
  text-align: center; padding: 60px 20px; color: var(--s-text-3);
}
.empty-state .empty-icon {
  width: 64px; height: 64px; border-radius: 50%; background: #F1F5F9;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 12px; color: #CBD5E1; font-size: 28px;
}
.empty-state .empty-title { font-size: 14px; color: var(--s-text-2); margin-bottom: 6px; }
.empty-state .empty-tip { font-size: 12px; color: var(--s-text-3); margin-bottom: 14px; }

/* ========== Tabs ========== */
.shop-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--s-border-light); padding: 0 24px; background: #fff; }
.shop-tab {
  padding: 12px 16px; cursor: pointer; color: var(--s-text-2); font-size: 13px; font-weight: 500;
  border-bottom: 2px solid transparent; margin-bottom: -1px; user-select: none;
}
.shop-tab:hover { color: var(--s-blue); }
.shop-tab.active { color: var(--s-blue); border-bottom-color: var(--s-blue); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ========== 工具条 ========== */
.toolbar { display: flex; align-items: center; gap: 12px; padding: 0 0 14px; background: #fff; border-bottom: 1px solid var(--s-border-light); flex-wrap: wrap; }
.toolbar .spacer { flex: 1; }
.toolbar .search-box { display: inline-flex; align-items: stretch; gap: 8px; height: 32px; }
.toolbar .search-box input { width: 220px; height: 100%; padding: 0 12px; font-size: 13px; background: #fff; border: 1px solid var(--s-border); border-radius: 4px; outline: none; }
.toolbar .search-box input:focus { border-color: var(--edy-blue); }
.toolbar .search-box input::placeholder { color: #9CA3AF; }
.toolbar .search-box .search-btn { border: none; background: var(--edy-blue); color: #fff; cursor: pointer; font-size: 13px; padding: 0 16px; border-radius: 4px; margin: 0; height: 100%; flex-shrink: 0; }
.toolbar .search-box .search-btn:hover { background: var(--edy-blue-hover); }

/* ========== 步骤条 ========== */
.steps { display: flex; align-items: center; padding: 24px 24px 12px; gap: 8px; }
.step { display: flex; align-items: center; gap: 8px; color: var(--s-text-3); font-size: 13px; }
.step .dot {
  width: 24px; height: 24px; border-radius: 50%;
  background: #E2E8F0; color: #fff; display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px;
}
.step.active { color: var(--s-blue); }
.step.active .dot { background: var(--s-blue); }
.step.done { color: var(--s-success); }
.step.done .dot { background: var(--s-success); }
.step-line { flex: 1; height: 1px; background: var(--s-border); }

/* ========== 店铺信息 顶部 7 段 tab（由 _info_tabs.js 注入） ========== */
.info-tabs { display: flex; align-items: center; gap: 0; border-bottom: 1px solid #EEEEEE; margin-bottom: 0; }
.info-tab { position: relative; padding: 12px 22px 14px; font-size: 14px; color: #4b5563; background: none; border: none; cursor: pointer; transition: color 0.2s; white-space: nowrap; font-family: inherit; text-decoration: none; }
.info-tab:first-child { padding-left: 0; }
.info-tab:hover { color: var(--edy-blue); }
.info-tab.active { color: var(--edy-blue); font-weight: 600; }
.info-tab.active::after { content: ''; position: absolute; bottom: -1px; left: 22px; right: 22px; height: 2px; background: var(--edy-blue); border-radius: 1px; }
.info-tab:first-child.active::after { left: 0; }

/* ========== 提示条 ========== */
.alert { padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; font-size: 13px; display: flex; gap: 10px; align-items: flex-start; }
.alert-info { background: #EFF6FF; color: #1E40AF; border: 1px solid #BFDBFE; }
.alert-warn { background: #FFFBEB; color: #92400E; border: 1px solid #FDE68A; }
.alert-error { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }

/* ========== Modal ========== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(15,23,42,0.5);
  display: none; align-items: center; justify-content: center; z-index: 1000;
}
.modal-overlay.show { display: flex; }
.modal {
  background: #fff; border-radius: 10px; min-width: 480px; max-width: 720px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.2); overflow: hidden;
}
.modal-head { padding: 16px 20px; border-bottom: 1px solid var(--s-border-light); display: flex; justify-content: space-between; align-items: center; }
.modal-head .modal-title { font-size:14px; font-weight: 600; }
.modal-head .modal-close { border: 0; background: none; font-size: 22px; color: var(--s-text-3); cursor: pointer; }
.modal-body { padding: 20px; max-height: 70vh; overflow-y: auto; }
.modal-foot { padding: 12px 20px; border-top: 1px solid var(--s-border-light); display: flex; gap: 10px; justify-content: flex-end; }

/* ========== Toast ========== */
.toast-container { position: fixed; top: 24px; left: 50%; transform: translateX(-50%); z-index: 2000; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: #1E293B; color: #fff; padding: 10px 18px; border-radius: 6px;
  font-size: 13px; box-shadow: 0 4px 12px rgba(0,0,0,0.2); animation: toastIn 0.2s ease;
}
.toast.toast-success { background: var(--s-success); }
.toast.toast-error { background: var(--s-error); }
@keyframes toastIn { from { transform: translateY(-12px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ========== 子标题 ========== */
.section-title { font-size: 14px; font-weight: 600; color: var(--s-text); margin: 0 0 12px; padding-left: 10px; border-left: 3px solid var(--s-blue); }

/* ========== 店铺一级菜单 active 图标修正 ==========
   全局规则会给 active 图标 fill 蓝 + 子节点 stroke 白，
   店面图标主要由开放线条组成，填充后会变成一坨小色块。
   这里改为：保持线稿描边、用主题蓝、稍放大，外轮廓清晰。
   注：用 active.shop-rail 类匹配，避免中文属性选择器在不同编码下解析异常。 */
.sidebar .rail-item.active.shop-rail .rail-icon svg {
  fill: none !important;
  stroke-width: 1.5 !important;
}
.sidebar .rail-item.active.shop-rail .rail-icon svg > * {
  stroke: #1D4ED8 !important;
  fill: none !important;
}
/* 店身（最后一条路径）改为实心 */
.sidebar .rail-item.active.shop-rail .rail-icon svg > :last-child {
  fill: #1D4ED8 !important;
}

/* ========== 仅响应式微调 ========== */
@media (max-width: 1100px) {
  .info-grid { grid-template-columns: 1fr; }
}
