* { box-sizing: border-box; }
body { margin: 0; font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
       background: #f4f6f9; color: #222; font-size: 14px; line-height: 1.6; }
.topbar { background: #fff; border-bottom: 1px solid #e3e7ee; padding: 0 20px;
          display: flex; align-items: center; gap: 24px; flex-wrap: wrap; position: sticky; top: 0; z-index: 5; }
.brand { font-weight: 500; font-size: 16px; color: #185fa5; padding: 12px 0; }
.topbar nav { display: flex; flex-wrap: wrap; }
.topbar nav a { color: #444; text-decoration: none; padding: 12px 12px; font-size: 14px; }
.topbar nav a:hover { color: #185fa5; }
main { max-width: 1080px; margin: 0 auto; padding: 18px 16px 60px; }
h1 { font-size: 20px; font-weight: 500; margin: 6px 0 14px; }
h2 { font-size: 16px; font-weight: 500; margin: 22px 0 10px; }
h3 { font-size: 14px; font-weight: 500; margin: 0 0 8px; color: #0c447c; }
.page-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.page-head h1 { margin: 0; }
.row-tool { margin: 10px 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.stat { background: #fff; border-radius: 12px; padding: 12px 14px; border-left: 4px solid #ccc;
        box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.stat.blue { border-left-color: #378add; } .stat.teal { border-left-color: #1d9e75; }
.stat.amber { border-left-color: #ef9f27; } .stat.gray { border-left-color: #888780; }
.stat .k { font-size: 12px; color: #777; }
.stat .v { font-size: 17px; font-weight: 500; margin: 2px 0; }
.stat .w { font-size: 12px; color: #0f6e56; }
.stat .w a, .stat a { color: #185fa5; }
.alert-bar { background: #faeeda; border: 1px solid #ef9f27; border-radius: 8px; padding: 8px 12px;
             margin: 12px 0; font-size: 13px; }
.chip { display: inline-block; background: #fff; border: 1px solid #ef9f27; color: #633806;
        border-radius: 12px; padding: 1px 10px; margin: 2px 4px 2px 0; }
.badge { display: inline-block; background: #f09595; color: #501313; border-radius: 4px;
         font-size: 11px; padding: 0 5px; margin-right: 6px; }
.tbl-wrap { overflow-x: auto; background: #fff; border-radius: 10px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
table { border-collapse: collapse; width: 100%; min-width: 760px; }
th { text-align: left; background: #f7f9fc; font-weight: 500; color: #444;
     padding: 8px 10px; border-bottom: 1px solid #e3e7ee; white-space: nowrap; }
td { padding: 8px 10px; border-bottom: 1px solid #eef1f6; vertical-align: top; }
tr:last-child td { border-bottom: none; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.strong { font-weight: 500; } .red { color: #a32d2d; }
.sub { font-size: 11px; color: #999; }
.dim { color: #b0b3ba; } .empty { text-align: center; color: #999; padding: 26px; }
.ops { white-space: nowrap; }
.ops form { display: inline; }
.btn { display: inline-block; border: 1px solid #c9d2de; background: #fff; color: #333;
       border-radius: 8px; padding: 6px 14px; text-decoration: none; cursor: pointer; font-size: 14px; }
.btn:hover { border-color: #378add; color: #185fa5; }
.btn.blue { background: #185fa5; border-color: #185fa5; color: #fff; }
.btn.teal { background: #0f6e56; border-color: #0f6e56; color: #fff; }
.btn.danger { color: #a32d2d; border-color: #f09595; }
.btn.danger:hover { background: #fcebeb; color: #a32d2d; }
.btn.sm { padding: 2px 9px; font-size: 12px; border-radius: 6px; margin-right: 4px; }
.tabs { margin: 12px 0; }
.tabs a { display: inline-block; padding: 6px 14px; color: #555; text-decoration: none;
          border: 1px solid #e3e7ee; background: #fff; border-radius: 8px 8px 0 0; margin-right: 4px; }
.tabs a.on { background: #fff; border-bottom-color: #185fa5; color: #185fa5; font-weight: 500; }
.form { background: #fff; border-radius: 12px; padding: 16px; max-width: 760px;
        box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.form-sec { border-bottom: 1px dashed #e3e7ee; padding: 8px 0 14px; margin-bottom: 6px; }
.form-sec:last-child { border-bottom: none; }
label { display: block; margin: 8px 0; color: #444; font-size: 13px; }
label input, label select, label textarea {
  display: block; width: 100%; max-width: 520px; margin-top: 4px; padding: 8px 10px;
  border: 1px solid #cdd5e0; border-radius: 8px; font-size: 14px; background: #fff; }
label input:focus, label select:focus, label textarea:focus { outline: none; border-color: #378add; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
small { color: #999; font-size: 12px; }
label.check { display: flex; align-items: center; gap: 8px; }
label.check input { width: auto; margin: 0; }
.form-actions { display: flex; gap: 10px; margin-top: 14px; }
.calc-preview { background: #e6f1fb; color: #0c447c; border-radius: 8px; padding: 10px 12px;
                margin-top: 12px; font-variant-numeric: tabular-nums; font-size: 13px; }
.err { background: #fcebeb; color: #a32d2d; border: 1px solid #f7c1c1; border-radius: 8px;
       padding: 8px 12px; margin-bottom: 10px; }
.hint { color: #777; font-size: 12px; margin: 4px 0; }
.tag { border-radius: 5px; padding: 1px 7px; font-size: 12px; white-space: nowrap; }
.tag.blue { background: #e6f1fb; color: #0c447c; } .tag.teal { background: #e1f5ee; color: #04342c; }
.foot { text-align: center; color: #aaa; font-size: 12px; padding: 18px; }
.login-body { display: flex; align-items: center; justify-content: center; min-height: 70vh; }
.login-card { width: 340px; }
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } }
.file-cell { white-space: nowrap; }
.btn.file { color: #185fa5; border-color: #85b7eb; background: #e6f1fb; }
.btn.file.inv { color: #0f6e56; border-color: #5DCAA5; background: #e1f5ee; }

/* 回液起算日提示条（暂时隐藏更早回液时出现） */
.notice { border-radius: 6px; padding: 9px 12px; font-size: 13px; margin: 10px 0 14px; line-height: 1.75; }
.notice.warn { background: #fff7e6; border: 1px solid #f0d08a; color: #6b4a08; }
.notice a { color: #1a5fb4; }

/* ---------- 微信备份手动同步条 ---------- */
.sync-bar { display: flex; align-items: flex-start; gap: 14px;
  background: #f0f7ff; border: 1px solid #b8d8f5; border-left: 4px solid #185fa5;
  border-radius: 8px; padding: 12px 14px; margin: 12px 0 18px; }
.sync-txt { flex: 1; min-width: 0; font-size: 13px; color: #333; line-height: 1.7; }
.sync-txt > b { display: block; font-size: 14px; color: #185fa5; margin-bottom: 2px; }
.sync-files { margin: 6px 0 0; padding-left: 18px; font-size: 12px; color: #555; }
.sync-files li { margin: 1px 0; word-break: break-all; }
.sync-btn { flex: none; background: #185fa5; border-color: #185fa5; color: #fff;
  padding: 9px 20px; font-size: 14px; border-radius: 8px; cursor: pointer; }
.sync-btn:hover:not(:disabled) { background: #144e87; }
.sync-btn:disabled { background: #9fb8d0; border-color: #9fb8d0; cursor: default; }
