/* ============================================================
   common.css — UmayShop 管理系统原型 共享样式基线（Ant Design Web 风格）
   来源：html-prototype-generator 技能 templates（按项目截图调整布局：
   白色顶栏含 Logo + 深色侧边栏分组菜单 + 卡片式设置表单）
   约定：8px 间距体系；#1677ff 主色；#ff4d4f 破坏色；禁 emoji；
   图标用 Lucide。
   ============================================================ */
:root {
  --primary: #1677ff;
  --primary-hover: #4096ff;
  --success: #52c41a;
  --warning: #faad14;
  --error: #ff4d4f;
  --text: rgba(0, 0, 0, 0.88);
  --text-secondary: rgba(0, 0, 0, 0.65);
  --text-tertiary: rgba(0, 0, 0, 0.45);
  --text-muted: rgba(0, 0, 0, 0.32);
  --border: #d9d9d9;
  --border-light: #f0f0f0;
  --bg-page: #f5f5f5;
  --bg-card: #ffffff;
  --radius: 8px;
  --radius-sm: 4px;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.06);
  --sidebar-w: 208px;
  --header-h: 56px;
  --space-xs: 4px; --space-sm: 8px; --space-md: 16px; --space-lg: 24px; --space-xl: 32px;
  --font-xs: 12px; --font-sm: 13px; --font-base: 14px; --font-lg: 16px; --font-xl: 20px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: var(--font-base); color: var(--text); background: var(--bg-page); line-height: 1.6;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }
.mono { font-family: "SF Mono", Menlo, Consolas, monospace; }

