/* ==========================================================================
 * 共享工单系统 · 公共样式基座
 *   变量：配色 / 间距 / 圆角 / 阴影
 *   组件：布局（侧栏+顶栏+内容）、卡片、表格、表单、按钮、标签、
 *         弹窗、Toast、分页、空态、图表容器
 *   说明：纯 CSS，无任何外部依赖；不引用 CDN。
 *   主题：浅色（与 IDE 主题一致）
 * ========================================================================== */

:root {
  /* 主色 —— 品牌蓝 */
  --brand: #2b6cf6;
  --brand-dark: #1d54d4;
  --brand-light: #eaf1ff;
  --brand-soft: #f4f8ff;

  /* 语义色 */
  --success: #12a150;
  --success-bg: #e8f7ef;
  --warning: #e8912d;
  --warning-bg: #fdf3e5;
  --danger: #e0483d;
  --danger-bg: #fdeceb;
  --purple: #7c5cf0;
  --purple-bg: #f0ecff;
  --cyan: #17a2b8;
  --cyan-bg: #e6f6f9;

  /* 中性色 */
  --text: #1f2329;
  --text-2: #4e5969;
  --text-3: #86909c;
  --text-4: #c9cdd4;
  --bg: #f5f6f8;
  --bg-2: #fafbfc;
  --card: #ffffff;
  --line: #e5e6eb;
  --line-2: #f0f1f3;

  /* 尺寸 */
  --radius: 8px;
  --radius-sm: 6px;
  --radius-lg: 12px;
  --sb-w: 208px;
  --sub-w: 176px;
  --top-h: 56px;

  --shadow: 0 1px 3px rgba(31, 35, 41, .06), 0 1px 2px rgba(31, 35, 41, .04);
  --shadow-lg: 0 8px 28px rgba(31, 35, 41, .12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { opacity: .85; }

button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }

/* 滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--text-4); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }
::-webkit-scrollbar-track { background: transparent; }

/* ============================ 布局 ============================ */

.app {
  display: flex;
  flex-wrap: nowrap;
  height: 100vh;
  overflow: hidden;
}

.sidebar {
  width: var(--sb-w);
  flex: 0 0 var(--sb-w);
  background: #1d2129;
  color: #c8ccd4;
  display: flex;
  flex-direction: column;
  transition: width .2s, flex-basis .2s;
}

.sb-brand {
  height: var(--top-h);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  flex: 0 0 auto;
}

.sb-logo {
  width: 28px; height: 28px;
  flex: 0 0 28px;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--brand), #6a4bf5);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
}

.sb-name {
  font-size: 14px; font-weight: 600; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.sb-menu {
  flex: 1;
  overflow-y: auto;
  padding: 10px 8px;
}

.sb-menu::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); }

.sb-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13.5px;
  color: #c8ccd4;
  margin-bottom: 2px;
  transition: background .15s, color .15s;
  white-space: nowrap;
}

.sb-item:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.sb-item.active { background: var(--brand); color: #fff; font-weight: 500; }
.sb-item .ico { width: 16px; height: 16px; flex: 0 0 16px; }
.sb-item .sb-badge {
  margin-left: auto;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  padding: 0 6px;
  border-radius: 9px;
  min-width: 18px;
  text-align: center;
  line-height: 18px;
}

.sb-foot {
  padding: 10px 16px;
  border-top: 1px solid rgba(255, 255, 255, .07);
  font-size: 12px;
  color: #6b7280;
  flex: 0 0 auto;
}

.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: var(--top-h);
  flex: 0 0 var(--top-h);
  background: var(--card);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  gap: 16px;
}

.tb-left { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.tb-title { font-size: 16px; font-weight: 600; white-space: nowrap; }
.tb-crumb { font-size: 12.5px; color: var(--text-3); white-space: nowrap; }

.tb-right { display: flex; align-items: center; gap: 14px; }

.tb-search {
  display: flex;
  align-items: center;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.tb-search input {
  border: 0; background: transparent; outline: none;
  padding: 6px 10px; width: 210px; font-size: 13px;
}
.tb-search button {
  border: 0; background: var(--brand); color: #fff;
  padding: 6px 12px; cursor: pointer; font-size: 13px;
}
.tb-search button:hover { background: var(--brand-dark); }

.icon-btn {
  width: 32px; height: 32px;
  border: 0; background: transparent;
  border-radius: var(--radius-sm);
  cursor: pointer; position: relative;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-2);
}
.icon-btn:hover { background: var(--bg); }
.icon-btn .ico { width: 17px; height: 17px; }
.icon-btn .dot {
  position: absolute; top: 5px; right: 5px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--danger); border: 1.5px solid #fff;
}

