/* ============================================================
   500总吨内沿海小船工作台 - 样式（r52：电脑优先 + 移动端自适应）
   - 默认（移动端）：底部 Tab 导航
   - ≥ 900px（电脑）：左侧 240px 侧栏 + 大字版式，高大上观感
   ============================================================ */

:root {
  --primary: #1e88e5;
  --primary-d: #0d47a1;
  --secondary: #0288d1;
  --accent: #ff8f00;          /* 财务重点色 */
  --bg: #eef3f8;
  --card-bg: #ffffff;
  --text: #1a2733;
  --text-muted: #6b7c8c;
  --border: #dfe6ee;
  --border-light: #eef2f6;
  --success: #2e9e5b;
  --danger: #e0524d;
  --radius: 10px;
  --radius-sm: 6px;
  --sidebar-w: 240px;          /* 电脑侧栏宽度 */
  /* 顶部品牌栏：banner 内容高度 + 让出状态栏/刘海/返回键（顶部 padding） */
  --banner-h: 60px;
  --header-h: 56px;
  --nav-h: 60px;              /* 底部导航高度（移动端） */
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
html {
  background: var(--card-bg);
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
  overflow: hidden;
  overscroll-behavior-y: contain;
  -webkit-tap-highlight-color: transparent;
}

/* ---------- 顶部品牌栏 ---------- */
.app-banner {
  flex: 0 0 auto;
  padding-top: env(safe-area-inset-top, 46px);
  height: calc(var(--banner-h) + env(safe-area-inset-top, 46px));
  background:
    radial-gradient(ellipse at 85% 0%, rgba(255,213,79,.35), transparent 60%),
    linear-gradient(135deg, #4fc3f7 0%, #1565c0 55%, #0d3c75 100%);
  color: #fff;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(13, 60, 117, .35);
  position: relative;
  z-index: 50;
}
.app-banner::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.05) 0%, rgba(255,255,255,0) 60%);
  pointer-events: none;
}
.banner-inner {
  height: var(--banner-h);
  display: flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 600; letter-spacing: 0.3px;
  padding: 0 14px 6px;
  width: 100%; max-width: 1200px;
}
.banner-logo {
  font-size: 22px; color: #ffd54f;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.25));
}
.banner-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 80vw; text-shadow: 0 1px 2px rgba(0,0,0,.2); }

/* ---------- 整体布局 ----------
   默认（移动端）：纵向 - banner / 内容 / 底部导航
   电脑（≥900px）：横向 - 左栏(品牌栏+导航,蓝色背景) + 右主区 */
.left-rail { display: contents; }
/* r171：左侧栏底部版本号——移动端默认隐藏（避免与底部固定导航重叠），仅桌面端显示 */
.rail-version { display: none; }
.app-shell { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }

/* ---------- 顶部品牌栏 ---------- */
.app-banner {
  flex: 0 0 auto;
  padding-top: env(safe-area-inset-top, 46px);
  height: calc(var(--banner-h) + env(safe-area-inset-top, 46px));
  background:
    radial-gradient(ellipse at 85% 0%, rgba(255,213,79,.35), transparent 60%),
    linear-gradient(135deg, #4fc3f7 0%, #1565c0 55%, #0d3c75 100%);
  color: #fff;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(13, 60, 117, .35);
  position: relative;
  z-index: 50;
}
.app-banner::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.05) 0%, rgba(255,255,255,0) 60%);
  pointer-events: none;
}
.banner-inner {
  height: var(--banner-h);
  display: flex; align-items: center; gap: 8px;
  font-size: 17px; font-weight: 700; letter-spacing: 0.5px;
  padding: 0 16px 8px;
  width: 100%; max-width: 1200px;
}
.banner-logo {
  font-size: 24px; color: #ffd54f;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.25));
}
.banner-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 80vw; text-shadow: 0 1px 2px rgba(0,0,0,.2); }

