/* ============ 诗韵首邑政采工作台 ============ */
:root {
  --primary: #16467f;
  --primary-2: #1d5aa0;
  --primary-soft: #e8f0fa;
  --accent: #c8862a;
  --accent-soft: #fdf3e3;
  --bg: #f2f5f9;
  --card: #ffffff;
  --text: #22303f;
  --muted: #7a8a9c;
  --line: #e3e9f1;
  --green: #2e9e5b;
  --green-soft: #e9f7ef;
  --red: #d64541;
  --red-soft: #fdeceb;
  --orange: #e8961e;
  --orange-soft: #fdf4e5;
  --shadow: 0 1px 3px rgba(23, 43, 77, .08), 0 4px 14px rgba(23, 43, 77, .06);
  --radius: 12px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg); color: var(--text); font-size: 14.5px; line-height: 1.55;
}
a { color: var(--primary-2); text-decoration: none; }
::selection { background: var(--primary-soft); }

/* ---- 顶部导航 ---- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: #fff; border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 4px rgba(23,43,77,.05);
}
.topbar-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 18px;
  display: flex; align-items: center; gap: 18px; height: 58px;
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand img { width: 36px; height: 36px; }
.brand .bt { font-weight: 700; font-size: 16.5px; color: var(--primary); letter-spacing: .5px; }
.brand .bs { font-size: 11px; color: var(--muted); letter-spacing: 1px; }
.nav { display: flex; gap: 2px; overflow-x: auto; flex: 1; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  padding: 8px 13px; border-radius: 8px; color: #46586c; white-space: nowrap;
  font-size: 14.5px; transition: all .15s;
}
.nav a:hover { background: var(--primary-soft); color: var(--primary); }
.nav a.on { background: var(--primary); color: #fff; font-weight: 600; }
.userbox { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.userbox .uname { font-weight: 600; }
.userbox .urole { font-size: 11.5px; color: var(--muted); }

/* ---- 布局 ---- */
.wrap { max-width: 1280px; margin: 0 auto; padding: 20px 18px 60px; }
.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px 20px; margin-bottom: 16px;
}
.card h3 { font-size: 16px; margin-bottom: 14px; color: var(--text); display: flex; align-items: center; gap: 8px; }
.card h3 .sub { font-size: 12.5px; color: var(--muted); font-weight: 400; }
.row-flex { display: flex; gap: 16px; flex-wrap: wrap; }
.grid-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-bottom: 16px; }
.stat { cursor: pointer; 
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px 18px; position: relative; overflow: hidden;
}
.stat::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--primary); }
.stat.g::before { background: var(--green); } .stat.r::before { background: var(--red); }
.stat.o::before { background: var(--accent); } .stat.b2::before { background: var(--primary-2); }
.stat .k { color: var(--muted); font-size: 13px; }
.stat .v { font-size: 25px; font-weight: 700; margin-top: 3px; letter-spacing: .3px; }
.stat .v small { font-size: 13px; font-weight: 400; color: var(--muted); margin-left: 2px; }
.stat .v.red { color: var(--red); } .stat .v.green { color: var(--green); } .stat .v.blue { color: var(--primary); }