.tb-user {
  display: flex; align-items: center; gap: 8px;
  cursor: pointer; position: relative; padding: 4px 8px;
  border-radius: var(--radius-sm);
}
.tb-user:hover { background: var(--bg); }
.tb-user .avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; flex: 0 0 28px;
}
.tb-user .uname { font-size: 13px; font-weight: 500; }
.tb-user .sname { font-size: 11.5px; color: var(--text-3); display: block; line-height: 1.2; }

.dropdown {
  position: absolute; top: 100%; right: 0;
  margin-top: 6px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 150px;
  padding: 4px;
  z-index: 60;
}
.dropdown button {
  display: block; width: 100%;
  border: 0; background: transparent;
  text-align: left; padding: 8px 12px;
  border-radius: var(--radius-sm); cursor: pointer; font-size: 13px;
}
.dropdown button:hover { background: var(--bg-2); }
.dropdown .sep { height: 1px; background: var(--line-2); margin: 4px 0; }

/* 二级菜单 + 内容 */
.body {
  flex: 1;
  display: flex;
  min-height: 0;
}

.subnav {
  width: var(--sub-w);
  flex: 0 0 var(--sub-w);
  background: var(--card);
  border-right: 1px solid var(--line);
  overflow-y: auto;
  padding: 12px 10px;
}
.subnav.hide { display: none; }

.subnav-title {
  font-size: 11.5px; color: var(--text-3);
  padding: 4px 10px 8px; letter-spacing: .5px;
}

.sn-item {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer; font-size: 13px;
  color: var(--text-2);
  margin-bottom: 2px;
  display: flex; align-items: center; gap: 8px;
}
.sn-item:hover { background: var(--bg-2); color: var(--text); }
.sn-item.active { background: var(--brand-light); color: var(--brand); font-weight: 500; }

.content {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  padding: 18px 20px 40px;
}

.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 14px; }
.tabs:empty { display: none; }
.tab {
  padding: 5px 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  font-size: 12.5px;
  cursor: pointer;
  display: flex; align-items: center; gap: 6px;
}
.tab.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.tab .tab-x { opacity: .6; }
.tab .tab-x:hover { opacity: 1; }

/* ============================ 卡片 ============================ */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.card-hd {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line-2);
}
.card-hd h3 { font-size: 14px; font-weight: 600; }
.card-hd .hd-sub { font-size: 12px; color: var(--text-3); font-weight: 400; }
.card-bd { padding: 16px; }
.card-bd.np { padding: 0; }

/* 统计卡 */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.stat-card .sc-label {
  font-size: 12.5px; color: var(--text-3);
  display: flex; align-items: center; gap: 6px;
}
.stat-card .sc-label .ico { width: 14px; height: 14px; }
.stat-card .sc-value {
  font-size: 23px; font-weight: 650; margin-top: 6px;
  letter-spacing: -.3px; line-height: 1.25;
}
.stat-card .sc-value small { font-size: 13px; font-weight: 400; color: var(--text-3); margin-left: 2px; }
.stat-card .sc-foot { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.stat-card.accent { border-left: 3px solid var(--brand); }
.stat-card.ok { border-left: 3px solid var(--success); }
.stat-card.warn { border-left: 3px solid var(--warning); }
.stat-card.danger { border-left: 3px solid var(--danger); }
.stat-card.purple { border-left: 3px solid var(--purple); }
.stat-card.cyan { border-left: 3px solid var(--cyan); }

/* ============================ 表格 ============================ */

.tbl-wrap { overflow-x: auto; }

.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
/* ★ 列多时不要把中文压成竖排单字。
   症状：13 列的工单列表里，「客户」列被压到 ~20px，
   中文没有断词点 → 一个字一行，整列竖着排，极难阅读。
   做法：给单元格设 min-width，让内容撑开而不是被压扁；
   宽度不够时由 .tbl-wrap 出横向滚动条，而不是把字挤成竖排。
   （用 table-layout:auto + min-width，而非 fixed —— fixed 会等分宽度，
     同样会让窄列断字。） */
.tbl th,
.tbl td { min-width: 72px; }

/* 窄屏：让表格保持最小宽度，横向滚动而不是压缩换行 */
@media (max-width: 1200px) {
  .tbl { min-width: max-content; }
}

.tbl th {
  text-align: left;
  padding: 10px 12px;
  background: var(--bg-2);
  color: var(--text-2);
  font-weight: 600;
  font-size: 12.5px;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
.tbl td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-2);
  vertical-align: middle;
}
.tbl tbody tr:hover { background: var(--bg-2); }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .td-act { white-space: nowrap; }
.tbl .td-act a, .tbl .td-act button {
  color: var(--brand); cursor: pointer; border: 0; background: none;
  padding: 0; margin-right: 10px; font-size: 12.5px;
}
.tbl .td-act a:hover, .tbl .td-act button:hover { text-decoration: underline; }
.tbl .td-act .danger { color: var(--danger); }
.tbl .td-num { font-variant-numeric: tabular-nums; }
.tbl .td-center { text-align: center; }
.tbl .td-nowrap { white-space: nowrap; }

