/* ============================================================
   邻里互助信物流转台账管理系统 · 界面样式
   配色取自社区公告栏与绿植，强调温暖、可读与台账的秩序感。
   ============================================================ */

:root {
  --ink: #1d2a24;
  --ink-2: #4c5c53;
  --ink-3: #7d8c84;
  --paper: #f4f1ea;
  --card: #ffffff;
  --line: #e6e0d3;
  --line-soft: #f0ece2;
  --green: #0f6e5c;
  --green-deep: #0a5445;
  --green-soft: #e6f2ee;
  --amber: #c9762c;
  --amber-soft: #fbf0e2;
  --blue: #2f6f9f;
  --blue-soft: #e8f1f7;
  --bad: #b4423a;
  --bad-soft: #fbeae8;
  --radius: 16px;
  --shadow: 0 10px 26px rgba(29, 42, 36, .07);
  --shadow-sm: 0 2px 8px rgba(29, 42, 36, .05);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-deep); }
img { max-width: 100%; }

h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: .2px; }
p { margin: 0; }

/* ---------- 左侧导航 ---------- */
.rail {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 232px;
  padding: 22px 16px 18px;
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 22px;
  z-index: 10;
}

.brand { display: flex; align-items: center; gap: 10px; padding: 0 6px; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 12px;
  background: linear-gradient(140deg, var(--green), #17967b);
  color: #fff; font-size: 19px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 14px rgba(15, 110, 92, .28);
}
.brand-text strong { display: block; font-size: 14px; line-height: 1.35; }
.brand-text small { color: var(--ink-3); font-size: 11px; }

.rail-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; overflow-y: auto; }
.nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 10px;
  color: var(--ink-2); font-size: 13.5px;
  transition: background .16s, color .16s;
}
.nav-link .nav-mark {
  width: 24px; height: 24px; border-radius: 7px;
  background: var(--line-soft); color: var(--ink-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
}
.nav-link .nav-name { font-size: 13px; letter-spacing: .3px; }
.nav-link:hover { background: var(--green-soft); color: var(--green-deep); }
.nav-link.is-active { background: var(--green); color: #fff; }
.nav-link.is-active .nav-mark { background: rgba(255, 255, 255, .18); color: #fff; }

.rail-foot { display: flex; gap: 12px; padding: 12px 8px 0; border-top: 1px solid var(--line-soft); font-size: 12.5px; }

/* ---------- 主体 ---------- */
.main { margin-left: 232px; padding: 22px 28px 56px; max-width: 1360px; }

.topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.topbar-title h1 { font-size: 22px; }
.topbar-title p { color: var(--ink-3); font-size: 13px; margin-top: 4px; }

.topbar-user { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--green-soft); color: var(--green-deep);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 14px;
}
.who b { display: block; font-size: 13px; line-height: 1.2; }
.who small { color: var(--ink-3); font-size: 11.5px; }

.flash {
  padding: 11px 16px; border-radius: 12px; margin-bottom: 18px;
  font-size: 13.5px; border: 1px solid transparent;
}
.flash-ok { background: var(--green-soft); color: var(--green-deep); border-color: #cfe6de; }
.flash-bad { background: var(--bad-soft); color: var(--bad); border-color: #f3d5d2; }
.flash-warn { background: var(--amber-soft); color: #9a5a1c; border-color: #f0dcc2; }

.content { display: flex; flex-direction: column; gap: 18px; }

/* ---------- 卡片与栅格 ---------- */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 22px;
  box-shadow: var(--shadow-sm);
}
.card.flush { padding: 0; overflow: hidden; }
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; margin-bottom: 16px;
}
.card-head h2 { font-size: 15.5px; }
.card-head p { color: var(--ink-3); font-size: 12.5px; margin-top: 2px; }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
.grid-side { grid-template-columns: minmax(0, 1fr) minmax(0, 1.9fr); }

/* ---------- 指标卡 ---------- */
.stat { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.stat-label { color: var(--ink-3); font-size: 12.5px; display: flex; align-items: center; gap: 6px; }
.stat-value { font-size: 26px; font-weight: 600; margin-top: 6px; font-variant-numeric: tabular-nums; letter-spacing: -.3px; }
.stat-value small { font-size: 12px; font-weight: 500; color: var(--ink-3); margin-left: 4px; }
.stat-sub { font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.stat.is-green { background: linear-gradient(150deg, #0f6e5c, #15886f); border-color: transparent; color: #fff; }
.stat.is-green .stat-label, .stat.is-green .stat-sub { color: rgba(255, 255, 255, .78); }
.stat.is-amber { background: linear-gradient(150deg, #f3e2c9, #fff); border-color: #eddbc0; }

/* ---------- 表格 ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  text-align: left; font-weight: 500; color: var(--ink-3);
  padding: 11px 14px; background: #fbfaf6; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table tbody tr:hover { background: #fcfbf7; }
.table .num, .table th.num, .table td.num { font-variant-numeric: tabular-nums; text-align: right; }
/* 报表页数字统一左对齐，和表头同一竖列；.right 仅作为备用开关 */
.table th.right, .table td.right { text-align: right; }
.table .strong { font-weight: 600; }
.table-wrap { overflow-x: auto; }

/* ---------- 标签 ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 9px; border-radius: 999px; font-size: 11.5px;
  background: var(--line-soft); color: var(--ink-2);
  white-space: nowrap;
}
.tag-ok { background: var(--green-soft); color: var(--green-deep); }
.tag-warn { background: var(--amber-soft); color: #9a5a1c; }
.tag-bad { background: var(--bad-soft); color: var(--bad); }
.tag-info { background: var(--blue-soft); color: var(--blue); }
.tag-mute { background: #f1efe8; color: var(--ink-3); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px; border-radius: 10px; border: 1px solid transparent;
  background: var(--green); color: #fff; font-size: 13px; cursor: pointer;
  transition: background .16s, transform .1s;
}
.btn:hover { background: var(--green-deep); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn-ghost { background: #fff; color: var(--ink-2); border-color: var(--line); }
.btn-ghost:hover { background: #faf8f3; color: var(--ink); }
.btn-line { background: transparent; color: var(--green); border-color: #cfe3dd; }
.btn-line:hover { background: var(--green-soft); }
.btn-danger { background: var(--bad); }
.btn-danger:hover { background: #9c372f; }
.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn[disabled] { background: #ddd8cc; color: #98917f; cursor: not-allowed; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 16px; }
.field > label { display: block; font-size: 12.5px; color: var(--ink-2); margin-bottom: 6px; }
.field .hint { font-size: 11.5px; color: var(--ink-3); margin-top: 5px; }
.input, .select, .textarea {
  width: 100%; padding: 10px 12px; font-size: 13.5px; color: var(--ink);
  background: #fbfaf6; border: 1px solid var(--line); border-radius: 10px;
  outline: none; font-family: inherit;
}
.input:focus, .select:focus, .textarea:focus { border-color: #9ecfc3; background: #fff; }
.textarea { min-height: 96px; resize: vertical; line-height: 1.7; }
.inline { display: flex; gap: 12px; flex-wrap: wrap; }
.inline > .field { flex: 1 1 180px; margin-bottom: 0; }
.checkline { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }
.checkline input { width: 16px; height: 16px; accent-color: var(--green); }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.filters .field { margin: 0; min-width: 130px; }
.filters .btn { height: 38px; }

/* ---------- 分页 ---------- */
.pager { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 16px; }
.pager-item {
  min-width: 34px; height: 32px; padding: 0 10px; border-radius: 8px;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  display: inline-flex; align-items: center; justify-content: center; font-size: 12.5px;
}
.pager-item:hover { border-color: #9ecfc3; color: var(--green); }
.pager-item.is-on { background: var(--green); border-color: var(--green); color: #fff; }
.pager-item.is-off { color: #bdb7a7; background: #faf8f3; }
.pager-hint { color: var(--ink-3); font-size: 12px; margin-left: 6px; }

/* ---------- 空状态 ---------- */
.empty { padding: 34px 20px; text-align: center; color: var(--ink-3); font-size: 13px; }
.empty b { display: block; color: var(--ink-2); margin-bottom: 4px; }

/* ---------- 图表 ---------- */
.bars { display: flex; align-items: flex-end; gap: 12px; height: 150px; padding-top: 8px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bar-fill { width: 100%; max-width: 42px; border-radius: 8px 8px 4px 4px; background: linear-gradient(180deg, #1aa387, #0f6e5c); min-height: 4px; }
.bar-fill.is-light { background: linear-gradient(180deg, #f0c99b, #d99a58); }
.bar-label { font-size: 11px; color: var(--ink-3); }
.bar-value { font-size: 11px; color: var(--ink-2); font-variant-numeric: tabular-nums; }

.meter { height: 8px; border-radius: 999px; background: var(--line-soft); overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: 999px; background: var(--green); }
.meter > i.is-amber { background: var(--amber); }

.kind-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line-soft); font-size: 13px; }
.kind-row:last-child { border-bottom: 0; }
.kind-row .k-kind { color: var(--ink-2); }
.kind-row .k-val { font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 500; }

/* ---------- 居民端 ---------- */
.hero {
  border-radius: 20px; padding: 24px 26px;
  background: linear-gradient(135deg, #0c5f50 0%, #15876f 62%, #3aa184 100%);
  color: #fff; position: relative; overflow: hidden;
  box-shadow: 0 16px 34px rgba(12, 95, 80, .22);
}
.hero::after {
  content: ""; position: absolute; right: -50px; top: -60px;
  width: 240px; height: 240px; border-radius: 50%;
  background: rgba(255, 255, 255, .09);
}
.hero h2 { font-size: 17px; font-weight: 500; opacity: .92; }
.hero .balance { font-size: 42px; font-weight: 600; letter-spacing: -1px; margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.hero .balance small { font-size: 13px; font-weight: 500; opacity: .8; margin-left: 6px; }
.hero .sub { font-size: 12.5px; opacity: .78; }
.hero-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; position: relative; z-index: 2; }
.hero-actions .btn { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .28); backdrop-filter: blur(4px); }
.hero-actions .btn:hover { background: rgba(255, 255, 255, .26); }
.hero-actions .btn-light { background: #fff; color: var(--green-deep); border-color: #fff; }

.pill-row { display: flex; gap: 8px; flex-wrap: wrap; }
.pill {
  padding: 6px 13px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; color: var(--ink-2); font-size: 12.5px;
}
.pill.is-on { background: var(--green); border-color: var(--green); color: #fff; }
.pill:hover { border-color: #9ecfc3; }

.aid-card {
  border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px;
  background: #fff; display: flex; flex-direction: column; gap: 10px;
  transition: box-shadow .16s, transform .16s;
}
.aid-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.aid-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.aid-title { font-size: 15px; font-weight: 600; line-height: 1.5; }
.aid-title a { color: var(--ink); }
.aid-meta { color: var(--ink-3); font-size: 12.5px; display: flex; gap: 12px; flex-wrap: wrap; }
.aid-points { font-size: 15px; font-weight: 600; color: var(--amber); white-space: nowrap; }
.aid-points small { font-size: 11px; color: var(--ink-3); font-weight: 400; margin-left: 2px; }
.aid-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px dashed var(--line-soft); padding-top: 10px; font-size: 12.5px; color: var(--ink-3); }

.goods-card { border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.goods-thumb {
  height: 74px; border-radius: 11px;
  background: linear-gradient(135deg, #eaf3ef, #f7f4ec);
  display: flex; align-items: center; justify-content: center;
  color: var(--green-deep); font-size: 13px; letter-spacing: 2px;
}
.goods-name { font-size: 14.5px; font-weight: 600; }
.goods-intro { color: var(--ink-3); font-size: 12.5px; min-height: 40px; }
.goods-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.goods-cost { color: var(--amber); font-weight: 600; font-size: 15px; }
.goods-cost small { font-weight: 400; color: var(--ink-3); font-size: 11px; }

.notice-item { padding: 12px 0; border-bottom: 1px dashed var(--line-soft); }
.notice-item:last-child { border-bottom: 0; }
.notice-item b { font-size: 13.5px; display: block; margin-bottom: 3px; }
.notice-item p { color: var(--ink-3); font-size: 12.5px; }

/* ---------- 时间轴 ---------- */
.timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--line-soft); }
.timeline li { position: relative; padding: 0 0 18px 12px; }
.timeline li::before {
  content: ""; position: absolute; left: -25px; top: 5px;
  width: 10px; height: 10px; border-radius: 50%;
  background: #fff; border: 2px solid var(--green);
}
.timeline li:last-child { padding-bottom: 0; }
.timeline b { font-size: 13px; display: block; }
.timeline span { color: var(--ink-3); font-size: 11.5px; }

/* ---------- 提示条 ---------- */
.tip {
  background: var(--amber-soft); border: 1px solid #f0dcc2; color: #8d5520;
  border-radius: 12px; padding: 11px 14px; font-size: 12.5px;
}
.tip-quiet { background: #f7f5ef; border-color: var(--line); color: var(--ink-2); }
.tip-warn { background: var(--amber-soft); border-color: #f0dcc2; color: #8d5546; }
.tip-bad { background: var(--bad-soft); border-color: #f3d5d2; color: var(--bad); }
.tip-ok { background: var(--green-soft); border-color: #cfe6de; color: var(--green-deep); }

/* ---------- 登录 ---------- */
.auth {
  min-height: 100vh; display: grid; place-items: center;
  background:
    radial-gradient(900px 500px at 8% 12%, #e8f1ec, transparent),
    radial-gradient(700px 480px at 92% 88%, #f6ecd9, transparent),
    var(--paper);
  padding: 24px;
}
.auth-card {
  width: 100%; max-width: 880px; background: #fff; border-radius: 22px;
  box-shadow: 0 26px 60px rgba(24, 46, 38, .14); overflow: hidden;
  display: grid; grid-template-columns: 1.05fr .95fr;
}
.auth-side {
  padding: 44px 40px; background: linear-gradient(150deg, #0b584a, #15876f 60%, #2f9c80);
  color: #fff; display: flex; flex-direction: column; justify-content: center; gap: 18px;
  position: relative; overflow: hidden;
}
.auth-side::after {
  content: ""; position: absolute; left: -80px; bottom: -110px;
  width: 280px; height: 280px; border-radius: 50%; background: rgba(255, 255, 255, .08);
}
.auth-side h1 { font-size: 25px; line-height: 1.5; }
.auth-side p { font-size: 13px; opacity: .82; line-height: 1.9; }
.auth-side ul { margin: 0; padding-left: 18px; font-size: 12.5px; opacity: .82; line-height: 2; }
.auth-form { padding: 46px 42px; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.auth-form h2 { font-size: 19px; margin-bottom: 6px; }
.auth-form .muted { color: var(--ink-3); font-size: 12.5px; margin-bottom: 22px; }
.auth-alert { background: var(--bad-soft); color: var(--bad); padding: 10px 12px; border-radius: 10px; font-size: 12.5px; margin-bottom: 14px; }

/* ---------- 错误页 ---------- */
.halt {
  min-height: 100vh; display: grid; place-items: center; background: var(--paper); padding: 24px;
}
.halt-card { max-width: 440px; background: #fff; border-radius: 18px; padding: 34px 32px; box-shadow: var(--shadow); text-align: center; }
.halt-card .mark {
  width: 54px; height: 54px; margin: 0 auto 16px; border-radius: 50%;
  background: var(--amber-soft); color: var(--amber);
  display: flex; align-items: center; justify-content: center; font-size: 24px;
}
.halt-card h1 { font-size: 19px; margin-bottom: 8px; }
.halt-card p { color: var(--ink-2); font-size: 13px; line-height: 1.8; }
.halt-card .hint { color: var(--ink-3); font-size: 12px; margin-top: 12px; word-break: break-all; }
.halt-card .btn { margin-top: 22px; }

/* ---------- 工具类 ---------- */
.muted { color: var(--ink-3); }
.small { font-size: 12px; }
.mt { margin-top: 14px; }
.mt-sm { margin-top: 8px; }
.right { text-align: right; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.nowrap { white-space: nowrap; }
.divider { height: 1px; background: var(--line-soft); margin: 16px 0; }
.chip { display: inline-block; padding: 2px 8px; border-radius: 6px; background: var(--line-soft); color: var(--ink-2); font-size: 11.5px; }

@media (max-width: 1100px) {
  .grid-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-main, .grid-side { grid-template-columns: minmax(0, 1fr); }
  .auth-card { grid-template-columns: 1fr; max-width: 480px; }
  .auth-side { display: none; }
}

@media (max-width: 820px) {
  .rail {
    position: static; width: auto; border-right: 0; border-bottom: 1px solid var(--line);
    padding: 14px 14px 8px; flex-direction: column; gap: 12px;
  }
  .rail-nav { flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 6px; }
  .nav-link { flex: 0 0 auto; padding: 7px 10px; }
  .rail-foot { display: none; }
  .main { margin-left: 0; padding: 16px 14px 40px; }
  .grid-2, .grid-3, .grid-5, .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .topbar { flex-direction: column; }
  .topbar-title h1 { font-size: 19px; }
  .hero .balance { font-size: 34px; }
  .card { padding: 16px; }
  .filters .field { flex: 1 1 46%; }
  .table th, .table td { padding: 10px 10px; }
}

/* ---------- 公告列表与详情 ---------- */
.notice-link {
  display: block; color: inherit; text-decoration: none;
  border-radius: 10px; margin: 0 -8px; padding-left: 8px; padding-right: 8px;
  transition: background .16s ease;
}
.notice-link:hover { background: #f7f5ef; }
.notice-link .small { color: var(--ink-3); }
.notice-body { font-size: 14px; line-height: 1.95; color: var(--ink-2); word-break: break-word; }
.notice-nav { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- 月报条形图 ---------- */
.bar-chart { display: flex; align-items: flex-end; gap: 14px; padding: 10px 4px 0; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.bar-num { font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.bar {
  width: 60%; max-width: 46px; border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, #1a8a72, #0f6e5c); min-height: 6px;
}
.bar-name { font-size: 11.5px; color: var(--ink-3); }
.bar-amt { font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* ---------- 排名 ---------- */
.rank-1 { background: #fbe6c8; color: #8a5512; }
.rank-2 { background: #e9ecef; color: #4b5a63; }
.rank-3 { background: #f6e2d4; color: #8a4b23; }
tr.is-me { background: var(--green-soft); }
tr.is-me td { font-weight: 500; }
.rank-mine { background: linear-gradient(150deg, #e9f4f0, #fff); }
.rank-big { font-size: 26px; font-weight: 600; color: var(--green-deep); margin: 4px 0 6px; }
.rank-score { font-size: 30px; font-weight: 600; color: var(--green); font-variant-numeric: tabular-nums; }
.right { text-align: right; }

/* ---------- 打印月报：只留正文 ---------- */
@media print {
  .rail, .topbar, .pager, .btn, .filters, .tip-quiet { display: none !important; }
  .main { margin: 0 !important; padding: 0 !important; }
  .card { box-shadow: none !important; border-color: #ddd !important; break-inside: avoid; }
  body { background: #fff; }
}

/* ---------- 公告模板条 ---------- */
.tpl-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 12px; margin-bottom: 12px;
  background: var(--green-soft); border: 1px dashed #bcd9d0; border-radius: 10px;
}

/* 固定列宽：并排两张表时刻线才落在同一条竖线上 */
.table-fixed { table-layout: fixed; }
.table-fixed th, .table-fixed td { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 广告位（7 个位置共用） ---------- */
.ad-box { display: flex; flex-direction: column; gap: 10px; margin: 14px 0; }
.ad-item {
  position: relative; display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; color: inherit; box-shadow: var(--shadow-sm);
  transition: border-color .15s ease, transform .15s ease;
}
.ad-item:hover { border-color: #bcd9d0; transform: translateY(-1px); }
.ad-box.is-flat .ad-item { background: transparent; border: 1px solid var(--line-soft); box-shadow: none; }
.ad-img { width: 96px; height: 66px; object-fit: cover; border-radius: 8px; flex: none; background: var(--line-soft); }
.ad-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ad-title { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-sub { font-size: 12px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-tag {
  position: absolute; top: 6px; right: 8px; font-size: 10px; letter-spacing: .5px;
  color: var(--ink-3); background: var(--line-soft); border-radius: 4px; padding: 0 4px;
}
.ad-empty {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 12px; border: 1px dashed #cfd8d1; border-radius: 12px;
  color: var(--ink-3); font-size: 12.5px; background: rgba(255, 255, 255, .6);
}
.ad-empty:hover { border-color: var(--green); color: var(--green-deep); }
.ad-more { color: var(--green); font-weight: 600; }
.ad-box:empty { display: none; }

/* 筛选条：直接放的输入框按内容宽度，不再各占一行 */
.filters > .input, .filters > .select { width: auto; flex: 0 1 170px; min-width: 120px; }
.filters > .btn { flex: none; }

/* 广告列表：9 列较挤，固定列宽 + 最小宽度，窄屏横向滚动而不是压行 */
.table-ad { min-width: 1040px; }
.table-ad td, .table-ad th { white-space: normal; }
.table-ad td.nowrap, .table-ad th.nowrap { white-space: nowrap; }