/* ---- 按钮 ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--primary); color: #fff; border: none; border-radius: 8px;
  padding: 8px 16px; font-size: 14px; cursor: pointer; transition: all .15s; font-family: inherit;
}
.btn:hover { background: var(--primary-2); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.ghost { background: #fff; color: var(--primary); border: 1px solid var(--primary); }
.btn.ghost:hover { background: var(--primary-soft); }
.btn.gray { background: #fff; color: #5a6b7d; border: 1px solid var(--line); }
.btn.gray:hover { background: #f4f7fb; }
.btn.warn { background: var(--orange); color: #fff; }

/* ⚡ 加急配送提醒横幅 */
.urgent-banner {
  display: flex; align-items: flex-start; gap: 12px;
  background: linear-gradient(135deg, #fff4e5, #ffe9d1);
  border: 1.5px solid var(--orange); border-left: 6px solid var(--orange);
  border-radius: 10px; padding: 13px 16px; margin-bottom: 14px;
  animation: ubPulse 1.8s ease-in-out 3;
}
@keyframes ubPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(232,150,30,.45); }
  50% { box-shadow: 0 0 0 7px rgba(232,150,30,0); }
}
.urgent-banner .ub-ico { font-size: 26px; line-height: 1.1; }
.urgent-banner .ub-body { flex: 1; min-width: 0; }
.urgent-banner .ub-title { font-weight: 700; color: #a35d00; font-size: 15px; margin-bottom: 6px; }
.urgent-banner .ub-list { display: flex; flex-direction: column; gap: 3px; }
.urgent-banner .ub-item { font-size: 13.5px; color: #7a4d00; cursor: pointer; padding: 2px 0; }
.urgent-banner .ub-item:hover { text-decoration: underline; }
.urgent-banner .ub-ack { white-space: nowrap; }
.btn.warn:hover { background: #d1851a; }
.btn.danger { background: var(--red); }
.btn.danger:hover { background: #b93a37; }
.btn.sm { padding: 4.5px 11px; font-size: 12.5px; border-radius: 6px; }
.btn.lg { padding: 12px 26px; font-size: 15.5px; }

/* ---- 表单 ---- */
.form-item { margin-bottom: 13px; }
.form-item label { display: block; font-size: 13px; color: #57687b; margin-bottom: 5px; font-weight: 600; }
.form-item label .req { color: var(--red); margin-left: 2px; }
input[type=text], input[type=password], input[type=number], input[type=date], input[type=file], select, textarea {
  width: 100%; padding: 8.5px 11px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 14px; font-family: inherit; background: #fff; color: var(--text); transition: border .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary-2); box-shadow: 0 0 0 3px rgba(29,90,160,.12); }
textarea { resize: vertical; min-height: 74px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid .full { grid-column: 1 / -1; }

/* ---- 表格 ---- */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.8px; }
.tbl th {
  text-align: left; padding: 10px 12px; color: var(--muted); font-weight: 600;
  border-bottom: 2px solid var(--line); white-space: nowrap; font-size: 12.8px; background: #fafbfd;
}
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:hover td { background: #f7fafd; }
/* 欠款明细：已结清单位留存行（淡绿底标记） */
.tbl tr.settled-row td { background: rgba(46, 204, 113, 0.06); }
.tbl tr.settled-row:hover td { background: rgba(46, 204, 113, 0.12); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .money { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl .money.red { color: var(--red); }
.tbl tr.clickable { cursor: pointer; }
.tbl .empty { text-align: center; color: var(--muted); padding: 34px 0 !important; }

/* ---- 标签 / 角标 ---- */
.tag {
  display: inline-flex; align-items: center; padding: 2.5px 10px; border-radius: 99px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.tag.blue { background: var(--primary-soft); color: var(--primary); }
.tag.green { background: var(--green-soft); color: var(--green); }
.tag.red { background: var(--red-soft); color: var(--red); }
.tag.orange { background: var(--orange-soft); color: var(--orange); }
.tag.gray { background: #eef1f5; color: #6b7c8e; }
.tag.gold { background: var(--accent-soft); color: var(--accent); }
.badge-dot {
  display: inline-block; margin-left: 6px;
  background: var(--red); color: #fff; font-size: 10.5px; padding: 1.5px 7px;
  border-radius: 99px; white-space: nowrap; font-weight: 600; letter-spacing: .5px;
  vertical-align: 2px;
}

/* ---- 筛选条 ---- */
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filter-bar input, .filter-bar select { width: auto; min-width: 140px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  padding: 5.5px 14px; border-radius: 99px; background: #fff; border: 1px solid var(--line);
  cursor: pointer; font-size: 13px; color: #57687b; transition: all .15s; user-select: none;
}
.chip:hover { border-color: var(--primary-2); color: var(--primary); }
.chip.on { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }

/* ---- 通用搜索框（全站） ---- */
.q-wrap { position: relative; display: inline-flex; align-items: center; min-width: 220px; }
.q-wrap .q-ico {
  position: absolute; left: 10px; font-size: 13px; opacity: .45; pointer-events: none; line-height: 1;
}
.q-input {
  width: 100%; padding: 7px 30px 7px 30px !important; border-radius: 8px;
  border: 1px solid var(--line); font-size: 13.5px; background: #fff;
  min-width: 220px !important; transition: border-color .15s, box-shadow .15s;
}
.q-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(24, 93, 168, .09); }
.q-wrap .q-clr {
  position: absolute; right: 6px; width: 20px; height: 20px; border-radius: 50%;
  display: none; align-items: center; justify-content: center; cursor: pointer;
  font-size: 13px; color: #8b9aab; background: #eef2f7; line-height: 1;
}
.q-wrap .q-clr:hover { background: #e2e8f0; color: #4a5966; }
.q-wrap.has-val .q-clr { display: flex; }
.q-hit { font-size: 12.5px; color: #7b8a99; }
.q-hit b { color: var(--primary); font-weight: 600; }

/* ---- Tabs ---- */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs .tab {
  padding: 9px 16px; cursor: pointer; color: var(--muted); font-size: 14.5px;
  border-bottom: 2.5px solid transparent; margin-bottom: -2px; white-space: nowrap; font-weight: 500;
}
.tabs .tab:hover { color: var(--primary); }
.tabs .tab.on { color: var(--primary); border-bottom-color: var(--primary); font-weight: 700; }

/* ---- 模态框 ---- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(15, 30, 50, .45); z-index: 100;
  display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto;
}
.modal {
  background: #fff; border-radius: 14px; width: 620px; max-width: 100%;
  box-shadow: 0 18px 50px rgba(10, 25, 45, .25); animation: pop .18s ease;
}
.modal.wide { width: 860px; }
@keyframes pop { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-h { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.modal-h b { font-size: 16.5px; }
.modal-x { cursor: pointer; color: var(--muted); font-size: 20px; line-height: 1; padding: 2px 6px; }
.modal-x:hover { color: var(--red); }
.modal-b { padding: 18px 20px; max-height: 68vh; overflow-y: auto; }
.modal-f { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }

/* ---- 提示 ---- */
.toast {
  position: fixed; top: 74px; left: 50%; transform: translateX(-50%); z-index: 200;
  padding: 11px 22px; border-radius: 10px; color: #fff; font-size: 14.5px;
  box-shadow: 0 8px 24px rgba(10,25,45,.25); animation: pop .18s ease; max-width: 90vw;
  pointer-events: none;       /* 不拦截下方点击 */
}
.toast.ok { background: var(--green); } .toast.err { background: var(--red); }
.toast.hide { animation: fadeout .2s ease forwards; }
@keyframes fadeout { from { opacity: 1; transform: translateX(-50%) translateY(0); } to { opacity: 0; transform: translateX(-50%) translateY(-8px); } }

/* ---- 标签 ---- */
.pill { display:inline-block; padding:2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }

/* ---- 登录页 ---- */
.login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(150deg, #143d6e 0%, #16467f 45%, #1d5aa0 100%); padding: 20px;
}
.login-box {
  width: 400px; max-width: 100%; background: #fff; border-radius: 18px; padding: 38px 36px 30px;
  box-shadow: 0 24px 60px rgba(5, 20, 40, .4);
}
.login-box .lg { text-align: center; margin-bottom: 8px; }
.login-box .lg img { width: 66px; height: 66px; }
.login-box h1 { text-align: center; font-size: 20px; color: var(--primary); margin-bottom: 2px; }
.login-box .sub { text-align: center; color: var(--muted); font-size: 12.5px; letter-spacing: 2px; margin-bottom: 26px; }
.login-tip {
  margin-top: 18px; font-size: 12.3px; color: var(--muted); background: #f6f9fc;
  border-radius: 8px; padding: 10px 12px; line-height: 1.7;
}

/* ---- 首页 ---- */
.hero {
  background: linear-gradient(120deg, var(--primary) 0%, var(--primary-2) 100%);
  border-radius: var(--radius); color: #fff; padding: 24px 26px; margin-bottom: 16px;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
  box-shadow: var(--shadow);
}
.hero .hi { font-size: 21px; font-weight: 700; }
.hero .hd { opacity: .85; font-size: 13.5px; margin-top: 4px; }
.entry-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-bottom: 16px; }
.entry {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 22px;
  cursor: pointer; transition: all .18s; position: relative; overflow: hidden;
}
.entry:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(23,43,77,.14); }
.entry .ei {
  width: 44px; height: 44px; border-radius: 11px; display: flex; align-items: center;
  justify-content: center; font-size: 22px; margin-bottom: 12px; background: var(--primary-soft);
}
.entry .en { font-size: 16.5px; font-weight: 700; }
.entry .ed { color: var(--muted); font-size: 13px; margin-top: 4px; }
.entry .ec { position: absolute; right: 18px; top: 16px; font-size: 26px; font-weight: 800; color: var(--line); }

/* ---- 任务卡片 ---- */
.task-line {
  display: flex; align-items: center; gap: 12px; padding: 11px 6px;
  border-bottom: 1px dashed var(--line); cursor: pointer; transition: background .12s; border-radius: 6px;
}
.task-line:hover { background: #f6f9fd; }
.task-line:last-child { border-bottom: none; }
.tl-ico {
  width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.tl-ico.d { background: var(--primary-soft); } .tl-ico.v { background: var(--green-soft); }
.tl-ico.c { background: var(--red-soft); } .tl-ico.r { background: var(--orange-soft); }
.tl-main { flex: 1; min-width: 0; }
.tl-title { font-weight: 600; font-size: 14.2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-sub { color: var(--muted); font-size: 12.3px; margin-top: 1px; }
.tl-amt { font-weight: 700; color: var(--primary); white-space: nowrap; }

/* ---- 一键拨号 ---- */
.tellink { color: var(--primary); text-decoration: none; border-bottom: 1px dashed var(--primary); white-space: nowrap; }
.tellink:active { opacity: .6; }
.dial-btn {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--green-soft); text-decoration: none; font-size: 15px;
  transition: transform .1s;
}
.dial-btn:active { transform: scale(.9); }

/* ---- 时间线 ---- */
.tl-report { border-left: 3px solid var(--line); padding: 2px 0 2px 14px; margin: 10px 0 10px 4px; }
.tl-report .tlr-date { font-size: 12.3px; color: var(--muted); margin-bottom: 3px; }
.tl-report .tlr-body { font-size: 13.5px; }

/* ---- 详情页头 ---- */
.detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.detail-head h2 { font-size: 20px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 4px 24px; font-size: 14px; }
.info-grid .ig { display: flex; padding: 5px 0; }
.info-grid .k { color: var(--muted); width: 84px; flex-shrink: 0; }
.info-grid .v { font-weight: 500; }

/* ---- 打印 ---- */
.print-body { background: #fff; max-width: 800px; margin: 0 auto; padding: 40px 46px; }
.print-copy { padding: 2mm 0; }
/* 裁切线（一式两份，从中间裁开） */
.cut-line { text-align: center; color: #98a4b3; font-size: 11px; letter-spacing: 2px;
  border-top: 1.5px dashed #9fb0c0; margin-top: 3mm; padding-top: 2mm; }
.print-head { display: flex; justify-content: space-between; align-items: center; border-bottom: 3px solid var(--primary); padding-bottom: 8px; }
.print-head .ph-l { display: flex; align-items: center; gap: 10px; }
.print-head img { width: 42px; }
.print-head .cn { font-size: 17px; font-weight: 700; color: var(--primary); letter-spacing: 1px; }
.print-head .cs { font-size: 10.5px; color: var(--muted); }
.print-head .ph-no { font-size: 11px; color: #46586c; text-align: right; margin-left: auto; }
.print-head .ph-no b { font-size: 13.5px; }
.print-title { text-align: center; font-size: 17px; font-weight: 700; letter-spacing: 6px; margin: 10px 0 3px; }
.print-meta { display: flex; justify-content: space-between; font-size: 12.5px; color: #46586c; margin-bottom: 6px; }
.print-tbl { width: 100%; border-collapse: collapse; table-layout: auto; }
.print-tbl th, .print-tbl td { border: 1px solid #3a4a5c; padding: 5px 6px; font-size: 12.5px; text-align: center; }
.print-tbl th { background: #eef3f9; }
.print-tbl .num { text-align: center; }
.print-sign { display: flex; justify-content: space-between; margin-top: 14mm; font-size: 12.5px; }
.print-sign > div { width: 30%; }
.print-foot { margin-top: 12px; font-size: 10.5px; color: #8b98a8; text-align: center; border-top: 1px solid var(--line); padding-top: 6px; }
@media print {
  html, body { background: #fff; }
  .no-print { display: none !important; }
  .print-body { padding: 0; max-width: 100%; width: 100%; }
  /* 一式两份：每份固定高度，第二份正好从纸张中线开始，可沿裁切线对半裁开 */
  .print-copy { height: 135mm; overflow: hidden; page-break-inside: avoid; box-sizing: border-box;
    -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .cut-line { page-break-inside: avoid; page-break-after: avoid; }
  @page { size: A4 portrait; margin: 6mm 8mm; }
}

/* ---- 空状态 ---- */
.empty-state { text-align: center; color: var(--muted); padding: 46px 10px; }
.empty-state .es-i { font-size: 40px; margin-bottom: 10px; opacity: .5; }

/* ---- 通用 ---- */
.mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mb0 { margin-bottom: 0 !important; }
.flex { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.flex .grow { flex: 1; }
.right { text-align: right; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.bold { font-weight: 700; }
.red { color: var(--red); } .green { color: var(--green); } .blue { color: var(--primary); }
.hr { border: none; border-top: 1px solid var(--line); margin: 14px 0; }
.photo-thumb { max-width: 100%; max-height: 420px; border-radius: 8px; border: 1px solid var(--line); }
.item-row { display: grid; grid-template-columns: 2.2fr .8fr .9fr 1fr 1.1fr 34px; gap: 8px; margin-bottom: 8px; align-items: center; }
.item-row .del { color: var(--red); cursor: pointer; font-size: 17px; text-align: center; }
.total-bar { background: var(--primary-soft); border-radius: 8px; padding: 10px 14px; display: flex; justify-content: flex-end; gap: 26px; font-size: 14.5px; }
.total-bar b { color: var(--primary); font-size: 16.5px; }
.kv-list { font-size: 13.8px; }
.kv-list .kv { display: flex; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.kv-list .kv:last-child { border-bottom: none; }
.kv-list .k { color: var(--muted); width: 92px; flex-shrink: 0; }

/* ---- 签到打卡 ---- */
.checkin-bar {
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(135deg, #fff, var(--primary-soft));
  border: 1px solid var(--line); border-radius: 12px;
  padding: 13px 16px; margin: 12px 0; cursor: pointer;
  transition: box-shadow .15s;
}
.checkin-bar:hover { box-shadow: 0 3px 12px rgba(22, 70, 127, .10); }
.cb-l { flex: 1; min-width: 0; }
.cb-state { font-weight: 700; font-size: 15.5px; }
.cb-state.red { color: var(--red); } .cb-state.green { color: var(--green); }
.cb-sub { color: var(--muted); font-size: 12.3px; margin-top: 2px; }
.cb-r { flex-shrink: 0; }
.btn.ck-big { padding: 10px 20px; font-size: 14.5px; }
.ck-hero-card {
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(135deg, var(--primary) 0%, #0d2f55 100%);
  color: #fff; border-radius: 14px; padding: 22px 24px; margin-bottom: 12px;
}
.ckh-l { flex: 1; }
.ckh-date { font-size: 24px; font-weight: 800; letter-spacing: .5px; }
.ckh-week { opacity: .85; font-size: 13px; margin-top: 3px; }
.ckh-my { margin-top: 9px; font-size: 13px; background: rgba(255,255,255,.14); display: inline-block; padding: 3px 10px; border-radius: 20px; }
.ckh-r { flex-shrink: 0; }
.btn.ck-hero { padding: 14px 26px; font-size: 15.5px; background: #fff; color: var(--primary); border: none; box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.btn.ghost.ck-hero { background: rgba(255,255,255,.12); color: #fff; border: 1.5px solid rgba(255,255,255,.65); }
.ck-done { text-align: center; color: #fff; }
.ck-done > div { width: 44px; height: 44px; margin: 0 auto 4px; border-radius: 50%; background: rgba(255,255,255,.18); display: flex; align-items: center; justify-content: center; font-size: 22px; }
.cal-head { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; color: var(--muted); font-size: 12.3px; padding: 6px 0 4px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal-cell {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  border-radius: 8px; font-size: 13px; background: #f2f4f7; color: var(--muted); position: relative;
}
.cal-cell.blank { background: transparent; }
.cal-cell.half { background: var(--orange-soft); color: #a05a00; font-weight: 600; }
.cal-cell.full { background: var(--green-soft); color: var(--green); font-weight: 700; }
.cal-cell.full::after { content: "✓"; position: absolute; top: 1px; right: 4px; font-size: 9px; }
.cal-cell.today { outline: 2px solid var(--primary); outline-offset: 1px; font-weight: 800; }
.cal-legend { display: flex; align-items: center; gap: 16px; margin-top: 10px; font-size: 12.3px; color: var(--muted); flex-wrap: wrap; }
.cal-legend .dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.cal-legend .dot.full { background: var(--green-soft); } .cal-legend .dot.half { background: var(--orange-soft); } .cal-legend .dot.none { background: #f2f4f7; }

/* ---- 视频宣传 ---- */
.vt-card {
  border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px;
  margin-bottom: 10px; cursor: pointer; transition: all .14s;
}
.vt-card:hover { border-color: var(--primary); box-shadow: 0 3px 12px rgba(22,70,127,.09); }
.vt-card.overdue { border-color: #f3c1c1; background: #fffafa; }
.vt-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.vt-topic { font-size: 13px; color: var(--primary); }
.vt-title { font-size: 16.5px; font-weight: 700; margin: 7px 0 5px; line-height: 1.45; }
.vt-meta { color: var(--muted); font-size: 12.8px; }
.vc-box { background: #fafbfd; border: 1px dashed var(--line); border-radius: 10px; padding: 16px 18px; }
.vc-title { font-weight: 800; font-size: 15.5px; margin-bottom: 9px; }
.vc-copy { font-size: 14px; line-height: 2; white-space: pre-wrap; }
.vc-tags { margin-top: 10px; color: var(--primary); font-size: 12.8px; }
.vc-script { margin-top: 12px; }
.vc-script summary { cursor: pointer; color: var(--primary); font-size: 13.5px; user-select: none; }
.vs-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.vs { background: #fafbfd; border: 1px solid var(--line); border-radius: 10px; padding: 13px 8px; text-align: center; }
.vs .k { color: var(--muted); font-size: 12px; }
.vs .v { font-size: 21px; font-weight: 800; margin-top: 3px; }
.vs .v small { font-size: 11px; font-weight: 600; }

@media (max-width: 720px) {
  .wrap { padding: 12px 10px 56px; }
  .card { padding: 14px 12px; border-radius: 10px; }
  /* 宽表格在手机上可左右滑动查看（欠款/金额列不会被裁掉） */
  .card { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .form-grid { grid-template-columns: 1fr; }
  .topbar-inner { height: auto; flex-wrap: wrap; padding: 8px 10px; gap: 6px; }
  .brand .bs { display: none; }
  .brand .bt { font-size: 15px; }
  .brand img { width: 32px; height: 32px; }
  .nav { order: 3; width: 100%; }
  .nav a { padding: 7px 10px; font-size: 13.5px; }
  .grid-stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat { padding: 13px 14px; }
  .stat .v { font-size: 21px; }
  .entry-cards { grid-template-columns: 1fr; }
  .hero { padding: 16px; }
  .hero .hi { font-size: 18px; }
  .detail-head h2 { font-size: 17px; }
  /* 模态框：手机上从底部弹出（更符合手机操作习惯） */
  .modal-mask { padding: 0; align-items: flex-end; }
  .modal { width: 100%; border-radius: 16px 16px 0 0; max-height: 92vh; }
  .modal.wide { width: 100%; }
  .modal-b { max-height: calc(92vh - 128px); }
  .filter-bar { gap: 7px; }
  .filter-bar input, .filter-bar select { min-width: 0; flex: 1; }
  .q-wrap { flex: 1 1 100%; min-width: 0; }
  .q-input { min-width: 0 !important; font-size: 16px; }
  .chips { gap: 4px; }
  .chip { padding: 5px 11px; font-size: 12.5px; }
  .tbl th, .tbl td { padding: 8px 8px; font-size: 13px; }
  /* 商品行：手机上折两行（名称整行+删除，单位/数量/单价/金额一行） */
  .item-row {
    grid-template-columns: 1fr .9fr .9fr 1fr 34px; gap: 6px;
    grid-template-areas: "name name name name del" "unit qty price amt amt";
  }
  .item-row .it-name { grid-area: name; }
  .item-row .it-unit { grid-area: unit; }
  .item-row .it-qty { grid-area: qty; }
  .item-row .it-price { grid-area: price; }
  .item-row .it-amt { grid-area: amt; }
  .item-row .del { grid-area: del; }
  .task-line { padding: 12px 4px; }
  .btn { padding: 9px 15px; }
  .btn.sm { padding: 6px 12px; }
  /* 签到/视频 手机适配 */
  .ck-hero-card { flex-direction: column; text-align: center; padding: 18px 14px; }
  .ckh-r { width: 100%; }
  .btn.ck-hero { width: 100%; }
  .vs-grid { grid-template-columns: repeat(2, 1fr); }
  .checkin-bar { flex-wrap: wrap; }
  .cb-r { width: 100%; }
  .cb-r .btn.ck-big { width: 100%; }
  .total-bar { font-size: 13.5px; }
  .tabs .tab { padding: 8px 12px; font-size: 13.5px; }
}


/* 导航待办红点 */
.nav-dot {
  display: inline-block; margin-left: 5px; padding: 1.5px 6px;
  border-radius: 9px; background: #ff4d4f; color: #fff;
  font-size: 11px; line-height: 1.35; font-weight: 600; vertical-align: 1px;
}


/* ================= 行内结款状态编辑（销售明细 / 单位配送流水） ================= */
.paid-cell { display: flex; flex-direction: column; gap: 5px; min-width: 116px; }
.paid-cell .paid-sel {
  width: 100%; padding: 4px 7px; border-radius: 7px; font-size: 12.5px;
  border: 1px solid var(--line); background: #fff; color: #33475b; cursor: pointer;
}
.paid-cell .paid-sel:hover { border-color: #b9c7d8; }
.paid-cell .paid-sel:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px rgba(42,110,246,.13); }
.paid-cell .paid-sel:disabled { opacity: .55; cursor: progress; }
/* 结款状态配色 */
.paid-cell select.paid-sel option[value="unpaid"] { color: var(--red); }
.paid-cell select.paid-sel option[value="partial"] { color: var(--orange); }
.paid-cell select.paid-sel option[value="paid"] { color: var(--green); }

.paid-cell .paid-amt-wrap { display: flex; gap: 5px; align-items: center; }
.paid-cell .paid-amt {
  width: 88px; padding: 4px 7px; border-radius: 7px; font-size: 12.5px;
  border: 1px solid var(--orange); background: var(--orange-soft); color: #7a4d05;
}
.paid-cell .paid-amt:focus { outline: none; box-shadow: 0 0 0 2px rgba(232,150,30,.2); }
.paid-cell .btn.sm { padding: 4px 9px; font-size: 12px; }

@media (max-width: 820px) {
  .paid-cell { min-width: 96px; }
  .paid-cell .paid-amt { width: 72px; }
}

/* ================= 行内出票信息编辑（销售明细 / 单位配送流水） ================= */
.inv-cell { display: flex; flex-direction: column; gap: 5px; min-width: 152px; }
.inv-cell .inv-sel, .inv-cell .inv-co, .inv-cell .inv-date {
  width: 100%; padding: 4px 7px; border-radius: 7px; font-size: 12.5px;
  border: 1px solid var(--line); background: #fff; color: #33475b; cursor: pointer;
}
.inv-cell .inv-date { cursor: default; }
.inv-cell .inv-sel:hover, .inv-cell .inv-co:hover { border-color: #b9c7d8; }
.inv-cell .inv-sel:focus, .inv-cell .inv-co:focus, .inv-cell .inv-date:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px rgba(42,110,246,.13);
}
.inv-cell .inv-sel:disabled { opacity: .55; cursor: progress; }
/* 出票状态配色 */
.inv-cell select.inv-sel option[value="no"] { color: var(--muted); }
.inv-cell select.inv-sel option[value="partial"] { color: var(--orange); }
.inv-cell select.inv-sel option[value="yes"] { color: var(--green); }

.inv-cell .inv-more { display: flex; flex-direction: column; gap: 5px; }
.inv-cell .inv-amt {
  width: 100%; padding: 4px 7px; border-radius: 7px; font-size: 12.5px;
  border: 1px solid var(--orange); background: var(--orange-soft); color: #7a4d05;
}
.inv-cell .inv-amt:focus { outline: none; box-shadow: 0 0 0 2px rgba(232,150,30,.2); }
.inv-cell .btn.sm { padding: 4px 9px; font-size: 12px; }

@media (max-width: 820px) {
  .inv-cell { min-width: 128px; }
}

/* 单位选择双模式（下拉预选项 ⇄ 手动输入） */
.cust-mode-row { display: flex; gap: 6px; align-items: center; }
.cust-mode-row .btn { flex-shrink: 0; }
.cust-mode-row input { min-width: 0; }


/* ================= 🔔 新配送单提示音 ================= */
/* 顶栏铃铛按钮 */
.notify-btn { font-size: 15px !important; line-height: 1 !important; padding: 7px 10px !important; }
.notify-btn.on { background: #fff3d6 !important; border-color: #f0c36d !important; color: #a86b00 !important; }

/* 未开启提示音的引导条（在 .wrap 之外，故自带左右内边距与最大宽度以对齐 .wrap） */
.notify-off-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  max-width: 1280px; box-sizing: border-box; margin: 16px auto 0;
  width: calc(100% - 36px); padding: 10px 14px;
  background: linear-gradient(90deg, #fff8e6, #fffdf7);
  border: 1px solid #f2dfae; border-radius: 10px;
  font-size: 13.5px; color: #7a5a10;
}
.notify-off-bar .nob-i { font-size: 16px; }
.notify-off-bar .nob-t { flex: 1; min-width: 160px; font-weight: 600; }

/* 右上角新单浮层 */
.notif-stack {
  position: fixed; top: 64px; right: 16px; z-index: 9000;
  display: flex; flex-direction: column; gap: 9px;
  max-width: min(340px, calc(100vw - 32px)); pointer-events: none;
}
.notif-card {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 11px 13px; pointer-events: auto; cursor: pointer;
  background: #fff; border: 1px solid #e2e9f3; border-left: 4px solid var(--primary);
  border-radius: 11px; box-shadow: 0 8px 26px rgba(20,61,110,.16);
  animation: nf-in .26s cubic-bezier(.2,.9,.3,1.2);
  transition: transform .16s, box-shadow .16s;
}
.notif-card:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(20,61,110,.22); }
.notif-card.out { animation: nf-out .25s forwards; }
@keyframes nf-in  { from { opacity: 0; transform: translateX(26px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes nf-out { to { opacity: 0; transform: translateX(26px) scale(.96); } }
.notif-card .nc-ico { font-size: 19px; line-height: 1.2; }
.notif-card .nc-body { flex: 1; min-width: 0; }
.notif-card .nc-t { font-weight: 700; font-size: 13.5px; color: var(--primary); }
.notif-card .nc-s { font-size: 13.5px; color: #22364d; margin-top: 2px; word-break: break-all; }
.notif-card .nc-d { font-size: 12px; color: #7a8a9c; margin-top: 2px; }
.notif-card .nc-x {
  border: 0; background: transparent; color: #9aa8b8; cursor: pointer;
  font-size: 17px; line-height: 1; padding: 0 2px;
}
.notif-card .nc-x:hover { color: #55697f; }

/* 设置面板 */
.nf-row { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px dashed var(--line); }
.nf-row:last-of-type { border-bottom: 0; }
.nf-row .nf-lb { width: 82px; flex-shrink: 0; font-weight: 600; color: #33475b; font-size: 13.5px; padding-top: 5px; }
.nf-row .nf-ctl { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; align-items: flex-start; }
.nf-row .nf-ctl > select { width: 100%; max-width: 260px; }
.nf-chk { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; cursor: pointer; }
.nf-num { width: 58px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 7px; font-size: 13.5px; text-align: center; }
.nf-note {
  margin-top: 12px; padding: 10px 12px; background: #f4f8ff; border-radius: 9px;
  font-size: 12.5px; color: #47607d; line-height: 1.65;
}

@media (max-width: 620px) {
  .notif-stack { top: 56px; right: 10px; left: 10px; max-width: none; }
  .nf-row { flex-direction: column; gap: 6px; }
  .nf-row .nf-lb { width: auto; padding-top: 0; }
}

/* ================= 🎙 语音播报增强 ================= */

/* 语音播报样式行（配送 / 维修 各一条，带试听） */
.nf-voice {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  width: 100%; padding: 7px 10px; background: #f7fafd;
  border: 1px solid #e6eef7; border-radius: 8px; font-size: 13px;
}
.nf-voice > span { color: #5a7089; }
.nf-voice > b { color: var(--primary); }
.nf-voice > button { margin-left: auto; }

/* 维修任务浮层：左侧色条改蓝绿，与配送的蓝区分开 */
.notif-card.k-repair { border-left-color: #17a673; }
.notif-card.k-repair .nc-t { color: #0f7a55; }

@media (max-width: 620px) {
  .nf-voice > button { margin-left: 0; }
}