.link-cell { color: var(--brand); cursor: pointer; }
.link-cell:hover { text-decoration: underline; }

/* 工具条 */
.toolbar {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.toolbar .spacer { flex: 1; }

/* ============================ 表单 ============================ */

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px 16px;
}

.field { display: flex; flex-direction: column; gap: 5px; }
.field.full { grid-column: 1 / -1; }
.field > label {
  font-size: 12.5px; color: var(--text-2); font-weight: 500;
}
.field > label .req { color: var(--danger); margin-left: 2px; }
.field .hint { font-size: 11.5px; color: var(--text-3); }

.ipt, select.ipt, textarea.ipt {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  background: var(--card);
  outline: none;
  font-size: 13px;
  transition: border-color .15s, box-shadow .15s;
}
.ipt:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(43, 108, 246, .1);
}
.ipt:disabled, .ipt[readonly] { background: var(--bg-2); color: var(--text-3); cursor: not-allowed; }
textarea.ipt { resize: vertical; min-height: 72px; line-height: 1.6; }
select.ipt { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2386909c'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; background-size: 16px; padding-right: 28px; }

.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.switch input { display: none; }
.switch .track {
  width: 38px; height: 21px; border-radius: 11px;
  background: var(--text-4); position: relative; transition: background .2s;
  flex: 0 0 38px;
}
.switch .track::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 17px; height: 17px; border-radius: 50%;
  background: #fff; transition: transform .2s;
  box-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.switch input:checked + .track { background: var(--brand); }
.switch input:checked + .track::after { transform: translateX(17px); }
.switch .sw-label { font-size: 13px; color: var(--text-2); }

/* 复选组 */
.check-group { display: flex; flex-wrap: wrap; gap: 8px; }
.check-item {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  user-select: none;
  transition: all .15s;
}
.check-item:hover { border-color: var(--brand); }
.check-item.on { border-color: var(--brand); background: var(--brand-light); color: var(--brand); }
.check-item input { display: none; }

/* ============================ 按钮 ============================ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  white-space: nowrap;
  transition: all .15s;
}
.btn:hover { border-color: var(--brand); color: var(--brand); }
.btn:active { transform: translateY(.5px); }
.btn .ico { width: 14px; height: 14px; }

.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }

.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #c93b31; border-color: #c93b31; color: #fff; }

.btn-success { background: var(--success); border-color: var(--success); color: #fff; }
.btn-success:hover { background: #0d8a45; border-color: #0d8a45; color: #fff; }

.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--bg); border-color: transparent; }

.btn-sm { padding: 3px 9px; font-size: 12px; }
.btn-lg { padding: 9px 20px; font-size: 14px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; pointer-events: none; }

/* ============================ 标签 ============================ */

.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 1px 8px;
  border-radius: 4px;
  font-size: 12px;
  line-height: 18px;
  background: var(--bg);
  color: var(--text-2);
  white-space: nowrap;
}
.tag .tag-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.tag-green { background: var(--success-bg); color: var(--success); }
.tag-orange { background: var(--warning-bg); color: var(--warning); }
.tag-red { background: var(--danger-bg); color: var(--danger); }
.tag-blue { background: var(--brand-light); color: var(--brand); }
.tag-purple { background: var(--purple-bg); color: var(--purple); }
.tag-cyan { background: var(--cyan-bg); color: var(--cyan); }
.tag-gray { background: var(--bg); color: var(--text-3); }

/* ============================ 分页 ============================ */

.pager {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 8px; padding: 12px 16px;
  border-top: 1px solid var(--line-2);
  font-size: 12.5px; color: var(--text-2);
  flex-wrap: wrap;
}
.pager .pg-total { margin-right: auto; color: var(--text-3); }
.pager button {
  min-width: 28px; height: 28px;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: var(--radius-sm);
  cursor: pointer; padding: 0 8px; font-size: 12.5px;
}
.pager button:hover:not([disabled]) { border-color: var(--brand); color: var(--brand); }
.pager button.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.pager button[disabled] { opacity: .45; cursor: not-allowed; }

/* ============================ 弹窗 ============================ */

.modal-mask {
  position: fixed; inset: 0;
  background: rgba(23, 26, 31, .45);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  padding: 24px;
}
/* ★ 遮罩类必须配 [hidden] 兜底：hidden 属性来自 UA 样式表（display:none）权重极低，
     会被 .modal-mask{display:flex} 盖掉 → 「隐藏状态」的遮罩照样显示，
     登录页一打开就压着空弹窗，登录按钮点不到。 */
[hidden] { display: none !important; }