/* ---------- 工具类 ---------- */
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-center { display: flex; align-items: center; gap: 8px; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.bold { font-weight: 600; }

/* ---------- 顶栏（白色，含 Logo 与用户区） ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; height: var(--header-h);
  background: #fff; border-bottom: 1px solid var(--border-light);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 24px; z-index: 150;
}
.logo { display: flex; align-items: center; gap: 10px; color: var(--text); }
.logo-mark {
  width: 28px; height: 28px; border-radius: 6px; background: var(--primary); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.logo-mark i, .logo-mark svg { width: 16px; height: 16px; stroke-width: 2; }
.logo-name { font-size: 16px; font-weight: 600; }
.topbar-right { display: flex; align-items: center; gap: 20px; }
.topbar-user { color: var(--text-secondary); font-size: 14px; }
.topbar-link {
  display: inline-flex; align-items: center; gap: 4px; color: var(--text-secondary);
  font-size: 14px; cursor: pointer; background: none; border: none; padding: 0;
}
.topbar-link:hover { color: var(--text); }
.topbar-link i, .topbar-link svg { width: 14px; height: 14px; stroke-width: 2; }

/* ---------- 中后台布局 ---------- */
.sidebar {
  position: fixed; top: var(--header-h); bottom: 0; left: 0; width: var(--sidebar-w);
  background: #001529; color: rgba(255, 255, 255, 0.85);
  display: flex; flex-direction: column; overflow-y: auto; z-index: 100;
}
.menu { padding: 10px 8px; flex: 1; }
.menu-item {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px; margin-bottom: 2px;
  border-radius: 6px; color: rgba(255, 255, 255, 0.65); font-size: 14px;
  cursor: pointer; text-decoration: none; transition: background .2s, color .2s; white-space: nowrap;
}
.menu-item:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.menu-item.active { color: #fff; background: var(--primary); }
.menu-item.disabled { opacity: 0.45; cursor: not-allowed; }
.menu-item i, .menu-item svg { width: 14px; height: 14px; flex: none; stroke-width: 2; }
.menu-item .group-chev { margin-left: auto; transition: transform .2s; color: rgba(255, 255, 255, 0.45); }
.menu-group.open .group-chev { transform: rotate(180deg); }
.menu-sub { display: none; padding: 2px 0 6px; }
.menu-group.open .menu-sub { display: block; }
.menu-sub-item {
  display: flex; align-items: center; padding: 7px 12px 7px 34px; margin-bottom: 2px;
  border-radius: 6px; color: rgba(255, 255, 255, 0.65); font-size: 14px;
  cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .2s, color .2s;
}
.menu-sub-item:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.menu-sub-item.active { color: #fff; background: rgba(255, 255, 255, 0.16); font-weight: 500; }

.main { margin-left: var(--sidebar-w); min-height: 100vh; padding-top: var(--header-h); display: flex; flex-direction: column; }

/* 顶栏左侧：移动端汉堡按钮（桌面隐藏，同截图顶栏仅 Logo + 用户区） */
.header-collapse-btn {
  display: none; align-items: center; justify-content: center; width: 34px; height: 34px;
  border: none; background: none; border-radius: 6px; color: var(--text-secondary); cursor: pointer;
}
.header-collapse-btn i, .header-collapse-btn svg { width: 20px; height: 20px; stroke-width: 2; }

.header {
  height: var(--header-h); background: #fff; border-bottom: 1px solid var(--border-light);
  display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 24px;
  position: sticky; top: 0; z-index: 50;
}
.content { padding: 24px 28px; flex: 1; }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.breadcrumb { font-size: 13px; color: var(--text-tertiary); margin-bottom: 4px; }
.page-header h2 { font-size: 20px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: #e6f4ff; color: #1677ff; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; }

/* ---------- 卡片与指标 ---------- */
.card { background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 16px 24px 20px; }
.card + .card { margin-top: 16px; }
.card-title { font-size: 15px; font-weight: 600; margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; }
.metrics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 20px; }
.metric-card .metric-title { color: var(--text-secondary); font-size: 13px; }
.metric-card .metric-value { font-size: 28px; font-weight: 600; margin: 4px 0; }
.metric-card .metric-footer { color: var(--text-tertiary); font-size: 12px; }
.stat-filter-strip { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.stat-filter-item { padding: 5px 14px; border-radius: 16px; border: 1px solid var(--border); background: #fff; cursor: pointer; font-size: 13px; color: var(--text-secondary); }
.stat-filter-item.active { border-color: var(--primary); color: var(--primary); background: #e6f4ff; }

/* ---------- 设置页表单行（积分设置式：标签 + 控件 + 单位，同行排布） ---------- */
.cfg-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 0; }
.cfg-row.col { flex-direction: column; align-items: stretch; gap: 6px; }
.cfg-label { font-size: 14px; color: var(--text); min-width: 96px; }
.cfg-label.req::after { content: " *"; color: var(--error); }
.cfg-unit { font-size: 14px; color: var(--text); }
.rc { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text); cursor: pointer; }
.rc input { accent-color: var(--primary); width: 15px; height: 15px; margin: 0; cursor: pointer; }
.inp-s { width: 100px; } .inp-m { width: 180px; } .inp-xs { width: 84px; }
.card-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.cfg-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; }

/* ---------- 开关（Ant Switch 风格） ---------- */
.uc-switch { position: relative; display: inline-block; width: 44px; height: 22px; cursor: pointer; }
.uc-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.uc-track { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.25); border-radius: 11px; transition: background .2s; }
.uc-track::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px;
  background: #fff; border-radius: 50%; transition: transform .2s; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.uc-switch input:checked + .uc-track { background: var(--primary); }
.uc-switch input:checked + .uc-track::after { transform: translateX(22px); }

/* ---------- 筛选条 ---------- */
.filter-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; background: #fff; border: 1px solid var(--border-light); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 16px; }

/* ---------- 表格 ---------- */
.ant-table { width: 100%; border-collapse: collapse; font-size: 14px; background: #fff; }
.ant-table thead th { background: #fafafa; font-weight: 600; text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border-light); white-space: nowrap; }
.ant-table tbody td { padding: 10px 12px; border-bottom: 1px solid var(--border-light); vertical-align: middle; }
.ant-table tbody tr:hover { background: #fafafa; }
.ant-table td .form-input { width: 90px; }
.row-ok { color: var(--success); } .row-err { color: var(--error); }
.table-tools { display: flex; justify-content: flex-end; margin-top: 12px; }

/* ---------- 标签 ---------- */
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 4px; font-size: 12px; line-height: 20px; }
.tag-blue { color: #1677ff; background: #e6f4ff; }
.tag-green { color: #389e0d; background: #f6ffed; }
.tag-orange { color: #d46b08; background: #fff7e6; }
.tag-red { color: #cf1322; background: #fff1f0; }
.tag-gray { color: rgba(0,0,0,0.45); background: rgba(0,0,0,0.04); }

/* ---------- 按钮 ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid transparent; border-radius: 6px; padding: 6px 14px; font-size: 14px; cursor: pointer; text-decoration: none; transition: all .2s; }
.btn-primary { background: var(--primary); color: #fff; } .btn-primary:hover { background: var(--primary-hover); }
.btn-outline { background: #fff; border-color: var(--border); color: var(--text); } .btn-outline:hover { color: var(--primary); border-color: var(--primary); }
.btn-danger { background: var(--error); color: #fff; } .btn-danger:hover { opacity: .85; }
.btn-link { background: none; color: var(--primary); padding: 4px; } .btn-link:hover { color: var(--primary-hover); }
.btn-sm { padding: 3px 10px; font-size: 13px; } .btn-lg { padding: 9px 18px; font-size: 15px; }
.btn i, .btn svg { width: 14px; height: 14px; stroke-width: 2; }
.btn-dashed {
  background: #fff; border: 1px dashed var(--border); color: var(--text-secondary);
  justify-content: center; padding: 8px 14px; width: 100%;
}
.btn-dashed:hover { border-color: var(--primary); color: var(--primary); background: #f0f7ff; }

/* ---------- 表单 ---------- */
.form-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.form-group { display: flex; flex-direction: column; gap: 4px; min-width: 160px; }
.form-label { font-size: 13px; color: var(--text-secondary); }
.form-required::after { content: " *"; color: var(--error); }
.form-input, .form-select { height: 32px; padding: 0 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 14px; background: #fff; }
.form-input:focus, .form-select:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 2px rgba(22,119,255,.15); }
.form-input:disabled { background: #f5f5f5; color: var(--text-tertiary); }
.form-textarea {
  width: 100%; border: 1px solid var(--border); border-radius: 6px; padding: 8px 10px;
  font-size: 14px; font-family: inherit; line-height: 1.6; background: #fff; resize: vertical;
}
.form-textarea:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 2px rgba(22,119,255,.15); }
.form-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 20px; }

/* ---------- 弹窗（Modal） ---------- */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.45); display: flex; align-items: center; justify-content: center; z-index: 200; }
.modal { background: #fff; border-radius: var(--radius); width: min(520px, 92vw); max-height: 84vh; display: flex; flex-direction: column; box-shadow: 0 6px 24px rgba(0,0,0,.15); }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border-light); font-size: 16px; font-weight: 600; }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-footer { padding: 12px 20px; border-top: 1px solid var(--border-light); display: flex; justify-content: flex-end; gap: 10px; }

/* ---------- 抽屉（Drawer） ---------- */
.drawer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 200; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 92vw); background: #fff; display: flex; flex-direction: column; box-shadow: -6px 0 24px rgba(0,0,0,.12); }
.drawer-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border-light); font-size: 16px; font-weight: 600; }
.drawer-body { padding: 20px; overflow-y: auto; flex: 1; }
.drawer-footer { padding: 12px 20px; border-top: 1px solid var(--border-light); display: flex; justify-content: flex-end; gap: 10px; }

/* ---------- 批注抽屉内容 ---------- */
.note-list { margin: 0; padding: 0; list-style: none; }
.note-list li { display: flex; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--border-light); font-size: 13px; color: var(--text-secondary); line-height: 1.7; }
.note-list li:last-child { border-bottom: none; }
.note-list .note-anchor { color: var(--text-tertiary); font-size: 12px; white-space: nowrap; }

/* ---------- 进度条 / 时间线 / 步骤条 ---------- */
.progress-bar { height: 8px; background: var(--border-light); border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--primary); border-radius: 4px; }
.timeline { position: relative; padding-left: 20px; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--border-light); }
.timeline-item { position: relative; padding-bottom: 14px; }
.timeline-item::before { content: ""; position: absolute; left: -17px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); }
.stepper { display: flex; align-items: center; margin-bottom: 20px; }
.stepper-item { flex: 1; text-align: center; font-size: 13px; color: var(--text-tertiary); }
.stepper-item.active { color: var(--primary); font-weight: 600; }
.stepper-item.done { color: var(--success); }

