/* ============================================================
   web-list.css —— 万漫社 web 后台 · 公共【表格列表】样式
   来源：IP管理 v1.2 / 内容管理 v2.29 / 发货订单 / 销卡记录 等标准表格列表页
   ============================================================
   适用范围：只有「表格列表」用本文件。
   「卡片列表」（网格卡片，如 首页商品管理）是另一种布局，需单独抽象，勿复用本文件。
   ============================================================
   铁律：列表页固定 —— 只有 .tbl-wrap 数据区滚动，表头 sticky 固定不动，查询域/标题/分页 flex-shrink:0 固定。
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root { --primary: #5E6AD2; --primary-dark: #4F5AC9; --text3: #9AA0A6; }
body {
  font-family: '寒蝉全圆体', 'ChillRoundF', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: #FBFCFD; color: #202124; font-size: 13px;
  -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums;
}
button { font-family: inherit; cursor: pointer; }
input, select { font-family: inherit; }

.layout { display: flex; min-height: 100vh; }
.main { flex: 1; min-width: 0; }

/* 顶部条（面包屑 + 用户信息区） */
.topbar { height: 60px; display: flex; align-items: center; padding: 0 44px; background: #FBFCFD; border-bottom: 2px solid #F1F3F5; }
.crumb { font-size: 13px; color: #9AA0A6; }
.crumb b { color: #202124; font-weight: 600; }
.crumb .sep { color: #C5C9D0; margin: 0 6px; }
.topbar-right, .topbar .sp { margin-left: auto; display: flex; gap: 16px; align-items: center; }
.hbtn { width: 32px; height: 32px; border: none; background: none; color: #9AA0A6; border-radius: 6px; display: flex; align-items: center; justify-content: center; }
.hbtn:hover { background: #F1F3F5; color: #202124; }
.user { font-size: 13px; color: #5F6368; display: flex; align-items: center; gap: 8px; }
.user .av { width: 26px; height: 26px; border-radius: 50%; background: #5E6AD2; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }

/* 内容区（固定，不整页滚动；滚动交给 .tbl-wrap） */
.content { display: flex; flex-direction: column; height: 100vh; min-height: 0; padding: 24px 44px 16px; max-width: 100%; }
.content > h1, .content > .page-head, .content > .tabs, .content > .filter, .content > .toolbar, .content > .ops-bar, .content > .sel-bar { flex-shrink: 0; }
h1 { font-size: 20px; font-weight: 700; letter-spacing: -.3px; margin-bottom: 24px; }
.page-head { margin-bottom: 20px; flex-shrink: 0; }
.page-head .ttl { font-size: 20px; font-weight: 700; letter-spacing: -.3px; color: #202124; }

/* 查询域 */
.filter { display: flex; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; align-items: center; }
.fin { height: 32px; border: 1px solid #E8EAED; border-radius: 6px; padding: 0 8px; font-size: 13px; outline: none; background: #fff; transition: border-color .15s, box-shadow .15s; }
.fin:focus { border-color: #5E6AD2; box-shadow: 0 0 0 4px rgba(94,106,210,.12); }
.fin::placeholder { color: #9AA0A6; }
.fsel { height: 32px; border: 1px solid #E8EAED; border-radius: 6px; padding: 0 8px; font-size: 12.5px; outline: none; background: #fff; cursor: pointer; }
.fsel:focus { border-color: #5E6AD2; }
.range-sep { color: #9AA0A6; font-size: 13px; }

/* 全局操作按钮 */
.ops-bar { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.fbtn { height: 32px; padding: 0 14px; border-radius: 6px; border: 1px solid #E8EAED; background: #fff; color: #374151; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; transition: all .12s; white-space: nowrap; }
.fbtn:hover { border-color: #C5C9D0; background: #F8F9FB; }
.fbtn.primary { background: #5E6AD2; color: #fff; border-color: #5E6AD2; }
.fbtn.primary:hover { background: #4F5AC9; }
/* 铁律：主要按钮图标必须白色（IconPark SVG 黑色 → 反色） */
.fbtn.primary img { filter: brightness(0) invert(1); }
.fbtn.danger { color: #FF3B30; border-color: #F5C6C6; }
.fbtn.danger:hover { background: #FEF2F2; border-color: #FF3B30; }
.fbtn:disabled { color: #C5C9D0; background: #F8F9FB; border-color: #E8EAED; cursor: not-allowed; }

/* 数据卡 + 唯一滚动区 .tbl-wrap（表头 sticky 固定） */
.card { background: #fff; border: 1px solid #F1F3F5; border-radius: 10px; display: flex; flex-direction: column; min-height: 0; overflow: hidden; flex: 1 1 0%; }
.tbl-wrap { flex: 1 1 0%; overflow-y: auto; min-height: 0; }
.t-flex { width: 100%; }
.t-flex-head, .t-flex-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; }
.t-flex-head { position: sticky; top: 0; z-index: 3; background: #F9FAFB; border-bottom: 2px solid #F1F3F5; font-weight: 600; color: #4B5563; font-size: 12.5px; }
.t-flex-row { border-bottom: 2px solid #F5F6F7; font-size: 13px; color: #374151; line-height: 1.6; }
.t-flex-row:last-child { border-bottom: none; }
.t-flex-row:hover { background: #F5F6FF; }
.t-flex-col { flex-shrink: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-flex-col:first-child { margin-right: 16px; }
/* 多行字段：首行正常（主），其余行弱化（小字/浅色） */
.t-flex-row .t-flex-col .sub,
.t-flex-row .t-flex-col .u-sub,
.t-flex-row .t-flex-col .line2 { font-size: 12px; color: #9AA0A6; margin-top: 2px; font-weight: 400; line-height: 1.4; }
.t-flex-col-op { text-align: right; }
.t-flex-head .t-flex-col-op { text-align: left; }

/* 行内操作按钮 */
.op { display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 500; padding: 6px 14px; border-radius: 6px; border: 1px solid #E8EAED; background: #fff; color: #5E6AD2; white-space: nowrap; transition: all .12s; }
.op + .op { margin-left: 8px; }
.op:hover { border-color: #5E6AD2; color: #5E6AD2; background: #F5F6FF; }
.op.danger { color: #FF3B30; border-color: #F3D3D4; }
.op.danger:hover { border-color: #FF3B30; background: #FFF5F5; color: #FF3B30; }

/* 卡位类型 tag（全站统一，来源=内容管理/卡牌管理） */
.ctag { display: inline-flex; align-items: center; background: #F3F4F6; color: #6B7280; font-size: 11.5px; padding: 2px 8px; border-radius: 99px; font-weight: 500; white-space: nowrap; }
.ctag.t-rose { background: #FCE7F3; color: #DB2777; }
.ctag.t-green { background: #ECFDF5; color: #15803D; }
.ctag.t-indigo { background: #EEF2FF; color: #4F46E5; }
.ctag.t-amber { background: #FFF4E5; color: #B45309; }
.ctag.t-purple { background: #F3E8FF; color: #9333EA; }
.ctag.t-red { background: #FEF2F2; color: #E5484D; }
.ctag.t-gray { background: #F3F4F6; color: #6B7280; }

/* 空态 */
.empty-tip { text-align: center; color: #9AA0A6; padding: 48px 0; font-size: 14px; flex-shrink: 0; }

/* 分页（吸底固定） */
.pager { display: flex; align-items: center; gap: 8px; padding: 12px 20px; flex-wrap: wrap; flex-shrink: 0; position: sticky; bottom: 0; background: #fff; border-top: 2px solid #F1F3F5; }
.pager .info { color: #9AA0A6; font-size: 12.5px; margin-right: auto; }
.pager .info b { color: #5E6AD2; font-weight: 600; }
.pager .pg { display: flex; align-items: center; gap: 4px; }
.pbtn { min-width: 30px; height: 30px; border: 1px solid #E8EAED; border-radius: 6px; background: #fff; color: #5F6368; font-size: 13px; }
.pbtn:hover { border-color: #D5D9DF; }
.pbtn.cur, .pbtn.active { background: #5E6AD2; color: #fff; border-color: #5E6AD2; }
.pbtn:disabled { color: #D1D5DB; cursor: not-allowed; }
.pager .jump { display: flex; align-items: center; gap: 6px; color: #9AA0A6; font-size: 12.5px; }

/* 弹窗（居中） */
.mask { position: fixed; inset: 0; background: rgba(20,30,50,.45); z-index: 2000; display: none; align-items: center; justify-content: center; }
.mask.show { display: flex; }
.modal { background: #fff; border-radius: 12px; max-height: 84vh; display: flex; flex-direction: column; box-shadow: 0 8px 30px rgba(20,30,50,.16); position: relative; }
.modal.sm { min-width: 420px; max-width: 460px; }
.modal-head { display: flex; align-items: center; padding: 14px 20px; border-bottom: 2px solid #F1F3F5; }
.modal-head h3 { font-size: 15px; font-weight: 600; color: #202124; display: flex; align-items: center; gap: 8px; }
.modal-x { position: absolute; top: 14px; right: 14px; width: 28px; height: 28px; border: none; background: #F1F3F5; color: #6B7280; border-radius: 6px; display: flex; align-items: center; justify-content: center; }
.modal-x:hover { background: #E5E7EB; color: #202124; }
.modal-body { flex: 1; overflow-y: auto; padding: 16px 20px; scrollbar-width: thin; scrollbar-color: #D1D5DB transparent; }
.modal-foot { padding: 12px 20px; border-top: 2px solid #F1F3F5; display: flex; justify-content: flex-end; gap: 10px; flex-shrink: 0; }

/* 系统操作提示（右上消息条，类型色 CSS 变量 + 图标 mask） */
.wms-msg { position: fixed; top: 16px; right: 16px; z-index: 10000; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; pointer-events: none; }
.wms-msg-item { display: flex; align-items: flex-start; gap: 8px; min-width: 280px; max-width: 400px; padding: 10px 12px; background: #fff; border-radius: 8px; box-shadow: 0 4px 20px rgba(15,23,42,.14); border-left: 3px solid var(--wms-c, #5E6AD2); font-size: 13px; line-height: 1.5; color: #202124; pointer-events: auto; animation: wmsMsgIn .25s ease; }
.wms-msg-item.out { animation: wmsMsgOut .25s ease forwards; }
.wms-msg-item.success { --wms-c: #22A06B; --wms-ic: url('/iconpark/对勾_check-correct.svg'); }
.wms-msg-item.warn { --wms-c: #F5A623; --wms-ic: url('/iconpark/注意_attention.svg'); }
.wms-msg-item.error { --wms-c: #FF3B30; --wms-ic: url('/iconpark/错误_error.svg'); }
.wms-msg-item.info { --wms-c: #5E6AD2; --wms-ic: url('/iconpark/信息_info.svg'); }
.wms-msg-icon { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; background-color: var(--wms-c); -webkit-mask: var(--wms-ic) no-repeat center/contain; mask: var(--wms-ic) no-repeat center/contain; }
.wms-msg-text { flex: 1; min-width: 0; }
.wms-msg-close { width: 14px; height: 14px; flex-shrink: 0; cursor: pointer; opacity: .5; margin-top: 3px; }
.wms-msg-close:hover { opacity: .9; }
@keyframes wmsMsgIn { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
@keyframes wmsMsgOut { to { opacity: 0; transform: translateX(16px); } }