.modal {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 520px;
  max-width: 100%;
  max-height: 88vh;
  display: flex; flex-direction: column;
  animation: modalIn .18s ease-out;
}
.modal.modal-sm { width: 400px; }
.modal.modal-lg { width: 760px; }
.modal.modal-xl { width: 960px; }

@keyframes modalIn {
  from { opacity: 0; transform: translateY(-12px) scale(.98); }
  to { opacity: 1; transform: none; }
}

.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 20px;
  border-bottom: 1px solid var(--line-2);
  flex: 0 0 auto;
}
.modal-title { font-size: 15px; font-weight: 600; }
.modal-close {
  cursor: pointer; font-size: 22px; line-height: 1;
  color: var(--text-3); width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
}
.modal-close:hover { background: var(--bg); color: var(--text); }

.modal-body { padding: 20px; overflow-y: auto; flex: 1; }
.modal-foot {
  padding: 12px 20px;
  border-top: 1px solid var(--line-2);
  display: flex; justify-content: flex-end; gap: 10px;
  flex: 0 0 auto;
}

/* ============================ Toast ============================ */

.toast-wrap {
  position: fixed; top: 18px; left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  display: flex; flex-direction: column; gap: 8px;
  align-items: center;
  pointer-events: none;
}
.toast {
  background: #1f2329;
  color: #fff;
  padding: 9px 18px;
  border-radius: var(--radius);
  font-size: 13px;
  box-shadow: var(--shadow-lg);
  animation: toastIn .2s ease-out;
  max-width: 80vw;
}
.toast.ok { background: var(--success); }
.toast.err { background: var(--danger); }
.toast.warn { background: var(--warning); }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: none; }
}

/* ============================ 其它 ============================ */

.empty {
  padding: 52px 20px;
  text-align: center;
  color: var(--text-3);
  font-size: 13px;
}
.empty .ico { width: 40px; height: 40px; opacity: .3; margin-bottom: 10px; }

.loading { padding: 40px; text-align: center; color: var(--text-3); font-size: 13px; }

.txt-3 { color: var(--text-3); }
.txt-2 { color: var(--text-2); }
.txt-danger { color: var(--danger); }
.txt-success { color: var(--success); }
.txt-warning { color: var(--warning); }
.txt-brand { color: var(--brand); }
.txt-bold { font-weight: 600; }
.txt-sm { font-size: 12px; }
.txt-lg { font-size: 16px; }
.txt-right { text-align: right; }
.txt-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; gap: 8px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.flex-wrap { flex-wrap: wrap; }
.gap-4 { gap: 4px; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.money { font-variant-numeric: tabular-nums; font-weight: 600; }
.money-lg { font-size: 20px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 1100px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* 详情列表 */
.detail-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px 20px; }
.d-item { display: flex; gap: 8px; font-size: 13px; align-items: baseline; }
.d-item .d-label { color: var(--text-3); flex: 0 0 76px; }
.d-item .d-val { color: var(--text); word-break: break-all; }

/* 时间线 */
.timeline { position: relative; padding-left: 22px; }
.timeline::before {
  content: ''; position: absolute; left: 5px; top: 6px; bottom: 6px;
  width: 1px; background: var(--line);
}
.tl-item { position: relative; padding-bottom: 16px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ''; position: absolute; left: -21px; top: 5px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--brand); border: 2px solid var(--card);
  box-shadow: 0 0 0 2px var(--brand-light);
}
.tl-title { font-size: 13px; font-weight: 500; }
.tl-meta { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.tl-content { font-size: 12.5px; color: var(--text-2); margin-top: 3px; }

/* 图表容器 */
.chart { width: 100%; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); margin-top: 10px; }
.chart-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; }

/* 进度条 */
.bar { height: 6px; background: var(--line-2); border-radius: 3px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--brand); border-radius: 3px; transition: width .3s; }

/* 面包屑式页面标题 */
.page-hd { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.page-hd h2 { font-size: 17px; font-weight: 600; }
.page-hd .ph-sub { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }

/* 公告条 */
.notice-bar {
  background: var(--brand-soft);
  border: 1px solid var(--brand-light);
  color: var(--brand-dark);
  padding: 9px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}
.notice-bar .ico { width: 15px; height: 15px; flex: 0 0 15px; }
.notice-bar.warn { background: var(--warning-bg); border-color: #f5dcb8; color: #9c5f12; }
.notice-bar.danger { background: var(--danger-bg); border-color: #f7c8c4; color: #a8352c; }

/* 移动端（商家后台在手机上也能用） */
@media (max-width: 860px) {
  .sidebar { position: fixed; left: -240px; z-index: 900; box-shadow: var(--shadow-lg); }
  .sidebar.open { left: 0; }
  .subnav { display: none; }
  .content { padding: 14px; }
  .tb-search { display: none; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
}