.app-main {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 12px calc(var(--nav-h) + env(safe-area-inset-bottom, 12px) + 8px);
  padding-top: calc(12px + env(safe-area-inset-top, 0px));
  background:
    radial-gradient(ellipse at 50% -8%, rgba(79,195,247,.12), transparent 55%),
    linear-gradient(180deg, #f4f8fc 0%, #eef3f8 100%);
  font-size: 15.5px; line-height: 1.6;
}

/* ---------- 底部/侧栏导航 ----------
   桌面端：左侧固定 240px 垂直导航，与右主区用 box-shadow 分隔
   移动端：固定底部水平 Tab（保留旧行为） */
.side-nav {
  flex: 0 0 auto;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom, 8px));
  padding-bottom: env(safe-area-inset-bottom, 8px);
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-top: 1px solid rgba(13, 60, 117, .08);
  box-shadow: 0 -2px 10px rgba(0,0,0,0.06);
  display: flex;
  position: fixed; left: 0; right: 0; bottom: 0;
  z-index: 60;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.nav-tab {
  flex: 1 1 0; min-width: 52px; border: none; background: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; color: var(--text-muted); font-size: 11px;
  padding: 6px 2px;
  position: relative;
  transition: color .18s, transform .18s, background .18s;
}
.nav-tab i { font-size: 19px; transition: transform .2s; }
.nav-tab.active { color: var(--primary); font-weight: 700; }
.nav-tab.active i { transform: translateY(-2px) scale(1.1); }
.nav-tab.active::after {
  content: ''; position: absolute; top: 4px; left: 50%; transform: translateX(-50%);
  width: 22px; height: 3px; border-radius: 2px;
  background: linear-gradient(90deg, #4fc3f7, #1565c0);
  box-shadow: 0 1px 4px rgba(21, 101, 192, .35);
}
.nav-tab-accent.active { color: var(--accent); }
.nav-tab-accent.active::after { background: linear-gradient(90deg, #ffb74d, #fb8c00); box-shadow: 0 1px 4px rgba(251, 140, 0, .4); }
.nav-tab:active { background: rgba(232, 240, 250, .6); border-radius: 12px; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--card-bg);
  border: 1px solid rgba(223,230,238,.7);
  border-radius: 14px;
  margin-bottom: 12px;
  box-shadow: 0 1px 2px rgba(16,40,70,.04), 0 6px 16px rgba(16,40,70,.06);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}
@media (hover: hover) {
  .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(16,40,70,.05), 0 14px 30px rgba(16,40,70,.10);
  }
}
.card-head {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 15px; border-bottom: 1px solid var(--border-light);
  background: linear-gradient(180deg, rgba(79,195,247,.07), rgba(79,195,247,0));
}
.card-head .ct-icon { color: var(--primary); font-size: 15px; }
.card-head .ct-title { font-weight: 700; font-size: 15px; }
.card-head .ct-sub { font-size: 12px; color: var(--text-muted); margin-left: auto; }
.card-body { padding: 12px 14px; }
.sec-tip { font-size: 12px; color: var(--text-muted); margin: 0 0 10px; line-height: 1.5; }

/* ---------- 顶部操作条 ---------- */
.toolbar {
  display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap;
}
.toolbar .spacer { flex: 1; }

/* ---------- 按钮（大触控区，≥44px） ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 42px; padding: 0 16px; border-radius: var(--radius-sm);
  border: 1px solid transparent; font-size: 14px; font-weight: 600; cursor: pointer;
  font-family: inherit; line-height: 1; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
@media (hover: hover) {
  .btn:hover { box-shadow: 0 6px 16px rgba(16,40,70,.16); transform: translateY(-1px); }
  .btn:active { transform: translateY(1px); box-shadow: none; }
}
.btn-primary { background: linear-gradient(135deg, #42a5f5 0%, #1565c0 100%); color: #fff; }
.btn-accent { background: linear-gradient(135deg, #ffa726 0%, #fb8c00 100%); color: #fff; }
.btn-success { background: linear-gradient(135deg, #43c06a 0%, #2e9e5b 100%); color: #fff; }
.btn-outline { background: #fff; border-color: var(--border); color: var(--text); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-danger { background: #fff; border-color: #f3c2c0; color: var(--danger); }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 13px; }
.btn-xs { min-height: 28px; padding: 0 8px; font-size: 12px; border-radius: 4px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- 列表项（航次/船舶卡片式） ---------- */
.row-card {
  background: #fff; border: 1px solid rgba(223,230,238,.7); border-radius: 14px;
  padding: 13px 15px; margin-bottom: 10px; cursor: pointer;
  box-shadow: 0 1px 2px rgba(16,40,70,.04), 0 4px 12px rgba(16,40,70,.05);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
@media (hover: hover) {
  .row-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(16,40,70,.05), 0 12px 26px rgba(16,40,70,.10);
    border-color: #dbe6f0;
  }
}
.row-card:active { background: #f6f9fc; transform: translateY(0); }
.row-top { display: flex; align-items: center; gap: 8px; }
.row-title { font-weight: 700; font-size: 15px; }
.row-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
/* r72：实算吨位超过实际吨位给红框提示 */
.input.over-act { border-color: #d33 !important; box-shadow: 0 0 0 2px rgba(217,51,51,.12); }
.row-right { margin-left: auto; text-align: right; }
.row-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 12px; color: var(--text-muted); }
.row-meta b { color: var(--text); font-weight: 600; }

/* 分组标题（船员按船归类） */
.group-h { font-size: 13px; font-weight: 700; color: var(--primary); padding: 6px 2px 8px; margin-top: 6px; border-bottom: 1px dashed var(--border); margin-bottom: 8px; cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; }
.group-h .grp-toggle { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; font-size: 11px; color: var(--primary); transition: transform .18s ease; flex: 0 0 auto; }
.group-h.collapsed .grp-toggle { transform: rotate(-90deg); }
.group-h .grp-name { flex: 1; display: flex; align-items: center; gap: 6px; min-width: 0; }
.group-h .grp-actions { display: inline-flex; gap: 6px; flex: 0 0 auto; }
.vy-grp-body { animation: grp-fade .15s ease; }

/* r57：航次页顶部"船名 chip 行"——6 条船横向铺开，点哪个跳哪个船的航次 */
.vy-ship-tabs {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 4px 0 14px;
  margin-bottom: 10px;
  border-bottom: 1px dashed var(--border-light);
}
.vy-ship-tab {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  cursor: pointer;
  font-size: 14px; font-weight: 600;
  color: #475569;
  white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, transform .12s, box-shadow .15s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.vy-ship-tab:hover { background: #e2e8f0; border-color: #cbd5e1; color: #1e293b; }
.vy-ship-tab:active { transform: scale(.97); }
.vy-ship-tab.active {
  background: linear-gradient(135deg, #1e88e5 0%, #1565c0 60%, #0d3c75 100%);
  color: #fff; border-color: transparent;
  box-shadow: 0 4px 14px rgba(30, 136, 229, .35);
}
.vy-ship-tab .vy-ship-name { letter-spacing: .3px; }
.vy-ship-tab .vy-ship-count {
  display: inline-block;
  background: rgba(0, 0, 0, .08);
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 12px; font-weight: 700;
  min-width: 22px; text-align: center;
}
.vy-ship-tab.active .vy-ship-count { background: rgba(255, 255, 255, .25); color: #fff; }
@keyframes grp-fade { from { opacity: .4; } to { opacity: 1; } }

/* ---------- 徽章 ---------- */
.badge { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.badge-blue { background: #e3f1fb; color: #1565c0; }
.badge-green { background: #e3f6ea; color: #2e9e5b; }
.badge-red { background: #fbe6e5; color: #e0524d; }
.badge-amber { background: #fdf0dc; color: #c77700; }
.badge-gray { background: #eef1f4; color: #6b7c8c; }

/* 滞期指示 3 段彩色芯片（共用 / 允许 / 滞期），跑在航次卡片底部，比之前更显眼 */
.vc-lag { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.vc-lag-seg { display: inline-flex; align-items: center; gap: 4px; font-size: 13.5px; font-weight: 700; padding: 4px 10px; border-radius: 14px; line-height: 1.4; white-space: nowrap; }
.vc-lag-seg.common { background: #ece3ff; color: #5b3fd6; border: 1px solid #d6c5ff; }
.vc-lag-seg.common b { color: #5b3fd6; font-weight: 800; font-size: 14.5px; }
.vc-lag-seg.allow { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }
.vc-lag-seg.allow b { color: #1f2937; font-weight: 800; font-size: 14.5px; }
.vc-lag-seg.ok { background: #d6f0df; color: #1a7a4d; border: 1px solid #a8dfc1; }
.vc-lag-seg.ok b { color: #1a7a4d; font-weight: 800; font-size: 14.5px; }
.vc-lag-seg.over { background: #fbd6d2; color: #b8221a; border: 1px solid #f5a8a0; }
.vc-lag-seg.over b { color: #b8221a; font-weight: 800; font-size: 14.5px; }
.vc-lag-seg.ndem { background: #fff0d6; color: #8a5a00; border: 1px solid #ffd591; }
.vc-lag-seg.ndem b { color: #8a5a00; font-weight: 800; font-size: 14.5px; }

/* 航次进度：4 节点（到装货港 / 货装好开船 / 到卸货港 / 货卸空） */
.vprog { display: flex; align-items: center; gap: 0; margin: 8px 0 2px; position: relative; padding-top: 14px; }
/* r220：航次进度条上的小船轻轻上下浮动 + 微微摇晃，像漂在水面上 */
@keyframes boat-bob {
  0%, 100% { transform: translateX(-50%) translateY(0)      rotate(-3deg); }
  50%      { transform: translateX(-50%) translateY(-3.5px) rotate(3deg); }
}
.vprog-boat {
  position: absolute; top: -2px;
  font-size: 14px; line-height: 1;
  transform: translateX(-50%);
  transition: left .35s ease;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.18));
  pointer-events: none;
  z-index: 2;
  animation: boat-bob 2.6s ease-in-out infinite;
  transform-origin: 50% 80%; /* 轴心压低到"水线"，摇摆更像船而不是转圈 */
}
/* 系统开了「减少动态效果」或打印时，保持静止 */
@media (prefers-reduced-motion: reduce) { .vprog-boat { animation: none; } }
@media print { .vprog-boat { animation: none; } }
/* ★ r30：小船边只显阶段文字（去掉日期时间）；默认贴右，靠右时 .flip 翻到左 */
.vprog-date {
  position: absolute; top: 0;
  font-size: 11px; line-height: 14px;
  white-space: nowrap; pointer-events: none;
  z-index: 2;
  transform: translateX(10px);
  background: rgba(255,255,255,0.92);
  padding: 1px 6px; border-radius: 3px;
  border: 1px solid #cfe2f6;
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
}
.vprog-date .vs { color: #1565c0; font-weight: 700; }
.vprog-date.flip { transform: translateX(calc(-100% - 10px)); }
.vp { width: 11px; height: 11px; border-radius: 50%; background: #e0e6ea; border: 2px solid #cfd8dc; flex: 0 0 auto; box-sizing: border-box; }
.vp.on { background: var(--primary); border-color: #1565c0; }
.vp.vp-warn { background: var(--primary); border-color: #1565c0; box-shadow: 0 0 0 2px #ffb84d; animation: vp-pulse 1.6s ease-in-out infinite; }
@keyframes vp-pulse { 0%,100% { box-shadow: 0 0 0 2px #ffb84d; } 50% { box-shadow: 0 0 0 5px #ffd9a8; } }
.vp-line { height: 3px; flex: 1; background: #e0e6ea; border-radius: 2px; }
.vp-line.on { background: var(--primary); }
.vno { background: #e3f2fd; color: #1565c0; border-radius: 6px; padding: 1px 7px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.row-del { margin-left: auto; border: none; background: transparent; color: #b0bcc7; font-size: 14px; padding: 4px 6px; border-radius: 6px; line-height: 1; }
.row-del:active { background: #fbe6e5; color: #e0524d; }

/* 航次卡片：船名大黑粗体居首 + 货主小字次行 */
.vc-ship { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 0 4px; border-bottom: 1px dashed var(--border-light); margin-bottom: 6px; flex-wrap: wrap; }
.vc-del { color: #c0392b; padding: 2px 7px; margin-left: 2px; flex-shrink: 0; }
.vc-del:hover { background: #fdecea; }
/* 向货主结算总计（航次卡片·暖黄底醒目） */
.vc-settle { background: #fff7e6; border: 1px solid #d4a017; border-radius: 4px; padding: 1px 6px; font-weight: 700; color: #8a6500; }
.vc-settle b.pos { color: #b35900; }
/* r66：航次卡右上角"向货主结算总计"小药丸——紧挨「在途」chip 显示 */
.vc-settle-inline {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 10px;
  background: #eaf3fc;
  border: 1px solid #cfe2f6;
  border-radius: 999px;
  font-size: 12px; font-weight: 600;
  color: #1565c0;
  white-space: nowrap;
  line-height: 1.4;
}
.vc-settle-inline .vc-settle-label { color: #5a7a96; font-weight: 500; }
.vc-settle-inline .pos { font-size: 14px; font-weight: 800; color: #2e9e5b; font-variant-numeric: tabular-nums; }
/* 船名：去掉 word-break:break-all（会把"浙椒机1101"在数字前硬拆），改为「中文按字换行、英文/数字尽量不拆」；
   配合父级 flex-wrap:wrap，徽标/按钮在窄屏换到下一行，不再挤压船名 */
.vc-ship-name { font-size: 19px; font-weight: 900; color: #0d1f2d; letter-spacing: 0.5px; line-height: 1.2; flex: 1 1 auto; min-width: 0; word-break: normal; overflow-wrap: break-word; }
.vc-shipper { font-size: 12.5px; color: var(--text); margin: 6px 0 8px; line-height: 1.5; }
.vc-shipper b { color: #0d1f2d; font-weight: 700; }

/* ---------- 空状态 ---------- */
.empty {
  text-align: center; padding: 40px 16px; color: var(--text-muted);
}
.empty i { font-size: 34px; color: var(--primary); opacity: 0.5; display: block; margin-bottom: 10px; }
.empty .e-tip { font-size: 13px; margin-top: 4px; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 12px; }
.field > label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; color: #34444f; }
.field .req { color: var(--danger); margin-left: 2px; }
.input, .select, .textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; font-size: 16px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff;
  font-family: inherit; color: var(--text);
}
.textarea { min-height: 80px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); outline: none; }
.check-row { display: flex; flex-wrap: wrap; gap: 8px; }
.check-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px;
  border: 1px solid var(--border); border-radius: 20px; font-size: 13px; cursor: pointer; user-select: none;
}
.check-pill input { width: 16px; height: 16px; }
.check-pill.on { background: #e3f1fb; border-color: var(--primary); color: var(--primary); }

/* 装卸允许时间按钮组 */
.lay-btn {
  border: 1px solid var(--border); background: #fff; color: var(--text);
  padding: 9px 14px; border-radius: 10px; font-size: 14px; cursor: pointer;
  font-weight: 600; min-width: 56px; min-height: 40px;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.lay-btn.on {
  background: linear-gradient(135deg, var(--primary), #1876d3);
  border-color: var(--primary); color: #fff;
  box-shadow: 0 2px 6px rgba(21, 101, 192, 0.32);
}

/* ---------- 汇总数字条 ---------- */
.summary-bar {
  display: flex; background: linear-gradient(135deg, #0a2a4a, #1565c0); color: #fff;
  border-radius: var(--radius); padding: 14px; margin-bottom: 12px; gap: 8px;
}
.summary-bar .sb-item { flex: 1; text-align: center; }
.summary-bar .sb-val { font-size: 18px; font-weight: 800; }
.summary-bar .sb-lab { font-size: 11px; opacity: 0.85; margin-top: 2px; }

/* ---------- 财务表格 ---------- */
.ftable { width: 100%; border-collapse: collapse; font-size: 13px; }
.ftable th, .ftable td { padding: 9px 8px; text-align: left; border-bottom: 1px solid var(--border-light); }
.ftable th { color: var(--text-muted); font-weight: 600; font-size: 12px; }
.ftable td.num, .ftable th.num { text-align: right; font-variant-numeric: tabular-nums; }
.ftable tr:active { background: #f6f9fc; }
.pos { color: var(--success); font-weight: 700; }

/* ---------- 按货主结算汇总 ---------- */
.settle-group { margin-bottom: 16px; border: 1px solid var(--border-light); border-radius: var(--radius); overflow: hidden; }
.settle-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: #fff7e6; border-bottom: 1px solid #f0e0b8; padding: 9px 12px; }
.settle-name { font-size: 15px; font-weight: 800; color: #8a6500; }
.settle-sub { font-size: 12px; color: var(--text-muted); }
.settle-total { margin-left: auto; font-size: 13px; color: #8a6500; font-weight: 700; }
.settle-total b { color: #b35900; font-size: 17px; font-variant-numeric: tabular-nums; }
.settle-group .ftable th, .settle-group .ftable td { padding: 7px 8px; }
.grp-total { background: #fff7e6; font-weight: 800; }
.sum-bar { margin-top: 12px; padding: 12px 14px; background: linear-gradient(135deg,#1565c0,#29b6f6); color: #fff; border-radius: var(--radius); font-size: 14px; }
.sum-bar b { color: #fff7e6; font-size: 19px; font-variant-numeric: tabular-nums; }
.neg { color: var(--danger); font-weight: 700; }

/* ---------- 详情弹层（航次财务编辑用整页覆盖） ---------- */
.sheet-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 80;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.sheet {
  background: #fff; max-height: 92vh; overflow-y: auto; border-radius: 14px 14px 0 0;
  padding: calc(12px + env(safe-area-inset-top,0px)) 16px calc(20px + env(safe-area-inset-bottom,0px));
  animation: slideUp .22s ease;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.sheet-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.sheet-head .sh-title { font-weight: 800; font-size: 16px; }
.sheet-head .sh-close { margin-left: auto; font-size: 20px; color: var(--text-muted); background: none; border: none; }

/* ---------- 航次详情内嵌页（左侧导航栏保持可见） ---------- */
.voyage-detail { max-width: 980px; margin: 0 auto; animation: fadeIn .18s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.vd-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.vd-head .vd-title { font-weight: 800; font-size: 18px; color: var(--text); }
.vd-foot { display: flex; gap: 10px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border-light); flex-wrap: wrap; }
.vd-foot .btn-primary { flex: 1 1 140px; }

/* 财务分区标题 */
.fin-sec { font-weight: 700; font-size: 14px; margin: 14px 0 8px; color: var(--primary); display: flex; align-items: center; gap: 6px; }
.fin-sec.amber { color: var(--accent); }
.fin-sec i { font-size: 13px; }
.fin-auto {
  background: #f3f8fc; border: 1px dashed var(--border); border-radius: var(--radius-sm);
  padding: 10px 12px; margin-bottom: 12px; font-size: 13px; color: #34444f;
}
.fin-auto .fa-val { font-weight: 800; font-size: 17px; color: var(--primary); }
.fin-result {
  background: linear-gradient(135deg,#1565c0,#29b6f6); color:#fff; border-radius: var(--radius);
  padding: 14px; margin: 12px 0;
}
.fin-result .fr-row { display: flex; justify-content: space-between; padding: 3px 0; font-size: 13px; }
.fin-result .fr-row.big { font-size: 16px; font-weight: 800; border-top: 1px solid rgba(255,255,255,.25); margin-top: 6px; padding-top: 8px; }
.fin-result .fr-row.settle { font-size: 18px; font-weight: 900; background: rgba(255, 247, 230, 0.92); color: #8a6500; border-top: 2px solid #fff; margin: 10px -10px -2px; padding: 10px 12px; border-radius: 0 0 8px 8px; }
.fin-result .fr-row.settle span.pos { color: #b35900; font-size: 20px; }
/* r182：三笔账横排卡片（笔1/笔2运费金额/笔3/本航次收入） */
.fin-result.fin-strip { display: flex; gap: 10px; flex-wrap: wrap; padding: 12px; }
.fin-result.fin-strip .fr-card { flex: 1 1 150px; min-width: 140px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 4px; }
.fin-result.fin-strip .fr-card.big { flex: 1.4 1 160px; background: rgba(255,247,230,.95); border-color: #fff; }
.fin-result.fin-strip .fr-card.settle { background: rgba(255,247,230,.95); border-color: #fff; }
.fin-result.fin-strip .fr-lab { font-size: 12px; font-weight: 700; line-height: 1.35; opacity: .95; }
.fin-result.fin-strip .fr-lab .fr-sub { font-weight: 500; font-size: 11px; opacity: .8; }
.fin-result.fin-strip .fr-card.big .fr-lab { color: #8a6500; font-size: 13px; font-weight: 800; }
.fin-result.fin-strip .fr-card.settle .fr-lab { color: #8a6500; }
.fin-result.fin-strip .fr-val { font-size: 19px; font-weight: 900; }
.fin-result.fin-strip .fr-card.big .fr-val { color: #b35900; font-size: 22px; }
.fin-result.fin-strip .fr-card.settle .fr-val { color: #b35900; font-size: 20px; }
.fin-result.fin-strip .fr-break { font-size: 11px; opacity: .85; color: #5a4500; line-height: 1.35; margin-top: -2px; }
/* 向货主结算总计（表单预览·财务页摘要） */
.fa-settle { display: inline-block; background: #fff7e6; border: 1px solid #d4a017; border-radius: 4px; padding: 2px 8px; font-weight: 700; color: #8a6500; margin-top: 4px; }
.fa-settle b { color: #b35900; font-size: 16px; }

/* ---------- r208：本船收支三块总览卡片（本船收入合计 / 本船支出合计 / 本船利润） ---------- */
.fin-sum-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 10px; }
.fin-sum-card {
  background: #fff; border: 1px solid var(--border, #d6e0ea); border-radius: var(--radius, 10px);
  padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0;
}
.fin-sum-card .fsc-lab {
  font-size: 12.5px; font-weight: 700; color: #0a2a4a; line-height: 1.35;
  display: flex; align-items: center; gap: 5px; white-space: nowrap;
}
.fin-sum-card .fsc-lab i { font-size: 12px; opacity: .9; }
.fin-sum-card .fsc-sub { font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fin-sum-card .fsc-val { font-size: 19px; font-weight: 900; margin-top: 3px; font-variant-numeric: tabular-nums; word-break: break-all; }
.fin-sum-card.inc { background: #eef6fd; border-color: #bfdcf5; }
.fin-sum-card.inc .fsc-lab, .fin-sum-card.inc .fsc-val { color: #1565c0; }
.fin-sum-card.exp { background: #fff6ec; border-color: #f2d9b8; }
.fin-sum-card.exp .fsc-lab, .fin-sum-card.exp .fsc-val { color: #b35900; }
.fin-sum-card.prof.prof-pos { background: #eefaf2; border-color: #bfe6ce; }
.fin-sum-card.prof.prof-pos .fsc-lab { color: #2e9e5b; }
.fin-sum-card.prof.prof-neg { background: #fdeeed; border-color: #f3c2c0; }
.fin-sum-card.prof.prof-neg .fsc-lab { color: #e0524d; }
.fin-sum-card.prof .fsc-val.pos { color: var(--success); }
.fin-sum-card.prof .fsc-val.neg { color: var(--danger); }
/* 笔1 / 笔3 参考行（紧跟三块卡片下方） */
.fin-ref-line {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  background: #f3f8fc; border: 1px dashed var(--border); border-radius: var(--radius-sm);
  padding: 8px 10px; margin-bottom: 10px; font-size: 12.5px; color: #34444f;
}
.fin-ref-line b { font-weight: 800; }
.fin-ref-line .fin-ref-note { color: #d4a017; font-size: 11.5px; }
@media (max-width: 560px) {
  .fin-sum-grid { gap: 7px; }
  .fin-sum-card { padding: 8px 9px; }
  .fin-sum-card .fsc-lab { font-size: 11.5px; gap: 3px; }
  .fin-sum-card .fsc-lab i { display: none; }
  .fin-sum-card .fsc-sub { font-size: 10.5px; }
  .fin-sum-card .fsc-val { font-size: 16px; }
}

/* ---------- 财务单船支出：分类卡片网格 + 条目 4 列网格 ---------- */
.fin-sections-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 10px; }
.fin-section-card { background: #fff; border: 1px solid var(--border, #d6e0ea); border-radius: var(--radius, 10px); padding: 12px; }
.fin-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.fin-row {
  display: flex; flex-direction: column; gap: 3px;
  background: #f8fafc; border: 1px solid #e3edf3; border-radius: 8px;
  padding: 7px 8px; font-size: 12px; line-height: 1.35; min-width: 0;
}
.fin-row.fin-empty { grid-column: 1 / -1; background: #fafbfc; color: var(--text-muted); justify-content: center; padding: 14px; font-size: 12.5px; }
.fin-row .fin-title { font-weight: 700; color: #0a2a4a; display: flex; align-items: center; justify-content: space-between; gap: 4px; min-width: 0; }
.fin-row .fin-title > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fin-row .fin-amount { font-weight: 800; color: var(--accent); font-size: 13px; flex: 0 0 auto; }
.fin-row .fin-meta { color: var(--text-muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fin-row .fin-meta b { color: #34444f; font-weight: 600; }
.fin-row .fin-ops { display: flex; justify-content: flex-end; gap: 4px; }
.fin-row .fin-ops .btn { padding: 4px 6px; font-size: 11px; }
.fin-row .fin-ops .btn i { margin: 0; }
/* r191：航次费用专用——每行一条、右侧滚动，标题不再截断 */
/* r194：最多显示 3 行，其余滚动查看 */
.fin-list-scroll { display: block; max-height: 108px; overflow-y: auto; padding-right: 4px; }
.fin-list-scroll .fin-row { flex-direction: row; align-items: center; gap: 8px; padding: 8px 10px; }
.fin-list-scroll .fin-row.fin-empty { justify-content: center; }
.fin-list-scroll .fin-row .fin-title { flex: 1 1 auto; min-width: 0; display: flex; }
.fin-list-scroll .fin-row .fin-title > span:first-child { white-space: normal; overflow: visible; text-overflow: clip; flex: 1 1 auto; }
.fin-list-scroll .fin-row .fin-amount { flex: 0 0 auto; margin-left: 12px; }
.fin-list-scroll .fin-row .fin-meta { display: none; }
.fin-list-scroll .fin-row .fin-ops { flex: 0 0 auto; margin-left: 4px; }
@media (max-width: 768px) {
  .fin-sections-grid { grid-template-columns: 1fr; }
  .fin-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fin-list-scroll { max-height: 90px; }
  .fin-list-scroll .fin-row .fin-title { font-size: 12px; }
  .fin-list-scroll .fin-row .fin-amount { font-size: 12px; }
}
.fin-card {
  background: #fff; border: 1px dashed #b9d4e7; border-radius: 8px;
  padding: 10px; margin-bottom: 6px;
}
.fin-card .field { margin-bottom: 0; }
.fin-card .field label { font-size: 11.5px; color: var(--text-muted); margin-bottom: 3px; }
.fin-card .field .input,
.fin-card .field .select {
  font-size: 13px; padding: 7px 9px; min-height: 32px;
}
.fin-card > div > .btn-primary { white-space: nowrap; }
/* r39：航次费用「关联航次」多选 checkbox 列表 */
.voy-chks { display: flex; flex-direction: column; gap: 5px; max-height: 160px; overflow-y: auto; border: 1px solid var(--border-light); border-radius: 6px; padding: 7px 9px; background: #fafcfe; }
.voy-chk { display: flex; align-items: center; gap: 7px; font-size: 12.5px; cursor: pointer; line-height: 1.4; }
.voy-chk input { flex: 0 0 auto; }
.voy-chk:hover { color: var(--primary); }
.muted { color: var(--text-muted); font-size: 12.5px; }

/* ---------- 月度汇总条 ---------- */
.month-row { display: flex; align-items: center; padding: 10px 4px; border-bottom: 1px solid var(--border-light); font-size: 13px; }
.month-row .m-name { font-weight: 700; width: 64px; }
.month-row .m-bar { flex: 1; height: 8px; background: #e8eef4; border-radius: 4px; overflow: hidden; margin: 0 10px; }
.month-row .m-bar > i { display: block; height: 100%; background: var(--accent); }

/* ---------- 单据缩略 ---------- */
.doc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.doc-thumb { position: relative; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: #f3f6f9; aspect-ratio: 1/1; }
.doc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.doc-thumb .dt-label { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.55); color: #fff; font-size: 10px; padding: 2px 4px; }
.doc-thumb .dt-del { position: absolute; top: 2px; right: 2px; background: rgba(0,0,0,.5); color: #fff; border: none; border-radius: 50%; width: 20px; height: 20px; font-size: 11px; }

/* ---------- 提醒项 ---------- */
.remind-item { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border-light); }
.remind-item .ri-dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
.remind-item.done { opacity: 0.55; }
.remind-item.done .ri-title { text-decoration: line-through; }

/* 运费回款：按货主分组 + 未结合计 */
.remind-summary {
  padding: 10px 14px; font-size: 14px; color: var(--text);
  background: linear-gradient(135deg, #fff7e6 0%, #fff1d6 100%);
  border-bottom: 1px solid var(--border-light);
}
.remind-summary b { color: var(--danger); font-size: 16px; }
.remind-group { border-bottom: 1px solid var(--border-light); }
.remind-group:last-child { border-bottom: none; }
.rg-head {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 14px; background: var(--bg);
  border-bottom: 1px solid var(--border-light);
  position: sticky; top: 0;
}
.rg-name { font-weight: 800; font-size: 14px; color: var(--text); }
.rg-sum { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--danger); }
.remind-group .remind-item:last-child { border-bottom: none; }

/* r35 简易提醒：已卸空标签 */
.remind-item .ri-pill { display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 700; margin-left: 6px; vertical-align: 1px; }
.remind-item .ri-pill-ok { background: #d1fae5; color: #065f46; }

/* ---------- 模态框（通用表单） ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 90;
  display: flex; align-items: center; justify-content: center; padding: 16px;
  padding-top: calc(16px + env(safe-area-inset-top, 0px)); padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
}
.modal {
  background: #fff; border-radius: 14px; width: 100%; max-width: 460px; max-height: 90vh;
  overflow-y: auto; box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}
.modal-head { display: flex; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--border-light); }
.modal-head .mh-title { font-weight: 800; font-size: 16px; }
.modal-head .mh-close { margin-left: auto; font-size: 20px; color: var(--text-muted); background: none; border: none; }
.modal-body { padding: 16px; }
.modal-foot { display: flex; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--border-light); padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
.modal-foot .btn { flex: 1; }
/* 速记每日动态 的日期/时间/类型 三列行：宽屏并排，手机类型独占一行（避免太窄打字） */
.qe-row { display: flex; gap: 10px; margin-bottom: 10px; }
.qe-row .field { margin: 0; }
.qe-row-3 > .field:nth-child(1) { flex: 1.1; }
.qe-row-3 > .field:nth-child(2) { flex: 1; }
.qe-row-3 > .field:nth-child(3) { flex: 1.3; }

/* ---------- 登录遮罩 ---------- */
/* ============== 登录 / 注册遮罩 ============== */
.login-overlay {
  position: fixed; inset: 0; z-index: 200;
  background:
    radial-gradient(ellipse at 80% -10%, rgba(124,200,255,.35), transparent 55%),
    radial-gradient(ellipse at -10% 100%, rgba(38,143,255,.45), transparent 60%),
    linear-gradient(165deg, #0a2748 0%, #0d3c75 38%, #1565c0 100%);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 24px 18px;
  padding-top: calc(24px + env(safe-area-inset-top, 0px));
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  overflow: hidden;
}
/* 海面装饰 SVG 背景层（绝对定位，zIndex 最低，不挡交互） */
.login-deco {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  opacity: .42;
}
.login-deco svg { width: 100%; height: 100%; display: block; }
/* 大品牌区（卡片上方） */
.login-brand {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center;
  margin-bottom: 22px; color: #fff; text-align: center;
}
.login-brand-icon {
  font-size: 46px; line-height: 1;
  width: 84px; height: 84px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.95), rgba(255,255,255,.55) 70%, rgba(255,255,255,.2));
  color: #0d3c75;
  box-shadow: 0 10px 30px rgba(13, 60, 117, .55), inset 0 1px 0 rgba(255,255,255,.6);
  margin-bottom: 12px;
  animation: brand-float 4s ease-in-out infinite;
}
@keyframes brand-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.login-brand-title {
  font-size: 22px; font-weight: 800; letter-spacing: 1.5px;
  text-shadow: 0 2px 8px rgba(0,0,0,.35);
}
.login-brand-sub {
  font-size: 13px; color: rgba(255,255,255,.85); margin-top: 4px;
  letter-spacing: .5px;
}
/* 主卡片（登录/注册） */
.login-card {
  position: relative; z-index: 1;
  width: 100%; max-width: 380px;
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-radius: 22px; padding: 22px 22px 20px; text-align: center;
  box-shadow:
    0 25px 60px rgba(0, 0, 0, .45),
    inset 0 1px 0 rgba(255, 255, 255, .7);
  border: 1px solid rgba(255, 255, 255, .6);
  animation: card-pop .35s cubic-bezier(.2,.9,.3,1.2);
}
@keyframes card-pop {
  from { opacity: 0; transform: translateY(12px) scale(.97); }
  to   { opacity: 1; transform: translateY(0)   scale(1); }
}
.login-tabs {
  display: flex; gap: 6px;
  background: rgba(232,240,250,.7); border-radius: 12px; padding: 4px;
  margin: -2px -4px 14px;
}
.login-tab {
  flex: 1 1 0; padding: 9px 0;
  font-size: 14px; font-weight: 700; color: var(--text-muted);
  border-radius: 9px; cursor: pointer; user-select: none;
  transition: color .18s, background .18s;
}
.login-tab.active {
  background: linear-gradient(135deg, #1565c0, #0d3c75);
  color: #fff;
  box-shadow: 0 4px 12px rgba(13, 60, 117, .35);
}
.login-title { font-weight: 800; font-size: 19px; color: #0d1f2d; letter-spacing: .5px; margin-top: 2px; }
.login-sub { font-size: 12.5px; color: #6b7c8c; margin: 4px 0 16px; }

/* 输入行（图标 + 输入） */
.login-field { position: relative; margin-bottom: 11px; text-align: left; }
.login-field > i {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  color: #1565c0; font-size: 15px; pointer-events: none; opacity: .85;
}
.login-field .login-input { padding-left: 38px; }
.login-input {
  width: 100%; min-height: 46px; padding: 11px 13px;
  font-size: 16px; border: 1px solid #d6dde3; border-radius: 12px;
  box-sizing: border-box; font-family: inherit; color: #0d1f2d;
  outline: none; background: #fff;
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
.login-input:focus {
  border-color: #1565c0;
  box-shadow: 0 0 0 4px rgba(21, 101, 192, .14);
  transform: translateY(-1px);
}
.login-input::placeholder { color: #97a3ad; }

/* 登录验证码区域：输入框 + 右侧 canvas 验证码（点击刷新） */
.login-captcha { display: flex; gap: 10px; align-items: stretch; }
.login-captcha .login-input { flex: 1 1 auto; padding-left: 38px; text-transform: uppercase; letter-spacing: 4px; font-weight: 700; }
.login-captcha #captchaCanvas { flex: 0 0 auto; width: 92px; border: 1px solid #d6dde3; border-radius: 12px; cursor: pointer; background: #eef3fb; }

/* 密码框右侧查看/隐藏眼睛按钮（绝对定位，不抢 input 焦点） */
.login-pwd .login-input { padding-right: 44px; }
.login-eye {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: none; padding: 0;
  color: #1565c0; font-size: 16px; opacity: .75;
  cursor: pointer; border-radius: 8px;
  transition: background .15s, opacity .15s;
}
.login-eye:hover { background: rgba(21, 101, 192, .08); opacity: 1; }
.login-eye:active { background: rgba(21, 101, 192, .16); }
.login-eye:focus { outline: none; box-shadow: 0 0 0 3px rgba(21, 101, 192, .18); }

.login-error {
  color: #e0524d; font-size: 13px; margin: 4px 0 10px; min-height: 18px; text-align: left;
  background: #fef0ef; border: 1px solid #fbd2d0; border-radius: 8px;
  padding: 7px 10px;
}

.login-btn {
  width: 100%; min-height: 48px; font-size: 15px; font-weight: 700;
  border-radius: 12px;
  background: linear-gradient(135deg, #1565c0 0%, #0d3c75 100%);
  border: none; color: #fff;
  box-shadow: 0 6px 18px rgba(13, 60, 117, .4);
  transition: transform .15s, box-shadow .15s, filter .15s;
}
.login-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(13, 60, 117, .5); }
.login-btn:active { transform: translateY(0); filter: brightness(.95); }
.login-btn:disabled { opacity: .65; cursor: not-allowed; transform: none; }

.login-foot {
  margin-top: 14px; font-size: 13px; color: #6b7c8c;
}
.login-foot a {
  color: #1565c0; font-weight: 700; text-decoration: none;
  border-bottom: 1px dashed rgba(21,101,192,.5);
  padding-bottom: 1px;
}
.login-foot a:hover { color: #0d3c75; border-bottom-color: #0d3c75; }

/* 兼容老版：登录页里"修改口令"折叠区（虽然现在不再用，但保留以防引用） */
.login-change {
  margin-top: 12px; border-top: 1px dashed #cfd8dc; padding-top: 14px;
  animation: lc-fade .18s ease;
}
@keyframes lc-fade {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.login-link {
  display: inline-block; margin-top: 12px; font-size: 13px;
  color: #1565c0; background: none; border: none; cursor: pointer;
  padding: 4px 8px;
}

/* 设置弹窗里的"段落"（账号 / 改密 / 同步） */
.set-section { padding: 14px 18px; border-bottom: 1px solid var(--border-light); }
.set-section:last-child { border-bottom: none; }
.set-section-title { font-size: 13px; font-weight: 700; color: #0d3c75; margin-bottom: 8px; }
.set-section-title i { color: #1565c0; margin-right: 4px; }
.set-account { font-size: 16px; font-weight: 800; color: #0d1f2d; letter-spacing: .5px; }
.set-tip { font-size: 12px; color: var(--text-muted); margin-top: 6px; line-height: 1.5; }

/* ============================================================
   顶部账户/sync 条（r55 整段新加）：电脑端 = 右主区顶部横条；移动端 = banner 之上的窄条
   r56：左侧腾出一段给「备份提醒」用，与右侧同步 chip/账户气泡并排
   ============================================================ */
.topbar {
  flex: 0 0 auto;
  padding: 6px 14px;
  background: #ffffff;
  border-bottom: 1px solid var(--border-light);
  display: flex; align-items: center; gap: 12px;
  position: relative; z-index: 45;
  min-height: 44px;
}
.topbar-left {
  flex: 1 1 auto; min-width: 0;
  display: flex; align-items: center; gap: 8px;
  overflow: hidden;                              /* 长文本截断，不挤掉右侧 */
}
.topbar-left .backup-bar {
  min-width: 0; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.topbar-right {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 10px; max-width: 100%;
}

/* 同步状态 chip（pill 圆角小药丸，按 data-state 切换配色） */
.sync-bar {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px 4px 10px;
  border-radius: 999px;
  font-size: 12.5px; font-weight: 600;
  background: #ecfdf3; color: #166534;
  border: 1px solid #bbf7d0;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .12s;
  white-space: nowrap;
  position: relative;
}
.sync-bar::before {
  content: '';
  width: 7px; height: 7px; border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 0 3px rgba(22,163,74,.18);
}
.sync-bar:hover { background: #dcfce7; border-color: #86efac; }
.sync-bar:active { transform: scale(.97); }
.sync-bar[data-state="offline"] { background: #f1f5f9; color: #6b7280; border-color: #e2e8f0; }
.sync-bar[data-state="offline"]::before { background: #94a3b8; box-shadow: 0 0 0 3px rgba(148,163,184,.18); }
.sync-bar[data-state="syncing"],
.sync-bar[data-state="need_pwd"],
.sync-bar[data-state="synced_plain"] {
  background: #fffbeb; color: #b45309; border-color: #fde68a;
}
.sync-bar[data-state="syncing"]::before,
.sync-bar[data-state="need_pwd"]::before,
.sync-bar[data-state="synced_plain"]::before {
  background: #f59e0b; box-shadow: 0 0 0 3px rgba(245,158,11,.18);
}
.sync-bar[data-state="error"] { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.sync-bar[data-state="error"]::before { background: #dc2626; box-shadow: 0 0 0 3px rgba(220,38,38,.18); }

/* ---------- 账户气泡（avatar + name + 下拉菜单） ---------- */
.acct-menu { position: relative; }
.acct-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 3px 12px 3px 4px;
  background: transparent; border: 1px solid transparent;
  border-radius: 999px; cursor: pointer;
  color: var(--text); font-weight: 600; font-size: 14px;
  font-family: inherit; line-height: 1;
  transition: background .15s, border-color .15s;
}
.acct-toggle:hover { background: #f1f5f9; border-color: #e2e8f0; }
.acct-toggle.open { background: #f1f5f9; border-color: #cbd5e1; }
.acct-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #4fc3f7, #1565c0);
  color: #fff; font-weight: 800; font-size: 14px;
  text-transform: uppercase; letter-spacing: 0.3px;
  box-shadow: 0 2px 6px rgba(21,101,192,.25);
  flex: 0 0 auto;
}
.acct-name { font-size: 14px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-caret { font-size: 10px; color: var(--text-muted); transition: transform .18s; }
.acct-toggle.open .acct-caret { transform: rotate(180deg); }
.acct-dropdown {
  position: absolute;
  right: 0; top: calc(100% + 8px);
  min-width: 180px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 12px 28px rgba(15,40,80,.14), 0 2px 6px rgba(15,40,80,.06);
  padding: 6px;
  display: none; flex-direction: column; gap: 2px;
  z-index: 80;
}
.acct-dropdown[style*="display: flex"],
.acct-dropdown[style*="display:block"] {
  display: flex !important;
}
.acct-dropdown button {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border: none; background: none;
  font-family: inherit; font-size: 14px; font-weight: 600;
  color: var(--text); text-align: left;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s;
  white-space: nowrap;
}
.acct-dropdown button i { color: var(--primary); font-size: 14px; width: 18px; text-align: center; }
.acct-dropdown button:hover { background: #f1f5f9; }
.acct-dropdown button.danger i { color: #b91c1c; }
.acct-dropdown button.danger { color: #b91c1c; }


/* ---------- 图片放大 ---------- */
.img-full { position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 120; display: flex; align-items: center; justify-content: center; padding: 16px; }
.img-full img { max-width: 100%; max-height: 100%; }
.img-full .img-close { position: absolute; top: 14px; right: 18px; color: #fff; font-size: 26px; background: none; border: none; }

/* ---------- 打印 ---------- */
@media print {
  .app-banner, .left-rail, .side-nav, .toolbar, .modal-overlay, .login-overlay, .sheet-mask, .backup-bar, .mode-hint { display: none !important; }
  body { overflow: visible; background: #fff; }
  .app-main { padding: 0; overflow: visible; }
  .print-area { font-size: 12px; }
  .no-print { display: none !important; }
}

/* ---------- 顶部备份提醒条 ---------- */
.backup-bar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 14px; font-size: 13px; line-height: 1.3;
  border-bottom: 1px solid transparent;
}
.backup-bar.warn { background: #fff4e5; color: #8a4b00; border-bottom-color: #ffd9a8; }
.backup-bar.ok { background: #eef7f0; color: #2e7d4f; }
.backup-bar .bbtn {
  flex: 0 0 auto; border: none; border-radius: 8px; padding: 7px 14px;
  font-size: 13px; font-weight: 700; cursor: pointer; background: #ff7a18; color: #fff;
}
.backup-bar .bbtn.ghost { background: rgba(46,125,79,.14); color: #2e7d4f; font-weight: 600; }

/* r56：备份条塞进 topbar 上下文后，退掉「横条」外观，恢复 inline 风格
   （保留 .backup-bar.* 用于非 topbar 场景的旧代码） */
.topbar-left .backup-bar {
  position: static;                 /* 不再 sticky 全宽 */
  z-index: 0;
  padding: 4px 0;                   /* 不要撑高 topbar */
  background: transparent !important; border-bottom: 0 !important;
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13.5px; line-height: 1.35;
  flex: 1 1 auto; min-width: 0;
}
.topbar-left .backup-bar .bbtn { padding: 5px 12px; font-size: 12.5px; border-radius: 7px; }
.topbar-left .backup-bar .bbtn.ghost { padding: 5px 10px; font-size: 12.5px; }

/* ---------- 手机浏览器模式提示条 ---------- */
.mode-hint {
  position: sticky; top: 0; z-index: 31;
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px; font-size: 12.5px; line-height: 1.4;
  background: #e8f1ff; color: #1450a0; border-bottom: 1px solid #cfe1ff;
}
.mode-hint .mh-x {
  flex: 0 0 auto; border: none; border-radius: 8px; padding: 6px 12px;
  font-size: 12.5px; font-weight: 700; cursor: pointer;
  background: #1565c0; color: #fff;
}
/* ★ r176：极速模式检测到时改成红橙色，更醒目 */
.mode-hint.mode-hint-speed {
  background: #ffe7e0 !important;
  color: #a02020 !important;
  border-bottom-color: #f5c2c0 !important;
  font-weight: 700;
}
.mode-hint.mode-hint-speed .mh-x { background: #d83a3a; }

/* ★ r176：离线登录提示条 */
.r176-offline-banner {
  margin-bottom: 14px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #f5c2c0;
  background: #fff7f5;
}
.r176-speed-warn, .r176-net-warn {
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.5;
  color: #fff;
}
.r176-speed-warn { background: #d83a3a; }
.r176-net-warn { background: #e07a3a; }
.r176-offline-actions {
  display: flex; gap: 8px; padding: 10px 10px 8px;
  background: #fff7f5; flex-wrap: wrap;
}
.r176-btn-retry, .r176-btn-readonly {
  flex: 1; min-width: 130px;
  padding: 8px 12px; border-radius: 8px;
  border: 1px solid transparent; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: opacity 0.15s;
}
.r176-btn-retry:disabled { opacity: 0.6; cursor: wait; }
.r176-btn-retry { background: #1f7ad8; color: #fff; border-color: #1f7ad8; }
.r176-btn-readonly { background: #fff; color: #b3500f; border-color: #f0c099; }
.r176-offline-tips {
  font-size: 11.5px; color: #884a14; padding: 0 12px 10px;
  background: #fff7f5; border-top: 1px dashed #f5c2c0;
}

/* ★ r176：离线只读模式顶部红条 */
.r176-readonly-bar {
  position: sticky; top: 0; z-index: 50;
  padding: 8px 14px;
  background: #d83a3a; color: #fff;
  font-size: 12.5px; text-align: center;
  border-bottom: 2px solid #a02020;
}
.r176-readonly-bar b { font-weight: 700; }

/* ---------- 云端同步状态 chip ----------
   r55 重写为 chip pill 风格（原 r35 横条样式已合并到上方 .topbar 块里） */

/* ---------- 新建/编辑航次：分区卡片 ---------- */
.form-sec {
  background: #f7f9fb;
  border: 1px solid #eef1f4;
  border-radius: 12px;
  padding: 14px 14px 8px;
  margin-bottom: 14px;
}
.form-sec .fs-title {
  display: flex; align-items: center; gap: 7px;
  font-size: 13.5px; font-weight: 800; color: var(--primary);
  margin: -2px 0 12px;
  padding-left: 10px;
  border-left: 3px solid var(--primary);
  line-height: 1.3;
}
.form-sec.amber { background: #fff8f3; border-color: #ffe6d4; }
.form-sec.amber .fs-title { color: var(--accent); border-left-color: var(--accent); }
.form-sec.agency { background: #fffdf3; border-color: #f1e3b6; padding-top: 12px; }
.form-sec.agency .fs-title {
  color: #b8860b; border-left: none; padding-left: 0; font-size: 13px; margin-bottom: 10px;
}
.form-sec .fs-sub {
  font-size: 12.5px; font-weight: 700; color: var(--text-muted);
  margin: 4px 0 10px; display: flex; align-items: center; gap: 6px;
}
.form-sec .field:last-child { margin-bottom: 8px; }
.form-sec input.input, .form-sec select.select { background: #fff; }
/* 航行动态事件编辑器（加油 / 抛锚等潮水 / 其他）：grid 让时间/类型/备注三列对齐 */
.voy-events { background:#fafcff;border:1px dashed #d8e0ee;border-radius:8px;padding:10px; }
.voy-events-head { display:grid; grid-template-columns: 148px 84px minmax(96px,1fr) minmax(96px,1fr) 34px; gap:6px; font-size:12px; color:var(--text-muted); padding:0 2px 6px; border-bottom:1px dashed #e3e8f3; margin-bottom:8px; font-weight:600; }
.vev-row { display:grid; grid-template-columns: 148px 84px minmax(96px,1fr) minmax(96px,1fr) 34px; gap:6px; align-items:center; margin-bottom:6px; }
.vev-row .input { width:100%; }
.vev-row .vev-d { min-width:0; padding:6px 8px; font-size:14px; }
.vev-row .vev-tm { min-width:0; padding:6px 8px; font-size:14px; }
.vev-row .vev-type { min-width:0; padding:6px 8px; }
.vev-row .vev-note { min-width:0; padding:6px 8px; font-size:13px; color:var(--text-muted); background:#fafcff; }
.vev-row .vev-note:focus { color:var(--text); background:#fff; }
.vev-row .vev-note::placeholder { font-size:11px; color:#c2c8d0; }
.vev-del { width:36px; height:32px; border:1px solid #ffd0cc; background:#fff5f4; color:#d33; border-radius:8px; font-size:18px; line-height:1; cursor:pointer; padding:0; }
.vev-del:active { background:#ffe2de; }
.vev-sort { background:transparent; border:0; color:var(--text-muted); font-size:11px; padding:2px 4px; cursor:pointer; border-radius:4px; }
.vev-sort:hover { color:var(--accent, #3a7afe); background:#f3f6ff; }
.vev-sort i { margin-right:2px; }
.btn-add-event { display:block; margin:8px auto 0; min-width:140px; }
.voy-quick { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:10px; }
.voy-qbtn { flex:1 1 auto; min-width:96px; border:1px solid #cfe0ff; background:#eef5ff; color:#1d5fd6; border-radius:8px; padding:7px 8px; font-size:13px; cursor:pointer; white-space:nowrap; }
.voy-qbtn:active { background:#dfeaff; }
@media (max-width: 480px) {
  /* 手机宽度不够三列时，事件行换行（但仍按 grid） */
  .voy-events-head { display:flex; flex-wrap:wrap; gap:6px; }
  .voy-events-head > span { flex:1 1 20%; }
  .voy-events-head > span:last-child { flex:0 0 auto; }
  .vev-row { display:flex; flex-wrap:wrap; gap:6px; }
  .vev-row > .vev-d, .vev-row > .vev-tm { flex:1 1 44%; min-width:120px; }
  .vev-row > .vev-type, .vev-row > .vev-note { flex:1 1 44%; min-width:120px; }
  .vev-row > .vev-del { flex:0 0 34px; }
  .voy-qbtn { flex:1 1 40%; min-width:0; font-size:12px; padding:8px 4px; }
  /* 速记每日动态：手机宽度日期/时间各 50% 并排，类型独占一行全宽 */
  .qe-row-3 { flex-wrap: wrap; }
  .qe-row-3 > .field { flex: 1 1 calc(50% - 5px); min-width: 0; }
  .qe-row-3 > .field:nth-child(3) { flex: 1 1 100%; }
}
/* 标题旁的「?」提示，悬停出气泡 */
.fs-tip { display:inline-flex; align-items:center; justify-content:center; width:16px; height:16px; font-size:11px; color:var(--text-muted); margin-left:4px; cursor:help; border-radius:50%; }
.fs-tip:hover { background:var(--bg); color:var(--primary); }
/* 石子不计滞期提示 */
.stone-hint { background:#fff7e6; color:#a86b00; border:1px solid #ffd591; padding:8px 10px; border-radius:6px; font-size:12px; }
/* 速记 / 添加事件 冲突提醒条 */
.event-warn { margin:6px 0 10px; padding:10px 12px; border:1px solid #ffd591; background:#fff7e6; border-radius:8px; color:#a86b00; font-size:13px; line-height:1.6; display:flex; gap:8px; align-items:flex-start; }
.event-warn i.fa-triangle-exclamation { flex:0 0 auto; margin-top:2px; color:#e08a00; }
.event-warn .ew-body { flex:1; }
.event-warn .ew-title { font-weight:700; margin-bottom:4px; }
.event-warn .ew-line { margin:2px 0; }
.event-warn .ew-tip { margin-top:6px; color:#a06b00; font-size:12px; }
/* 从每日动态导入节点（弹窗） */
.imp-list { max-height: 46vh; overflow:auto; border:1px solid var(--border-light); border-radius:8px; padding:4px; margin-bottom:10px; }
.imp-row { display:flex; gap:8px; align-items:center; padding:8px 10px; border-radius:6px; cursor:pointer; }
.imp-row:nth-child(odd) { background:#f7f9fc; }
.imp-row:hover { background:#eef3fb; }
.imp-row .imp-chk { flex:0 0 auto; width:18px; height:18px; }
.imp-row .imp-dt { flex:0 0 132px; font-variant-numeric:tabular-nums; color:#333; }
.imp-row .imp-type { flex:1 1 auto; font-weight:600; color:var(--primary); }
.imp-row .imp-note { flex:1 1 auto; font-size:12px; color:var(--text-muted); text-align:right; }
/* 当日运输情况（日报） */
.dr-ship { font-size: 14px; font-weight: 800; color: var(--primary); margin: 12px 0 6px; border-bottom: 1px dashed var(--border); padding-bottom: 4px; }
.dr-date { font-size: 13px; font-weight: 700; color: #444; margin: 10px 0 6px; background: #f3f6fb; padding: 4px 8px; border-radius: 6px; border-left: 3px solid var(--primary); }
.dr-row { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; }
.dr-h { font-size: 13px; margin-bottom: 4px; }
.dr-tl { font-size: 12px; }
.dr-ev { display: flex; gap: 6px; padding: 1px 0; align-items: baseline; }
.dr-tm { font-weight: 700; color: var(--accent); min-width: 42px; font-variant-numeric: tabular-nums; }
.dr-meta { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.dr-meta b { color: var(--text); }

/* ============== 动态日报（按图新格式：每天一张 船名/摘记/备注 表） ============== */
.dr-day { margin-bottom: 12px; }
/* 当日所有船都没速记：一行紧凑灰色提示，不渲染空表 */
.dr-day-empty { color: var(--text-muted); font-size: 12px; padding: 6px 10px; background: #fafbfc; border-radius: 4px; border-left: 3px solid #e4e7ed; }
.dr-day-empty i { margin-right: 4px; color: #c0c4cc; }
.dr-day-h { background: #f3f6fb; border-left: 3px solid #2c5282; padding: 5px 10px; font-size: 13px; font-weight: 700; color: #222; margin-bottom: 0; border-radius: 4px 4px 0 0; }
.dr-log { width: 100%; border-collapse: collapse; font-size: 12px; table-layout: fixed; margin-bottom: 0; }
.dr-log th, .dr-log td { border: 1px solid #d4dae3; padding: 4px 6px; text-align: left; vertical-align: top; word-break: break-all; }
.dr-log th { background: #eef4fb; font-weight: 700; }
.dr-c-ship { white-space: nowrap; font-weight: 600; color: var(--primary); width: 12%; }
.dr-c-main { font-variant-numeric: tabular-nums; }
.dr-c-remark { width: 22%; font-variant-numeric: tabular-nums; word-break: break-all; }
.dr-log-empty { color: #c0c4cc; }
.dr-log-no-entry { color: #b0b6c0; font-style: italic; font-size: 12px; }
.dr-log-ev { display: inline-block; margin: 1px 2px 1px 0; padding: 1px 4px; background: #f3f6fb; border: 1px solid #e1e8f2; border-radius: 4px; font-variant-numeric: tabular-nums; }
.dr-ev-btn { border: none; background: transparent; cursor: pointer; font-size: 11px; line-height: 1; padding: 0 2px; color: var(--text-muted); }
.dr-ev-btn:hover { color: var(--primary); }
.dr-ev-btn.dr-ev-del:hover { color: #d33; }
/* 来自航次节点的动态（日报里展示，编辑/删除作用在航次上） */
.dr-log-ev.dr-ev-voy { background: #fff7ec; border-color: #f3dca8; }
.dr-log-ev.dr-ev-voy .dr-ev-btn:hover { color: #b7791f; }
.dr-evt-dup { color: #d33; background: #fff5f4; padding: 1px 4px; border-radius: 3px; border: 1px solid #ffd0cc; font-weight: 600; }

/* 手机宽度：速记表格 → 卡片堆叠（避免船名/摘记/备注 三列被挤换行难看） */
@media (max-width: 640px) {
  .dr-log,
  .dr-log tbody,
  .dr-log tr,
  .dr-log td { display: block; width: auto; box-sizing: border-box; }
  .dr-log thead { display: none; }
  .dr-day > div[style*="overflow-x:auto"] { overflow-x: visible !important; }
  .dr-log tr {
    margin: 0 0 6px 0;
    border: 1px solid #e1e8f2;
    border-radius: 8px;
    background: #fff;
    padding: 6px 10px;
  }
  .dr-log td { border: none !important; padding: 2px 0 !important; }
  .dr-c-ship {
    padding-bottom: 4px !important;
    margin-bottom: 4px;
    border-bottom: 1px dashed #eef0f4 !important;
    font-size: 13px;
  }
  .dr-c-main { padding: 2px 0 !important; }
  /* 备注为空（只有「—」占位）时整行隐藏，节省空间 */
  .dr-c-remark:has(.dr-log-empty) { display: none; }
  .dr-c-remark:not(:empty) {
    padding-top: 4px !important;
    margin-top: 4px;
    border-top: 1px dashed #eef0f4 !important;
    color: var(--text-muted);
    font-size: 11.5px;
  }
  /* 备注前的「备注：」标签：用首字「💬」图标代替，更易扫读 */
  .dr-c-remark:not(:empty)::before { content: "💬 "; opacity: .8; }
}
.dr-log-warn { margin-top: 6px; padding: 6px 8px; background: #fff7e6; border: 1px solid #ffd591; border-radius: 6px; color: #a86b00; font-size: 12px; line-height: 1.7; position: relative; }
.dr-log-warn i.fa-triangle-exclamation { color: #e08a00; margin-right: 4px; }
.dr-log-warn a { color: #3a7afe; text-decoration: underline; margin-left: 4px; font-weight: 600; }
.dr-log-warn .dr-log-iss { display:inline-block; margin-left: 2px; padding: 1px 6px; background: #fff; border: 1px dashed #ffb84d; border-radius: 4px; color: #a86b00; font-size: 11px; }
.dr-log-warn .dr-log-iss b { color: #c95800; margin-right: 2px; }
.dr-log-warn .dr-log-tip { display: none; position: absolute; left: 0; right: 0; top: 100%; z-index: 10; background: #fff7e6; border: 1px solid #ffd591; border-radius: 6px; padding: 6px 8px; color: #a86b00; font-size: 11px; white-space: pre-wrap; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }

/* ============== 加油页精致化样式 ============== */
/* 单条加油卡片：左大金额 + 右信息块 */
.rf-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--border-light);
  margin: 6px 0;
  cursor: pointer;
  transition: background .12s ease;
}
.rf-card:active { background: #f5f9ff; }
.rf-card .rf-amt {
  font-size: 18px; font-weight: 800; color: var(--text);
  white-space: nowrap; line-height: 1.2; padding-top: 1px;
}
.rf-card .rf-main { min-width: 0; }
.rf-card .rf-line1 {
  font-size: 14px; font-weight: 700; color: var(--text);
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  line-height: 1.35;
}
.rf-card .rf-line1 .rf-date {
  display: inline-block; padding: 1px 7px; border-radius: 4px;
  background: #fff5e8; color: #d2691e; font-size: 12px; font-weight: 700;
  margin-right: 2px;
}
.rf-card .rf-line2 {
  font-size: 12.5px; color: var(--text-muted); margin-top: 4px; line-height: 1.4;
  word-break: break-all;
}
.rf-card .rf-line3 {
  display: flex; gap: 4px 12px; flex-wrap: wrap;
  margin-top: 6px; font-size: 12px; color: var(--text-muted);
}
.rf-card .rf-line3 b { color: var(--text); font-weight: 700; }
.rf-card .rf-line3 .chip {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  background: #f1f5f9; color: var(--text-muted); font-size: 12px;
}
.rf-card .rf-line3 .chip b { color: var(--text); }
/* 加油分组：每船一组的子容器，留缩进和淡灰底 */
.rf-group {
  padding: 4px 0 6px 16px;
  border-left: 2px solid #e5edf5;
  margin-left: 6px;
}
/* 加油分组头部：标题/副行/右侧动作 三段独立，避开窄屏 flex 挤压 */
.group-h.fuel-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 6px 8px;
  padding: 8px 2px 10px;
}
.group-h.fuel-head .grp-toggle { margin-top: 2px; }
.group-h.fuel-head .grp-name {
  display: block; min-width: 0; flex: none; line-height: 1.4;
}
.group-h.fuel-head .grp-title {
  font-size: 14px; font-weight: 800; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.group-h.fuel-head .grp-sub {
  display: block; font-size: 12px; color: var(--text-muted); font-weight: 500;
  margin-top: 3px; line-height: 1.4; word-break: break-all;
}
.group-h.fuel-head .grp-sub b { color: var(--accent); font-weight: 800; margin: 0 1px; }
.group-h.fuel-head .grp-actions {
  display: inline-flex; gap: 4px; flex: 0 0 auto;
}
.group-h.fuel-head .grp-actions .btn-sm {
  padding: 4px 7px; font-size: 12px;
}
.group-h.fuel-head .grp-sub-inline { color: var(--text-muted); font-weight: 600; font-size: 13px; }

/* r192：加油页「全部船舶」视图——每船一张卡片 */
.rf-ship-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 10px; }
/* r211：单船视图卡片只占一列，右侧太空；改成单列铺满 */
.rf-ship-cards.single { grid-template-columns: 1fr; }
.rf-ship-card { background: #fff; border: 1px solid var(--border, #d6e0ea); border-radius: var(--radius, 10px); overflow: hidden; display: flex; flex-direction: column; }
.rf-ship-card-head { background: #f0f7fc; padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; cursor: pointer; }
.rf-ship-card-head:hover { background: #e4f0f9; }
.rf-ship-info { flex: 1; min-width: 0; }
.rf-ship-name { display: block; font-size: 14px; font-weight: 800; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rf-ship-sub { display: block; font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.rf-ship-sub b { color: var(--accent); font-weight: 800; }
.rf-ship-actions { flex: 0 0 auto; }
.rf-ship-card-body { flex: 1; max-height: 320px; overflow-y: auto; padding: 8px 10px; }
.rf-ship-card-body .rf-card { border-left: none; border-right: none; border-radius: 0; border-bottom: 1px dashed #e3edf3; }
.rf-ship-card-body .rf-card:last-child { border-bottom: none; }
.rf-ship-card-foot { padding: 8px 10px; text-align: center; border-top: 1px solid var(--border-light); background: #fafcfe; }
@media (max-width: 768px) {
  .rf-ship-cards { grid-template-columns: 1fr; }
  .rf-ship-card-body { max-height: 260px; }
}
/* r206：单船视图加油记录小卡片网格 */
.rf-mini-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 12px; }
/* r212：给单船加油小卡片加一点颜色，避免全白太单调 */
.rf-mini-card {
  background: linear-gradient(145deg, #ffffff 0%, #f3f9ff 100%);
  border: 1px solid var(--border, #d6e0ea);
  border-left: 4px solid var(--primary, #1e88e5);
  border-radius: var(--radius-sm, 8px);
  padding: 12px 12px 12px 10px;
  cursor: pointer;
  transition: box-shadow .15s, border-color .15s, transform .1s;
}
.rf-mini-card:hover {
  box-shadow: 0 6px 16px rgba(30,111,184,.14);
  border-color: #a8c8e6;
  border-left-color: var(--accent, #ff8f00);
  transform: translateY(-2px);
}
.rf-mini-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.rf-mini-amt { font-size: 17px; font-weight: 900; color: var(--primary, #1e88e5); }
.rf-mini-edit { color: #8bb3d3; font-size: 13px; transition: color .15s; }
.rf-mini-card:hover .rf-mini-edit { color: var(--primary, #1e88e5); }
.rf-mini-date { font-size: 13px; color: #4a6a8a; font-weight: 600; margin-bottom: 4px; }
.rf-mini-fuel { font-size: 13px; color: var(--text, #3b4a5a); margin-bottom: 6px; }
.rf-mini-meta { font-size: 12px; color: #3b6a96; background: #e7f3fc; padding: 4px 8px; border-radius: 4px; margin-bottom: 4px; }
.rf-mini-voyage { font-size: 12px; color: #1e6fb8; }
@media (max-width: 1024px) {
  .rf-mini-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .rf-mini-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 8px; }
}
@media (max-width: 480px) {
  .rf-mini-grid { grid-template-columns: 1fr; }
}

.badge-warn { background: #fff3d6; color: #9a6a00; }

/* ============================================================
   桌面端 ≥ 900px：电脑优先布局
   - 顶部品牌栏与内容区域并排
   - 左侧 240px 固定垂直导航（高大上观感）
   - 主区更大字号 / 更宽留白，告别"页面空"感
   ============================================================ */
@media (min-width: 900px) {
  :root {
    --sidebar-w: 240px;
    --nav-h: 56px;       /* 电脑侧栏内部项目高度 */
  }
  /* r55 grid 布局：左栏满列（rail），右两行[topbar, main] */
  body.app-shell {
    display: grid;
    grid-template:
      "rail topbar" 72px
      "rail main" 1fr / var(--sidebar-w) 1fr;
    height: 100vh; height: 100dvh;
  }

  /* 顶部账户/sync 条：右主区顶部；高度 72px、白色底、右对齐 */
  .topbar {
    grid-area: topbar;
    padding: 0 32px;
    background: #ffffff;
    border-bottom: 1px solid #e5eaf0;
    box-shadow: 0 2px 6px rgba(15,40,80,.04);
    min-height: 0;
  }
  .topbar-right { gap: 14px; }
  /* desktop 把 chip / 头像都做大一点 */
  .sync-bar { font-size: 13px; padding: 6px 14px 6px 12px; }
  .acct-avatar { width: 38px; height: 38px; font-size: 16px; }
  .acct-name { font-size: 15px; max-width: 180px; }

  /* 左侧栏：整列同一蓝色背景，里头垂直堆「品牌区」+「导航」 */
  .left-rail {
    grid-area: rail;
    display: flex; flex-direction: column;
    width: var(--sidebar-w);
    min-height: 100vh; min-height: 100dvh;
    background:
      radial-gradient(ellipse at 20% 0%, rgba(255,213,79,.4), transparent 65%),
      radial-gradient(ellipse at 0% 100%, rgba(79,195,247,.45), transparent 70%),
      linear-gradient(165deg, #1e88e5 0%, #1565c0 40%, #0d3c75 100%);
    box-shadow: 6px 0 24px rgba(13, 60, 117, .25);
    color: #fff;
    overflow-y: auto;
    overflow-x: hidden;
  }

  /* 品牌区：从全列高度改成顶部一段高度（auto），标题仍在同一蓝底上 */
  .app-banner {
    flex: 0 0 auto;
    width: 100%;
    height: auto;
    padding: calc(env(safe-area-inset-top, 0px) + 28px) 22px 22px;
    align-items: stretch;
    background: transparent;            /* 背景由 .left-rail 提供 */
    box-shadow: none;
  }
  .app-banner::after { display: none; }
  /* r55 品牌名「船管家」电脑端字号变得更大、更高大上、和下面导航字（15.5px）形成视觉层级 */
  .banner-inner {
    flex-direction: column; align-items: center; justify-content: flex-start;
    width: 100%; max-width: none;
    padding: 0;
    gap: 10px;
    height: auto;
    text-align: center;
  }
  .banner-logo {
    font-size: 40px;
    color: #ffd54f;
    filter: drop-shadow(0 3px 8px rgba(0,0,0,.35));
  }
  .banner-title {
    font-size: 26px;
    line-height: 1.1;
    max-width: 100%;
    white-space: normal;
    color: #fff;
    font-weight: 900;
    letter-spacing: 6px;
    text-shadow: 0 2px 6px rgba(0,0,0,.32), 0 0 18px rgba(79,195,247,.35);
    margin-left: 6px;            /* 让字距视觉居中抵消 letter-spacing 让右边偏 */
  }

  /* 主内容区占满右下方 */
  .app-main {
    grid-area: main;
    padding: 28px 32px 32px;
    font-size: 16px;
    line-height: 1.65;
    background:
      radial-gradient(ellipse at 0% 0%, rgba(79,195,247,.07), transparent 55%),
      linear-gradient(180deg, #f6fafd 0%, #eef3f8 100%);
  }

  /* 侧栏导航：堆在品牌区下方，整列底；同一个蓝色背景，文字白色透明可读 */
  .side-nav {
    position: relative; left: auto; right: auto; bottom: auto;
    flex: 1 1 auto;
    width: 100%;
    height: auto;
    margin: 0;
    padding: 10px 18px calc(18px + env(safe-area-inset-bottom, 0px));
    background: transparent;
    -webkit-backdrop-filter: none; backdrop-filter: none;
    border: none; border-top: 1px solid rgba(255,255,255,.12);
    box-shadow: none;
    flex-direction: column;
    overflow: visible;
    align-items: stretch;
    gap: 4px;
  }
  /* r171：桌面端在左栏底部显示版本号（白字半透明，贴底） */
  .rail-version {
    display: flex; align-items: center; justify-content: center;
    padding: 10px 14px calc(14px + env(safe-area-inset-bottom, 0px));
    font-size: 12px; letter-spacing: .5px;
    color: rgba(255,255,255,.55);
    border-top: 1px solid rgba(255,255,255,.1);
    margin-top: auto;
  }
  .nav-tab {
    flex: none;
    flex-direction: row; align-items: center;
    gap: 14px;
    font-size: 15.5px;
    font-weight: 600;
    color: rgba(255,255,255,.78);
    padding: 12px 14px;
    border-radius: 10px;
    transition: background .18s, color .18s, transform .18s;
    width: 100%;
  }
  .nav-tab i {
    font-size: 22px;
    flex: 0 0 28px;
    text-align: center;
    color: rgba(255,255,255,.92);
    transition: transform .22s;
  }
  .nav-tab span { letter-spacing: 0.3px; }
  .nav-tab:hover {
    background: rgba(255,255,255,.10);
    color: #fff;
  }
  .nav-tab.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(255,255,255,.18), rgba(255,255,255,.08));
    box-shadow: 0 6px 18px rgba(0,30,80,.18), inset 0 0 0 1px rgba(255,255,255,.12);
    font-weight: 700;
  }
  .nav-tab.active i {
    transform: none;
    color: #ffd54f;
  }
  /* 移除移动端顶部小条；改用左侧金色细条 + 整块高亮 */
  .nav-tab.active::after {
    content: '';
    position: absolute; top: 50%; left: 0; transform: translateY(-50%);
    width: 4px; height: 22px; border-radius: 0 3px 3px 0;
    background: linear-gradient(180deg, #ffd54f, #ffb300);
    box-shadow: 0 2px 8px rgba(255, 213, 79, .55);
  }
  .nav-tab-accent.active i { color: #ffb300; }

  /* 让卡片更大气 */
  .card { border-radius: 16px; padding: 0; }
  .card-head { padding: 16px 20px; }
  .card-head .ct-title { font-size: 17px; }
  .card-body { padding: 18px 20px; }
  .row-card { padding: 16px 20px; border-radius: 14px; }
  .row-card .vc-ship-name { font-size: 20px; }
  .row-meta { font-size: 13.5px; }
  .toolbar { padding: 4px 0; margin-bottom: 16px; }
  .btn { min-height: 44px; padding: 0 18px; font-size: 15px; }
  .btn-sm { min-height: 38px; padding: 0 14px; font-size: 14px; }
  .sec-tip { font-size: 13.5px; }
}

/* ================= 首页 总览（各船收支一览） ================= */
.home-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 4px 0 10px; }
.home-kpi { background: #fff; border: 0.5px solid #d3d1c7; border-radius: 8px; padding: 10px 8px; text-align: center; }
.home-kpi-lab { font-size: 12px; color: #888780; }
.home-kpi-val { font-size: 18px; font-weight: 500; margin-top: 2px; color: #2c2c2a; font-variant-numeric: tabular-nums; }
.home-kpi-val.pos { color: #3b6d11; }
.home-kpi-val.neg { color: #a32d2d; }
.home-sec-title { font-size: 14px; font-weight: 500; color: #2c2c2a; margin: 12px 2px 6px; }
.home-ship { background: #fff; border: 0.5px solid #d3d1c7; border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; cursor: pointer; -webkit-tap-highlight-color: rgba(0,0,0,.05); }
.home-ship:active { background: #f6f8fb; }
.home-ship-head { display: flex; justify-content: space-between; align-items: flex-start; }
.home-ship-name { font-size: 15px; font-weight: 500; color: #2c2c2a; }
.home-ship-sub { font-size: 12px; color: #888780; margin-top: 2px; }
.home-profit { font-size: 18px; font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }
.home-profit.pos { color: #3b6d11; }
.home-profit.neg { color: #a32d2d; }
.home-bar-row { display: flex; align-items: center; gap: 8px; margin: 5px 0; }
.home-bar-lab { width: 30px; font-size: 12px; color: #888780; flex: none; }
.home-bar-track { flex: 1; background: #eae8e2; border-radius: 3px; height: 10px; overflow: hidden; }
.home-bar-fill { height: 10px; border-radius: 3px; }
.home-bar-fill.inc { background: #378add; }
.home-bar-fill.exp { background: #d85a30; }
.home-bar-val { min-width: 96px; text-align: right; font-size: 12px; color: #2c2c2a; flex: none; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* r219：各船收支一览改左右分栏——左「船名/利润 + 收支柱状对比」，右「8 类支出条形图」 */
.home-ship-grid { display: flex; gap: 14px; align-items: stretch; }
.home-ship-left { flex: 1 1 54%; min-width: 0; display: flex; flex-direction: column; }
.home-ship-right { flex: 1 1 46%; min-width: 0; border-left: 1px solid #ecebe6; padding-left: 14px; display: flex; flex-direction: column; }
.home-cat-title { font-size: 12px; color: #888780; margin-bottom: 5px; flex: none; }
.home-stack { display: flex; height: 8px; border-radius: 3px; overflow: hidden; margin-top: 8px; background: #eae8e2; }
.home-cat-toggle { font-size: 12px; color: #185fa5; margin-top: 8px; cursor: pointer; }
.home-cats { display: none; margin-top: 6px; }
/* r219：8 类排成 2 列 × 4 行，卡片高度直接减半（一屏能多看两条船） */
.home-cats.open { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px 14px; }
.home-cat-row { display: flex; align-items: center; gap: 7px; font-size: 12px; padding: 2px 0; }
.home-cat-dot { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.home-cat-name { width: 30px; color: #888780; flex: none; }
.home-cat-track { flex: 1; min-width: 24px; background: #f0efe9; border-radius: 2px; height: 7px; overflow: hidden; }
.home-cat-bar { display: block; height: 7px; border-radius: 2px; }
.home-cat-amt { min-width: 74px; text-align: right; font-weight: 500; color: #2c2c2a; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* r219：窄屏（手机）自动改成上下堆叠，别挤成一团 */
@media (max-width: 600px) {
  .home-ship-grid { flex-direction: column; gap: 10px; }
  .home-ship-right { border-left: none; padding-left: 0; border-top: 1px solid #ecebe6; padding-top: 10px; }
  .home-cats.open { grid-template-columns: 1fr; } /* 手机太窄，8 类改回单列更好认 */
}
@media (max-width: 899px) {
  .home-kpi-val { font-size: 17px; }
  .home-profit { font-size: 17px; }
}
/* 印刷 / 极窄屏隐藏侧栏：移动端 899px 以下完全沿用旧底部 Tab */
@media (max-width: 899px) {
  :root { --sidebar-w: 0px; }
  .side-nav { border-top: 1px solid rgba(13, 60, 117, .08); }
}

/* ===================== r78：多货种（不同运价）编辑器 ===================== */
.ci-wrap { border: 1px solid var(--border, #d6e0ea); border-radius: var(--radius-sm, 8px); overflow: hidden; margin: 6px 0 0; background: #fff; overflow-x: auto; }
.ci-head, .ci-row { display: grid; gap: 6px; align-items: center; padding: 6px 8px; }
/* r82：包船模式 4 列（货种/实装/实算/删除）；按吨模式 8 列（含合同运价·净运价·运费·代理费·删除） */
.ci-wrap.lump .ci-head, .ci-wrap.lump .ci-row { grid-template-columns: 1.1fr 1fr 1fr 30px; min-width: 420px; }
.ci-wrap.perton .ci-head, .ci-wrap.perton .ci-row { grid-template-columns: 1.15fr 0.85fr 0.85fr 1fr 1fr 1fr 1fr 30px; min-width: 800px; }
.ci-head { background: #eef4fb; font-size: 11px; color: #5a7a96; font-weight: 700; border-bottom: 1px solid var(--border, #d6e0ea); }
.ci-row { border-bottom: 1px solid #eef2f6; }
.ci-row:last-child { border-bottom: none; }
.ci-row .input, .ci-row .select { width: 100%; margin: 0; }
.ci-row .ci-real.over-act { border-color: #d33 !important; box-shadow: 0 0 0 2px rgba(217,51,51,.12); }
.ci-fr, .ci-fs, .ci-af { background: #f8fafc; color: #516173; } /* 运费(笔1/笔2)·代理费(笔3) 只读 */
/* r218：被手填锁住的金额框换成暖色底，一眼能看出「这个数不会自动跟着运价变，清空即恢复自动」 */
.ci-fr.ci-manual, .ci-fs.ci-manual, .ci-af.ci-manual { background: #fff7e6; color: #8a5a00; border-color: #e6b05c; }
.ci-cr { background: #fffaf0; } /* 合同运价高亮（对货主全价） */
.ci-cr:focus, .ci-rate:focus { background: #fff; }
.ci-pval { font-size: 13px; color: #2a3b48; padding: 6px 2px; font-weight: 600; }
.ci-del { border: none; background: #fdeaea; color: #d33; width: 28px; height: 28px; border-radius: 6px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.ci-del:hover { background: #f8d2d2; }
.ci-del-ph { display: inline-block; width: 28px; }
.ci-foot { display: flex; align-items: center; gap: 10px; padding: 8px; background: #f7fbff; border-top: 1px dashed var(--border, #d6e0ea); flex-wrap: wrap; }
.ci-foot label { font-size: 12px; color: #5a7a96; font-weight: 600; white-space: nowrap; }
.ci-foot .input { flex: 1; max-width: 220px; }
.ci-foot-row { display: flex; align-items: center; gap: 10px; flex: 1 1 100%; }
.ci-foot-row label { flex: 0 0 auto; margin: 0; }
.ci-foot-row .input { flex: 1; max-width: 200px; }
/* r185：航次详情页按吨模式改用卡片双排字段，每项自带标签 */
.ci-wrap.vmode.perton { display: flex; flex-direction: column; gap: 10px; }
.ci-card { background: #fff; border: 1px solid var(--border, #d6e0ea); border-radius: var(--radius-sm, 8px); padding: 10px 12px; }
.ci-card-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; align-items: end; }
.ci-card-row + .ci-card-row { margin-top: 10px; padding-top: 10px; border-top: 1px dashed #e2ebf3; }
.ci-mini { display: flex; flex-direction: column; gap: 4px; }
.ci-mini label { font-size: 11px; color: #5a7a96; font-weight: 600; white-space: nowrap; }
.ci-mini .input, .ci-mini .select { width: 100%; margin: 0; }
.ci-mini .ci-mode, .ci-mini .ci-sel { width: 100%; }
.ci-mini-ph label { color: transparent; }
.ci-del-cell { display: flex; align-items: flex-end; padding-bottom: 2px; }
/* vmode 包船模式仍用原网格 */
.ci-wrap.vmode.lump .ci-head, .ci-wrap.vmode.lump .ci-row { grid-template-columns: 0.95fr 1.1fr 1fr 1fr 30px; min-width: 480px; }
.ci-mode-h { color: #5a7a96; }
.ci-mode { width: 100%; }
.ci-mode-ph { display: inline-block; }
/* 航次卡片：多货种摘要 */
.vc-cargo-chips { display: inline-block; margin-left: 6px; padding: 1px 8px; font-size: 11px; font-weight: 600; color: #1e6fb8; background: #e7f1fc; border: 1px solid #c2ddf5; border-radius: 10px; white-space: nowrap; }

/* r205：收入明细内嵌双栏布局 */
.income-layout { display: flex; flex-direction: column; gap: 12px; min-height: calc(100vh - 130px); }
.income-nav { display: flex; flex-wrap: wrap; gap: 8px; background: #fff; border: 1px solid var(--border, #d6e0ea); border-radius: var(--radius, 10px); padding: 10px; }
.income-nav-item { display: flex; justify-content: space-between; align-items: center; padding: 8px 14px; border-radius: 8px; cursor: pointer; font-weight: 500; color: var(--text, #3b4a5a); background: #f9fbfd; border: 1px solid #e4edf3; }
.income-nav-item:hover { background: #f3f8fc; }
.income-nav-item.active { background: #e7f1fc; color: #1e6fb8; font-weight: 700; border-color: #b7d4f0; }
.income-nav-count { font-size: 11px; color: #7f95aa; background: #fff; padding: 2px 8px; border-radius: 10px; margin-left: 8px; }
.income-main { flex: 1; min-width: 0; background: #fff; border: 1px solid var(--border, #d6e0ea); border-radius: var(--radius, 10px); padding: 14px; }
.income-detail-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.income-detail-head .sh-title { font-size: 18px; font-weight: 700; color: var(--text, #3b4a5a); }
/* r207：财务页顶部统计入口按钮区 + 统计内嵌页布局 */
.fin-stats-bar { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 14px; background: #fff; border: 1px solid var(--border, #d6e0ea); border-radius: var(--radius, 10px); margin-bottom: 12px; }
.fin-stats-bar .btn { flex: 1 1 auto; min-width: 120px; }
.stats-layout { display: flex; flex-direction: column; gap: 12px; min-height: calc(100vh - 130px); }
.stats-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; background: #fff; border: 1px solid var(--border, #d6e0ea); border-radius: var(--radius, 10px); }
.stats-head .sh-title { font-size: 16px; font-weight: 700; color: var(--text, #3b4a5a); }
.stats-body { flex: 1; min-width: 0; background: #fff; border: 1px solid var(--border, #d6e0ea); border-radius: var(--radius, 10px); padding: 14px; }
@media (max-width: 768px) {
  .income-nav { flex-wrap: nowrap; overflow-x: auto; }
  .income-nav-item { flex: 0 0 auto; white-space: nowrap; }
}