/* ---------- 分页 / 空状态 ---------- */
.pagination { display: flex; gap: 6px; justify-content: flex-end; margin-top: 16px; }
.pagination span { min-width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; cursor: pointer; }
.pagination .active { border-color: var(--primary); color: var(--primary); }
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-tertiary); }
.empty-state .empty-icon { font-size: 40px; color: var(--text-muted); margin-bottom: 8px; }

/* ---------- Tab ---------- */
.tab-bar { display: flex; gap: 0; border-bottom: 1px solid var(--border-light); margin-bottom: 16px; }
.tab-item { padding: 10px 16px; cursor: pointer; color: var(--text-secondary); border-bottom: 2px solid transparent; font-size: 14px; }
.tab-item.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 500; }

/* ---------- i18n-input（多语言录入） ---------- */
.i18n-input { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.i18n-tabs { display: flex; background: #fafafa; border-bottom: 1px solid var(--border-light); }
.i18n-tab { border: none; background: none; padding: 6px 12px; font-size: 12px; color: var(--text-tertiary); cursor: pointer; border-bottom: 2px solid transparent; }
.i18n-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.i18n-required { color: var(--error); }
.i18n-panel { display: none; padding: 8px; }
.i18n-panel.active { display: block; }
.i18n-input .form-input { width: 100%; }
.i18n-input .form-textarea { border: none; border-radius: 0; }
.i18n-compact .i18n-tab { padding: 3px 8px; font-size: 11px; }
.i18n-compact .form-input { height: 28px; font-size: 13px; }

/* ---------- 提示条 / 页面规则芯片 ---------- */
.alert-strip { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: var(--radius); margin-bottom: 16px; font-size: 13px; }
.banner-success { background: #f6ffed; border: 1px solid #b7eb8f; color: #389e0d; }
.banner-warn { background: #fffbe6; border: 1px solid #ffe58f; color: #d46b08; }
.banner-info { background: #e6f4ff; border: 1px solid #91caff; color: #1677ff; }
.page-notes { margin-left: 8px; }
.page-note-chip { color: var(--text-tertiary); cursor: pointer; }

/* ---------- 场景切换（manual/automated/exception） ---------- */
.prototype-scenario { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-secondary); }
.scenario-panel[data-prototype-scenario] { display: none; }
.scenario-panel.active { display: block; }
.prototype-badge { background: #fff1f0; color: var(--error); font-size: 12px; padding: 2px 10px; border-radius: 12px; }

/* ---------- 无障碍焦点与动效 ---------- */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- 通用隐藏 ---------- */
[hidden] { display: none !important; }

/* ---------- 前台自适应布局（site，预留） ---------- */
.site-header { background: #fff; border-bottom: 1px solid var(--border-light); position: sticky; top: 0; z-index: 90; }
.site-header-inner { max-width: 1200px; margin: 0 auto; padding: 0 20px; height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.site-brand { font-size: 18px; font-weight: 700; color: var(--text); }
.site-nav { display: flex; gap: 4px; }
.site-nav a { padding: 8px 14px; color: var(--text-secondary); border-radius: 6px; }
.site-nav a:hover, .site-nav a.active { color: var(--primary); background: #e6f4ff; }
.nav-toggle { display: none; border: none; background: none; font-size: 22px; cursor: pointer; color: var(--text); }
.site-main { max-width: 1200px; margin: 0 auto; padding: 24px 20px 60px; min-height: 70vh; }
.site-hero { background: linear-gradient(135deg, #e6f4ff, #ffffff); border-radius: 16px; padding: 48px 32px; margin-bottom: 32px; }
.site-hero h1 { font-size: 32px; margin-bottom: 12px; }
.site-hero p { color: var(--text-secondary); font-size: 16px; max-width: 640px; }
.site-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.site-footer { background: #001529; color: rgba(255,255,255,0.65); padding: 28px 20px; text-align: center; font-size: 13px; }

/* ---------- 响应式（中后台移动端：侧边栏抽屉化） ---------- */
@media (max-width: 768px) {
  .header-collapse-btn { display: inline-flex; }
  .topbar .logo-name { display: none; }
  .topbar { padding: 0 16px; }
  .sidebar { width: 224px; transform: translateX(-100%); transition: transform .25s; }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .content { padding: 16px; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .ant-table { display: block; overflow-x: auto; white-space: nowrap; }
  .cfg-grid2 { grid-template-columns: 1fr; }
}

/* ---------- 用户下拉菜单（User Dropdown，基本组件） ---------- */
.user-menu { position: relative; }
.user-menu-trigger { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 4px 8px; border-radius: 6px; color: var(--text-secondary); border: 1px solid transparent; }
.user-menu-trigger:hover { background: var(--bg-page); }
.user-menu-trigger .chev, .user-menu-trigger svg.chev { transition: transform .2s; color: var(--text-tertiary); width: 14px; height: 14px; }
.user-menu.open .user-menu-trigger .chev { transform: rotate(180deg); }
.user-menu.open .user-dropdown { display: block; }
.user-dropdown {
  display: none; position: absolute; top: calc(100% + 6px); right: 0; min-width: 150px;
  background: var(--bg-card); border: 1px solid var(--border-light); border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0,0,0,.12); padding: 6px; z-index: 300;
}
.user-dropdown .dropdown-header { padding: 8px 12px 8px; border-bottom: 1px solid var(--border-light); margin-bottom: 6px; }
.user-dropdown .u-name { font-weight: 600; font-size: 14px; }
.user-dropdown .u-role { font-size: 12px; color: var(--text-tertiary); margin-top: 2px; }
.user-dropdown .dropdown-item {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 12px;
  border: none; background: none; border-radius: 6px; font-size: 14px;
  color: var(--text); cursor: pointer; text-align: left;
}
.user-dropdown .dropdown-item:hover { background: #f5f5f5; }
.user-dropdown .dropdown-item i, .user-dropdown .dropdown-item svg { width: 16px; height: 16px; color: var(--text-tertiary); }
.user-dropdown .dropdown-item.danger { color: var(--error); }
.user-dropdown .dropdown-item.danger:hover { background: #fff1f0; }
.user-dropdown .dropdown-divider { height: 1px; background: var(--border-light); margin: 6px 4px; }


/* ---------- 原型多规则排期 ---------- */
.scheduled-rule-list { display: grid; gap: 16px; }
.scheduled-rule-card { background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 16px 24px 20px; }
.scheduled-rule-card > .card { box-shadow: none; border: 0; border-radius: 0; padding: 0; }
.scheduled-rule-card > .card + .card { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border-light); }
.rule-card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--border-light); }
.rule-card-heading { display: flex; align-items: center; gap: 10px; min-width: 0; }
.rule-card-heading h3 { font-size: 16px; white-space: nowrap; }
.rule-period { color: var(--text-secondary); font-size: var(--font-sm); white-space: nowrap; }
.rule-audit-inline { color: var(--text-tertiary); font-size: 12px; }
.rule-card-heading .tag { flex: none; }
.rule-card-actions { display: flex; align-items: center; gap: 8px; }
.rule-card-actions .btn[disabled] { color: var(--text-muted); cursor: not-allowed; }
.rule-list-toolbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.rule-list-toolbar > div { min-width: 0; }
.rule-list-toolbar strong { margin-right: 10px; }
.rule-count { color: var(--text-tertiary); font-size: var(--font-sm); }
.rule-list-toolbar .form-help { margin: 4px 0 0; max-width: 760px; }
.period-overlap-warning { display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; padding: 9px 12px; border: 1px solid rgba(255, 77, 79, .35); border-radius: var(--radius-sm); background: rgba(255, 77, 79, .06); color: var(--error); font-size: var(--font-sm); line-height: 1.5; }
.period-overlap-warning svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.period-overlap-warning[hidden] { display: none; }
@media (max-width: 768px) {
  .scheduled-rule-card { padding: 14px 16px 18px; }
  .rule-list-toolbar { flex-direction: column; }
  .rule-list-toolbar .btn { align-self: flex-start; }
  .rule-card-header { align-items: flex-start; }
  .rule-card-heading { flex-wrap: wrap; }
}

/* ---------- 活动 Banner 背景图配置 ---------- */
.banner-config-wrap { display: grid; gap: 20px; }
.banner-channel-box {
  background: var(--bg-body, #f8fafc);
  border: 1px solid var(--border-light, #e2e8f0);
  border-radius: var(--radius, 8px);
  padding: 16px 18px 20px;
}
.banner-channel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light, #e2e8f0);
}
.banner-channel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text, #1e293b);
}
.banner-channel-desc {
  font-size: 12px;
  color: var(--text-tertiary, #64748b);
}
.banner-items-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
@media (max-width: 900px) {
  .banner-items-grid { grid-template-columns: 1fr; }
}
.banner-item-card {
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border-light, #e2e8f0);
  border-radius: 8px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.banner-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.banner-item-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
}
.banner-item-label svg { width: 16px; height: 16px; color: var(--primary, #0d9488); }
.banner-spec-tag {
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 4px;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
}
.banner-preview-frame {
  position: relative;
  width: 100%;
  height: 140px;
  border-radius: 6px;
  overflow: hidden;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.banner-preview-frame.has-image {
  border-style: solid;
  border-color: #e2e8f0;
  background: #0f172a;
}
.banner-preview-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.banner-empty-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: #94a3b8;
  font-size: 12px;
  user-select: none;
}
.banner-empty-placeholder svg { width: 28px; height: 28px; stroke-width: 1.5; color: #cbd5e1; }
.banner-actions-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.banner-actions-bar .btn {
  padding: 4px 10px;
  font-size: 12px;
  height: 28px;
}
.banner-help-tip {
  font-size: 11px;
  color: var(--text-tertiary, #64748b);
  line-height: 1.5;
  margin-top: -4px;
}

