/* FQA国际货运代理管理系统 - 核心样式
 * 2026企业级后台设计规范：深色优先、高信息密度、微边框、表格核心
 */

/* ===== CSS变量 ===== */
:root {
    /* 品牌主色 */
    --primary-1: #e6f4ff;
    --primary-2: #bae0ff;
    --primary-3: #91caff;
    --primary-4: #69b1ff;
    --primary-5: #4096ff;
    --primary-6: #1677ff;
    --primary-7: #0958d9;
    --primary-8: #003eb3;
    --primary: #1677ff;

    /* 语义色 */
    --success: #52c41a;
    --warning: #faad14;
    --danger: #ff4d4f;
    --info: #1677ff;
    --processing: #1677ff;
    --default: #8c8c8c;

    /* 中性色（亮色） */
    --white: #ffffff;
    --bg-1: #ffffff;
    --bg-2: #fafafa;
    --bg-3: #f6f7f9;
    --bg-4: #f0f0f0;
    --border-1: #e5e7eb;
    --border-2: #d9d9d9;
    --border-3: #bfbfbf;
    --text-1: #1f1f1f;
    --text-2: #595959;
    --text-3: #8c8c8c;
    --text-4: #bfbfbf;

    /* 布局 */
    --sidebar-width: 200px;
    --sidebar-collapsed-width: 64px;
    --header-height: 40px;
    --tabs-height: 30px;
    --content-padding: 15px;

    /* 圆角 */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-xl: 12px;

    /* 字体 */
    --font-family: Inter, apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, 'SF Mono', 'Cascadia Mono', 'Roboto Mono', Menlo, Consolas, 'Liberation Mono', monospace;

    /* 阴影 */
    --shadow-1: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-2: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-3: 0 4px 12px rgba(0,0,0,0.08);

    /* 过渡 */
    --transition: 200ms ease-out;

    /* 图表配色（系统统一图表组件 FQA.renderChartPanel 使用，按序取用） */
    --chart-1: #1677ff;
    --chart-2: #52c41a;
    --chart-3: #faad14;
    --chart-4: #ff4d4f;
    --chart-5: #722ed1;
    --chart-6: #13c2c2;
    --chart-7: #eb2f96;
    --chart-8: #fa8c16;
    --chart-grid: #eef0f3;
    --chart-axis: #bfbfbf;
    --chart-label: #8c8c8c;
}

/* 移动端基础: 消除300ms点击延迟 + 最小触摸区域 */
button, a.btn, .radio-item, .section-add-btn, .pickup-del-btn, .repeat-del-btn, .attach-add-btn, .attach-item-del,
[onclick], [type="submit"], .save-bar .btn {
    touch-action: manipulation;
    -ms-touch-action: manipulation;
}
/* 确保所有可点击元素最小触摸区域44x44(iOS HIG) */
@media screen and (pointer: coarse) {
    .section-add-btn { min-height: 32px; min-width: 32px; }
    .pickup-del-btn, .repeat-del-btn { min-height: 32px; min-width: 32px; }
    .dynamic-table-wrap .col-actions button { min-width: 32px; min-height: 32px; }
    .radio-item { min-height: 32px; padding: 6px 12px; }
    .btn { min-height: 36px; }
}

/* 暗黑模式 */
html.dark {
    --bg-1: #141414;
    --bg-2: #1a1a1a;
    --bg-3: #1f1f1f;
    --bg-4: #262626;
    --bg-5: #303030;
    --border-1: #303030;
    --border-2: #3a3a3a;
    --border-3: #4a4a4a;
    --text-1: #e8e8e8;
    --text-2: #a6a6a6;
    --text-3: #737373;
    --text-4: #5a5a5a;
    --primary: #4096ff;
    --primary-1: #111d2c;
    --primary-5: #4096ff;
    --shadow-1: 0 1px 2px rgba(0,0,0,0.3);
    --shadow-2: 0 2px 8px rgba(0,0,0,0.4);
    --shadow-3: 0 4px 12px rgba(0,0,0,0.5);
    /* 图表配色（暗底上提亮，保证对比度） */
    --chart-1: #4096ff;
    --chart-2: #73d13d;
    --chart-3: #ffc53d;
    --chart-4: #ff7875;
    --chart-5: #9254de;
    --chart-6: #36cfc9;
    --chart-7: #f759ab;
    --chart-8: #ffa940;
    --chart-grid: #262626;
    --chart-axis: #434343;
    --chart-label: #8c8c8c;
}

/* ===== 基础重置 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
    font-family: var(--font-family);
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-1);
    background: var(--bg-2);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-5); }
ul, ol { list-style: none; }
input, button, textarea, select { font-family: inherit; font-size: inherit; }
/* 代码/单号类: 等宽字体 + 等宽数字 */
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-feature-settings: 'tnum' 1; }
/* 数字/金额类: 使用界面字体 + 等宽数字(表格中更清爽且纵向对齐) */
.num { font-family: var(--font-family); font-variant-numeric: tabular-nums; font-feature-settings: 'tnum' 1; }

/* ===== 布局 ===== */
.app-layout { display: flex; height: 100vh; overflow: hidden; }

/* 侧边栏 */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-1);
    border-right: 1px solid var(--border-1);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: width var(--transition);
    overflow: hidden;
}
.sidebar.collapsed { width: var(--sidebar-collapsed-width); }
.sidebar-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border-1);
    flex-shrink: 0;
}
.logo-expanded {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6px 10px 4px;
    gap: 4px;
}
.logo-collapsed {
    display: none;
    align-items: center;
    justify-content: center;
    height: var(--header-height);
}
.sidebar.collapsed .logo-expanded { display: none; }
.sidebar.collapsed .logo-collapsed { display: flex; }
.sidebar-logo .logo-icon {
    width: 56px; height: 56px;
    background: var(--primary);
    border-radius: var(--radius-lg);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700; font-size: 24px;
    flex-shrink: 0;
}
.sidebar-logo .logo-img {
    width: 160px; height: auto; max-height: 72px;
    border-radius: var(--radius-md);
    object-fit: contain;
    flex-shrink: 0;
}
.sidebar-logo .logo-text {
    font-size: 14px; font-weight: 600; color: var(--text-1);
    white-space: nowrap; overflow: hidden; text-align: center;
}
.sidebar-logo .favicon-img {
    width: 28px; height: 28px;
    object-fit: contain;
    flex-shrink: 0;
}
/* 暗色Logo默认隐藏 */
.logo-img-dark { display: none; }
/* 折叠状态下logo-icon缩小 */
.sidebar.collapsed .sidebar-logo .logo-icon { width: 28px; height: 28px; font-size: 14px; border-radius: var(--radius-sm); }
.sidebar-menu {
    flex: 1; overflow-y: auto; overflow-x: hidden;
    padding: 8px 0;
}
.sidebar-menu::-webkit-scrollbar { width: 6px; }
.sidebar-menu::-webkit-scrollbar-track { background: transparent; }
.sidebar-menu::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 9999px; }

.menu-item {
    display: flex; align-items: center;
    padding: 0 16px; height: 40px;
    color: var(--text-2); cursor: pointer;
    gap: 10px; white-space: nowrap;
    font-size: 14px;
    transition: all 150ms ease;
    border-radius: 0;
    position: relative;
}
.menu-item:hover { background: var(--bg-4); color: var(--text-1); }
.menu-item.active { background: var(--primary-1); color: var(--primary); font-weight: 500; }
.menu-item .menu-icon { width: 18px; height: 18px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.menu-item .menu-label { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.sidebar.collapsed .menu-label { display: none; }
.sidebar.collapsed .menu-item { justify-content: center; padding: 0; }
.menu-group-title {
    display: flex; align-items: center;
    padding: 0 16px; height: 40px;
    color: var(--text-2); cursor: pointer;
    gap: 10px; white-space: nowrap;
    font-size: 14px;
    transition: all 150ms ease;
    border-radius: 0; font-weight: 400;
}
.menu-group-title:hover { background: var(--bg-4); color: var(--text-1); }
.menu-group-title .menu-icon { width: 18px; height: 18px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.menu-group-title .menu-label { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.sidebar.collapsed .menu-group-title { justify-content: center; padding: 0; }
.sidebar.collapsed .menu-group-title .menu-label,
.sidebar.collapsed .menu-group-title .menu-arrow { display: none; }
.sidebar.collapsed .menu-group-title .menu-icon { margin: 0; }
.menu-children { overflow: hidden; }
.sidebar.collapsed .menu-children { display: none; }
.menu-children .menu-item { padding-left: 44px; height: 36px; font-size: 13px; }

/* 折叠状态下的悬浮子菜单（JS动态创建） */
.sidebar-popup { position: fixed; min-width: 160px; background: var(--bg-1); border: 1px solid var(--border-2); border-radius: var(--radius-md); box-shadow: 0 4px 12px rgba(0,0,0,0.15); z-index: 1000; padding: 4px 0; }
.sidebar-popup .popup-title { padding: 8px 16px; font-size: 13px; font-weight: 600; color: var(--text-1); border-bottom: 1px solid var(--border-1); margin-bottom: 4px; }
.sidebar-popup .popup-item { display: flex; align-items: center; gap: 8px; padding: 6px 16px; font-size: 13px; color: var(--text-2); cursor: pointer; white-space: nowrap; text-decoration: none; }
.sidebar-popup .popup-item:hover { background: var(--bg-4); color: var(--text-1); }
.sidebar-popup .popup-item.active { color: var(--primary); background: var(--primary-1); }
.sidebar-popup .popup-item .menu-icon { width: 16px; height: 16px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }


/* 主区域 */
.main-area { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }

/* 顶部页头 */
.app-header {
    height: var(--header-height);
    background: var(--bg-1);
    border-bottom: 1px solid var(--border-1);
    display: flex; align-items: center;
    padding: 0 24px; gap: 16px;
    flex-shrink: 0; z-index: 900;   /* 高于 Tabs/内容区(≤100)与 sticky 元素，保证面包屑/用户下拉不被遮挡；模态框 1000 仍可覆盖 */
}
.header-toggle { cursor: pointer; display: flex; align-items: center; color: var(--text-2); }
.header-toggle:hover { color: var(--primary); }
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 14px; flex: 1; }
.breadcrumb-item { color: var(--text-3); }
.breadcrumb-item a { color: var(--text-3); text-decoration: none; }
.breadcrumb-item a:hover { color: var(--primary); }
.breadcrumb-item:last-child { color: var(--text-1); }
.breadcrumb-sep { color: var(--text-4); }
.breadcrumb-item--active { color: var(--text-1); font-weight: 500; }

/* 面包屑下拉菜单 */
.breadcrumb-dropdown {
    position: relative; display: inline-flex; align-items: center;
}
.breadcrumb-dropdown-trigger {
    cursor: pointer; display: inline-flex; align-items: center; gap: 4px;
}
.breadcrumb-dropdown-trigger:hover { color: var(--primary); }
.dropdown-arrow { font-size: 10px; opacity: 0.6; }
.breadcrumb-dropdown:hover > .breadcrumb-dropdown-menu,
.breadcrumb-dropdown.is-open > .breadcrumb-dropdown-menu { display: block; }
.breadcrumb-dropdown.has-children > .breadcrumb-dropdown-trigger { cursor: pointer; }
.breadcrumb-dropdown.has-children > .breadcrumb-dropdown-trigger svg {
    width: 12px; height: 12px; margin-left: 2px; opacity: 0.55;
    fill: none; stroke: currentColor; stroke-width: 2;
}
.breadcrumb-dropdown-menu {
    display: none; position: absolute; top: 100%; left: 0; z-index: 1000;
    min-width: 180px; max-height: 300px; overflow-y: auto;
    background: var(--bg-1); border: 1px solid var(--border-1);
    border-radius: var(--radius-lg); box-shadow: var(--shadow-2);
    padding: 4px 0; margin-top: 4px;
}
.breadcrumb-dropdown-menu a {
    display: block; padding: 8px 16px; color: var(--text-2);
    text-decoration: none; transition: all 150ms;
}
.breadcrumb-dropdown-menu a:hover {
    background: var(--bg-2); color: var(--primary);
}
.header-right { display: flex; align-items: center; gap: 16px; }
.header-datetime { font-size: 13px; color: var(--text-3); font-family: var(--font-mono); }
.header-icon-btn { cursor: pointer; color: var(--text-2); display: flex; align-items: center; }
.header-icon-btn:hover { color: var(--primary); }
.header-user { display: flex; align-items: center; gap: 8px; cursor: pointer; position: relative; }
.header-user .user-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--primary); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 500;
}
.header-user .user-name { font-size: 14px; color: var(--text-1); }
.user-dropdown {
    position: absolute; top: 100%; right: 0; margin-top: 8px;
    background: var(--bg-1); border: 1px solid var(--border-1);
    border-radius: var(--radius-lg); box-shadow: var(--shadow-2);
    min-width: 180px; padding: 4px; z-index: 1000;
    display: none;
}
.header-user:hover .user-dropdown,
.header-user.is-open .user-dropdown { display: block; }
.header-user .user-avatar img,
.user-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.user-dropdown-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px 8px; }
.user-avatar--lg { width: 40px; height: 40px; font-size: 16px; flex: none; }
.user-dropdown-meta { min-width: 0; }
.user-dropdown-name { font-size: 14px; font-weight: 600; color: var(--text-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-dropdown-sub { font-size: 12px; color: var(--text-3); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.user-dropdown-item { text-decoration: none; color: var(--text-1); }
.user-dropdown-item {
    padding: 8px 12px; cursor: pointer; border-radius: var(--radius-sm);
    display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-1);
}
.user-dropdown-item:hover { background: var(--bg-4); }
.user-dropdown-item.danger { color: var(--danger); }
.user-dropdown-divider { height: 1px; background: var(--border-1); margin: 4px 0; }

/* 顶部通知铃铛 */
.header-bell { position: relative; display: flex; align-items: center; }
.header-bell-trigger { position: relative; }
.header-bell-trigger svg { width: 18px; height: 18px; }
.bell-badge {
    position: absolute; top: -2px; right: -2px; min-width: 16px; height: 16px;
    padding: 0 4px; border-radius: 8px; background: var(--danger); color: #fff;
    font-size: 11px; line-height: 16px; text-align: center; font-weight: 600;
    box-sizing: border-box; pointer-events: none;
}
.bell-dropdown {
    position: absolute; top: 100%; right: 0; margin-top: 8px;
    width: 340px; background: var(--bg-1); border: 1px solid var(--border-1);
    border-radius: var(--radius-lg); box-shadow: var(--shadow-2);
    z-index: 1000; display: none; overflow: hidden;
}
.header-bell:hover .bell-dropdown,
.header-bell.is-open .bell-dropdown { display: block; }
.bell-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 12px; border-bottom: 1px solid var(--border-1);
}
.bell-head-title { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--text-1); }
.bell-head-title svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.bell-head-title .pc-kv { font-weight: 400; font-size: 12px; color: var(--text-3); }
.bell-head-actions { display: flex; align-items: center; gap: 12px; }
.bell-head-actions a { font-size: 12px; color: var(--primary); text-decoration: none; }
.bell-head-actions a:hover { text-decoration: underline; }
.bell-list { max-height: 380px; overflow-y: auto; }
.bell-item {
    display: block; padding: 10px 12px; border-bottom: 1px solid var(--border-1);
    text-decoration: none; color: inherit; cursor: pointer; transition: background 120ms;
}
.bell-item:last-child { border-bottom: none; }
.bell-item:hover { background: var(--bg-4); }
.bell-item.is-unread { background: var(--primary-soft, rgba(59,130,246,.08)); }
.bell-item.is-unread:hover { background: var(--bg-4); }
.bell-item-top { display: flex; align-items: center; gap: 6px; }
.bell-item-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--danger); flex: none; }
.bell-item-title { font-size: 13px; font-weight: 600; color: var(--text-1); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bell-item-time { font-size: 11px; color: var(--text-3); flex: none; }
.bell-item-content { font-size: 12px; color: var(--text-2); margin-top: 4px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bell-item-tag { display: inline-block; margin-top: 5px; font-size: 11px; padding: 1px 6px; border-radius: 3px; background: var(--bg-3); color: var(--text-3); }

/* Tabs */
.app-tabs {
    height: var(--tabs-height);
    background: var(--bg-1);
    border-bottom: 1px solid var(--border-1);
    display: flex; flex-direction: row; align-items: center;
    padding: 0 12px; gap: 4px;
    flex-shrink: 0; overflow-x: auto; overflow-y: hidden;
}
.app-tabs::-webkit-scrollbar { height: 0; }
.tab-item {
    display: flex; align-items: center; gap: 6px;
    padding: 0 12px; height: 30px;
    border-radius: var(--radius-sm);
    font-size: 13px; color: var(--text-2);
    cursor: pointer; white-space: nowrap;
    transition: all 150ms ease;
}
.tab-item:hover { background: var(--bg-4); }
.tab-item.active { background: var(--primary-1); color: var(--primary); }
.tab-item .tab-close { width: 14px; height: 14px; display: none; align-items: center; justify-content: center; border-radius: 50%; }
.tab-item:hover .tab-close { display: flex; }
.tab-close:hover { background: var(--border-2); }

/* 内容区 */
.app-content {
    flex: 1; overflow-y: auto;
    padding: 0 var(--content-padding);
    background: var(--bg-2);
}
.app-content::-webkit-scrollbar { width: 8px; }
.app-content::-webkit-scrollbar-track { background: transparent; }
.app-content::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 9999px; }
/* 吸顶/吸底兼容:滚动容器仅左右padding,由首位可见子元素提供上间距(统一,各页面沿用) */
.app-content > :first-child:not(style):not(script),
.app-content > style:first-child + *:not(script) {
    margin-top: var(--content-padding);
}

/* 页脚 */
.app-footer {
    height: 25px; background: var(--bg-1);
    border-top: 1px solid var(--border-1);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 24px; flex-shrink: 0;
    font-size: 13px; color: var(--text-3);
}

/* ===== 卡片 ===== */
.card {
    background: var(--bg-1);
    border: 1px solid var(--border-1);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.card-header {
    padding: 0 16px;
    border-bottom: 1px solid var(--border-1);
    display: flex; align-items: center; justify-content: space-between;
    height: 40px;
}
/* 标题栏可换行(查看页等操作按钮较多时使用) */
.card-header--wrap { height: auto; min-height: 40px; flex-wrap: wrap; row-gap: 8px; padding-top: 6px; padding-bottom: 6px; }
.card-title { font-size: 15px; font-weight: 600; color: var(--text-1); display: inline-flex; align-items: center; gap: 6px; min-width: 0; flex-wrap: wrap; }
.card-title > svg { width: 16px; height: 16px; flex: none; color: var(--primary); }
.card-body { padding: 20px; }
.card-footer { padding: 12px 20px; border-top: 1px solid var(--border-1); }

/* ===== 卡片标题右侧: 元信息(单号+复制按钮) + 操作按钮 (通用组件, 所有页面可复用) ===== */
/* 允许换行 + 可收缩: 避免标题/单号过长时与右侧按钮组"文字重合" */
.card-header-right {
    display: flex; align-items: center; gap: 12px; row-gap: 6px;
    margin-left: auto; min-width: 0; flex-wrap: wrap; justify-content: flex-end;
}
.card-header-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* 卡片标题旁的一句话说明（系统统一，如「点击订单号进入详情页」）：紧随标题，灰字小号 */
.card-header-hint { margin-left: 12px; font-size: 12px; color: var(--text-3); font-weight: 400; }
/* 查看页: 内部Tab区域与上方汇总留白; 卡片底部留白(查看页无吸底操作栏) */
.order-detail-page .card-body { padding-bottom: 20px; }
.detail-page .card-body { padding-bottom: 20px; }
/* ===== 员工查看页：顶部一览（头像/姓名/编号/部门/职位/在职状态） ===== */
.emp-overview { display: flex; align-items: center; gap: 16px; padding: 14px 16px; margin-bottom: 14px;
    border: 1px solid var(--border-1); border-radius: var(--radius-lg); background: var(--bg-2); }
.emp-overview .emp-avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: none;
    background: var(--bg-3); border: 1px solid var(--border-1); }
.emp-overview .emp-avatar--empty { display: flex; align-items: center; justify-content: center;
    color: var(--text-3); font-size: 22px; font-weight: 600; }
.emp-overview .emp-name { font-size: 18px; font-weight: 600; color: var(--text-1); display: flex; align-items: center; gap: 8px; }
.emp-overview .emp-sub { font-size: 13px; color: var(--text-2); margin-top: 4px; }
.emp-overview .emp-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; font-size: 12px; color: var(--text-2); }
.order-detail-page .detail-tabs-wrap { margin-top: 20px; }

/* ===== 订舱托书(托书)页: 与订单创建/编辑页一致的排版布局, 打印友好 ===== */
.booking-letter-page .card-body { padding-bottom: 12px; }

/* 1. 标题(顶部居中 + 实线分割) */
.booking-letter-page .bl-title { text-align: center; padding: 4px 0 12px; border-bottom: 2px solid var(--text-1); margin-bottom: 14px; }
.booking-letter-page .bl-title-cn { font-size: 24px; font-weight: 700; letter-spacing: 8px; color: var(--text-1); }
.booking-letter-page .bl-title-en { font-size: 13px; letter-spacing: 6px; color: var(--text-2); margin-top: 2px; }

/* 2. 收发货人信息(左右对半) */
.booking-letter-page .bl-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.booking-letter-page .bl-parties-left { min-width: 0; }
.booking-letter-page .bl-parties-right { text-align: right; font-size: 12.5px; line-height: 1.9; color: var(--text-2); border-left: 1px dashed var(--border-1); padding-left: 24px; }
.booking-letter-page .bl-cn { color: var(--primary); font-weight: 700; }
.booking-letter-page .bl-print-same { display: none; color: var(--danger); font-weight: 700; font-size: 13px; }
.booking-letter-page .bl-party-ta { min-height: 72px; line-height: 1.6; resize: vertical; }
.booking-letter-page .bl-booking-no { font-size: 14px; color: var(--text-1); margin-bottom: 8px; }
.booking-letter-page .bl-booking-no b { font-family: var(--font-mono); }
.booking-letter-page .bl-logo { max-height: 84px; max-width: 280px; object-fit: contain; margin: 4px 0 8px; }
.booking-letter-page .bl-logo--empty { display: inline-flex; align-items: center; justify-content: center; width: 84px; height: 84px; border-radius: 12px; background: var(--primary-1); color: var(--primary); font-size: 34px; font-weight: 700; }
.booking-letter-page .bl-co-name { font-size: 16px; font-weight: 700; color: var(--text-1); }
.booking-letter-page .bl-co-en { font-size: 13px; color: var(--text-1); }
.booking-letter-page .bl-co-line { color: var(--text-2); }

/* 段落标题里的按钮 / 附加说明 */
.booking-letter-page .bl-toggle { margin-left: auto; flex: none; }
.booking-letter-page .bl-toggle--empty { color: var(--text-3); opacity: .7; }
.booking-letter-page .bl-sec-extra { font-size: 12px; font-weight: 400; color: var(--text-3); margin-left: auto; }

/* 段落编号：CSS 计数器，隐藏的段落不占号（打印时自动连续） */
.booking-letter-page { counter-reset: blsec; }
.booking-letter-page .section-title { counter-increment: blsec; }
.booking-letter-page .bl-sec-no::before { content: counter(blsec) ". "; }

/* 订舱信息备注：高度与普通输入框一致(单行高)，节省纵向空间 */
.booking-letter-page .form-textarea.bl-note-input { height: 32px; min-height: 32px; padding: 0 8px; line-height: 30px; resize: none; }

/* 特殊货物 */
.booking-letter-page .bl-brand-wrap { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); margin-left: 8px; }
.booking-letter-page .bl-brand-wrap .input-clear-wrap { width: 180px; flex: none; }
.booking-letter-page .bl-brand-input { width: 180px; }

/* 表格 */
.booking-letter-page .bl-table th, .booking-letter-page .bl-table td { vertical-align: middle; }
.booking-letter-page .bl-empty-cell { text-align: center; color: var(--text-3); padding: 14px; }
.booking-letter-page .bl-total td { font-weight: 600; background: var(--bg-2); }

/* 9. 声明与签章(三列) */
.booking-letter-page .bl-declare-grid { display: grid; grid-template-columns: 60px 1fr 320px; border: 1px solid var(--border-1); border-radius: var(--radius-md); overflow: hidden; }
.booking-letter-page .bl-declare-note { writing-mode: vertical-rl; text-orientation: upright; display: flex; align-items: center; justify-content: center; letter-spacing: 2px; font-size: 12px; font-weight: 700; color: var(--text-1); padding: 10px 0; border-right: 1px solid var(--border-1); background: var(--bg-2); }
.booking-letter-page .bl-declare-body { padding: 12px 14px; font-size: 12.5px; color: var(--text-2); line-height: 1.85; border-right: 1px solid var(--border-1); }
.booking-letter-page .bl-declare-body p { margin: 0 0 10px; }
.booking-letter-page .bl-declare-body p:last-child { margin-bottom: 0; }
.booking-letter-page .bl-declare-sign { padding: 12px 14px; display: flex; flex-direction: column; }
.booking-letter-page .bl-sign-label { font-size: 12.5px; color: var(--text-1); font-weight: 600; }
.booking-letter-page .bl-sign-for { font-size: 12px; color: var(--text-3); font-style: italic; margin-top: 8px; }
.booking-letter-page .bl-sign-co { font-size: 12.5px; color: var(--primary); font-weight: 600; font-style: italic; }
.booking-letter-page .bl-sign-seal { min-height: 60px; display: flex; align-items: center; justify-content: center; margin: 4px 0; }
.booking-letter-page .bl-sign-seal img { max-height: 74px; max-width: 180px; object-fit: contain; }
.booking-letter-page .bl-sign-line { border-bottom: 2px dotted var(--text-2); height: 4px; }
.booking-letter-page .bl-sign-caption { text-align: right; font-size: 11.5px; color: var(--text-3); font-style: italic; margin-top: 2px; }
.booking-letter-page .bl-sign-date { margin-top: 14px; font-size: 12.5px; color: var(--text-1); }
.booking-letter-page .bl-sign-date b { font-family: var(--font-mono); }

/* 折叠按钮箭头翻转 */
.booking-letter-page .bl-toggle svg { transition: transform .2s; }
.booking-letter-page .bl-toggle.collapse-toggle--collapsed svg { transform: rotate(-90deg); }

@media (max-width: 720px) {
    .booking-letter-page .bl-parties { grid-template-columns: 1fr; }
    .booking-letter-page .bl-parties-right { border-left: 0; border-top: 1px dashed var(--border-1); padding-left: 0; padding-top: 12px; text-align: left; }
    .booking-letter-page .bl-declare-grid { grid-template-columns: 1fr; }
    .booking-letter-page .bl-declare-note { writing-mode: horizontal-tb; border-right: 0; border-bottom: 1px solid var(--border-1); }
    .booking-letter-page .bl-declare-body { border-right: 0; border-bottom: 1px solid var(--border-1); }
}

/* 托书打印：区块不跨页、打印固定多列版式 */
@media print {
    .booking-letter-page .bl-parties, .booking-letter-page .bl-declare-grid { page-break-inside: avoid; }
    .booking-letter-page .section-title { page-break-after: avoid; }
    .booking-letter-page .bl-parties { grid-template-columns: 1fr 1fr !important; }
    .booking-letter-page .bl-parties-right { border-left: 1px dashed var(--border-1) !important; border-top: 0 !important; text-align: right !important; padding-left: 24px !important; padding-top: 0 !important; }
    .booking-letter-page .bl-declare-grid { grid-template-columns: 60px 1fr 320px !important; }
    .booking-letter-page .bl-declare-note { writing-mode: vertical-rl !important; text-orientation: upright !important; border-right: 1px solid var(--border-1) !important; border-bottom: 0 !important; }
    .booking-letter-page .bl-declare-body { border-right: 1px solid var(--border-1) !important; border-bottom: 0 !important; }
    /* 收起的区块打印时也展开 */
    .booking-letter-page .is-collapsed { display: block !important; }
    .booking-letter-page .bl-toggle { display: none !important; }
    .booking-letter-page .bl-input, .booking-letter-page .bl-remarks { border-color: var(--border-1) !important; background: transparent !important; }
    /* 打印隐藏输入框引导词(placeholder) */
    .booking-letter-page input::placeholder, .booking-letter-page textarea::placeholder { color: transparent !important; opacity: 0 !important; }
    /* 打印隐藏操作列/删除按钮/空态提示 */
    .booking-letter-page .col-actions, .booking-letter-page .action-delete,
    .booking-letter-page .bl-empty-cell { display: none !important; }
    /* 通知人为空时，打印显示 SAME AS CONSIGNEE（业务默认值，非引导词） */
    .booking-letter-page .bl-print-same { display: block !important; }
    /* 单选按钮组：打印只显示选中项，未选中的不显示 */
    .booking-letter-page .radio-item:not(.checked) { display: none !important; }
    /* 是/否单开关：打印显示当前状态文字(选中=是 / 未选=否)，去掉按钮外观 */
    .booking-letter-page .bool-switch--single .bool-switch__btn {
        padding: 0 !important; border: 0 !important; background: transparent !important;
        color: var(--text-1) !important; font-size: 13px !important;
    }
    .booking-letter-page .bool-switch--single .bool-switch__btn::before { display: none !important; }
    .booking-letter-page .bool-switch--single .bool-switch__btn:not(.is-active) { font-size: 0 !important; }
    .booking-letter-page .bool-switch--single .bool-switch__btn:not(.is-active)::after { content: '否'; font-size: 13px; }
    /* 无数据的段落(货物尺寸/分单配置/提货信息)打印时整段隐藏 */
    .booking-letter-page .bl-sec-empty { display: none !important; }
    /* A4 四周页边距 0.5cm（打印内容区 padding） */
    body:has(.booking-letter-page) .app-content { padding: 0.5cm !important; }
    .booking-letter-page .card, .booking-letter-page .card-body { margin: 0 !important; padding: 0 !important; }
    .booking-letter-page .bl-title { padding-top: 0 !important; }
}

/* ===== 空运提单(Air Waybill / 中性提单) 版式 =====
 * 严格对照 AWB-中性提单扫描.pdf：预印红墨边框/栏名 + 黑字填写值；
 * 斜切标签条(.awb-tag)、橡皮章圆角框(.awb-stamp)、虚线(.awb-dot)、底纹行(.awb-shade)、
/* 空运主单 AWB 版式：尺寸严格按 IATA Resolution 600a Attachment "A"《AIR WAYBILL TECHNICAL SPECIFICATIONS》
   （参考 sdtetlb20061_en.pdf）：
     · 整张提单外沿 宽 208–230 mm（8.2–9 in）、长 274–305 mm（10.8–12 in）；
     · 所有栏位尺寸及其距纸张左上角的位置，以 4.23 mm（1/6 in）网格为准。
   这里取规范下限宽 208 mm，行高按同比例放大，整张约 208 × 290 mm（落在规范区间内）。
   整张提单由多张分栏表拼成一整张单据，货物区竖向引导线(.awb-guide)。 */
.awb-page { --awb-ink: #c8102e; --awb-ink-2: #eaa8b2;
    background: #fff; color: #111; font-size: 10px; line-height: 1.2;
    width: 208mm; max-width: 100%; margin: 0 auto; page-break-inside: avoid; }
.awb-page .awb-tbl { width: 100%; border-collapse: collapse; table-layout: fixed; }
.awb-page .awb-tbl td { border: 1px solid var(--awb-ink); padding: 2px 3px; vertical-align: top; }
/* 上下相邻的分栏表：去掉后表首行上边框，避免双线 */
.awb-page .awb-tbl + .awb-tbl > tbody > tr:first-child > td { border-top: 0; }
.awb-page .awb-lbl { color: var(--awb-ink); font-size: 7.5px; line-height: 1.15; }
.awb-page .awb-note { font-size: 6.6px; line-height: 1.28; color: var(--awb-ink); }
.awb-page .awb-sub { font-size: 6.5px; }
.awb-page .awb-c { text-align: center; }
.awb-page .awb-box { min-height: 13px; }
/* 顶部 STAPLE 撕线带（下沿为齿孔虚线） */
.awb-staple { display: flex; justify-content: space-between; align-items: center;
    background: #f9e4e6; border: 1px solid var(--awb-ink); border-bottom: 1px dashed var(--awb-ink); padding: 1px 8px;
    font-size: 6.5px; color: var(--awb-ink); }
.awb-staple-title { font-weight: 700; font-size: 9px; letter-spacing: 2px; }
/* Not Negotiable / Air Waybill / Issued by */
.awb-issued { padding: 0 !important; }
.awb-issued-hd { padding: 2px 3px 0; }
.awb-issued-title { display: block; font-size: 15px; font-weight: 700; color: var(--awb-ink); line-height: 1.1; }
.awb-issued-body { padding: 4px 3px; }
/* 斜切标签条：梯形（底宽顶窄），侧边斜角按扫描件量取 ≈24°，标签带高约 13px（在单元格顶部） */
.awb-page .awb-tag { position: relative; padding-top: 1px;
    background-image: linear-gradient(to bottom, transparent 12px, var(--awb-ink) 12px, var(--awb-ink) 13px, transparent 13px); }
.awb-page .awb-tag::before, .awb-page .awb-tag::after {
    content: ''; position: absolute; top: 0; height: 13px; width: 1px; background: var(--awb-ink); }
.awb-page .awb-tag::before { left: 0; transform: skewX(-24deg); transform-origin: bottom left; }
.awb-page .awb-tag::after { right: 0; transform: skewX(24deg); transform-origin: bottom right; }
/* 橡皮章圆角框：Requested Flight/Date、Optional Shipping Information */
.awb-stamp { border: 1px solid var(--awb-ink); border-radius: 12px; padding: 1px 6px; margin: 1px 3px; }
/* 虚线（签名栏） */
.awb-dot { border-bottom: 1px dotted var(--awb-ink); }
/* 底纹行 */
.awb-shade { background: rgba(187, 95, 114, .10); }
/* 货物区：列分隔用双线（扫描件为双细线），并保留竖向引导线 */
.awb-page .awb-goods td { border-right: 3px double var(--awb-ink); }
.awb-page .awb-goods td:last-child { border-right: 1px solid var(--awb-ink); }
.awb-page .awb-goods tr:first-child td { border-right: 1px solid var(--awb-ink); }
/* Rate / Charge 格内的斜线 */
.awb-page .awb-slash { background-image: linear-gradient(to bottom right, transparent calc(50% - 1px), var(--awb-ink) 50%, transparent calc(50% + 1px)); }
/* Rate Class 下的 Commodity Item No. 子框 */
.awb-page .awb-subbox { border: 1px solid var(--awb-ink); margin: 2px -3px -2px; padding: 1px 0; font-size: 6.5px; }
/* 行高：按 Appendix "A" 的实测外沿 208 × 284.6mm（提单本体 274mm + 顶部撕线带 10.6mm，
   全长 = 67.3 个 4.23mm 网格单位）等比分配，整张严格落在规范 208–230 × 274–305mm 内。 */
.awb-h-ship { height: 18mm; } .awb-h-cons { height: 16.5mm; } .awb-h-agent { height: 10.5mm; }
.awb-h-ap { height: 9mm; } .awb-h-dest { height: 9mm; } .awb-h-hand { height: 15mm; }
.awb-h-goods { height: 33.2mm; } .awb-h-marks { height: 11mm; } .awb-h-cert { height: 22mm; }
.awb-h-sign { height: 8mm; } .awb-h-exec { height: 8mm; } .awb-h-last { height: 11mm; }
.awb-original { font-weight: 700; letter-spacing: 2px; color: var(--awb-ink); }
.awb-bottom { padding: 2px 6px; border: 1px solid var(--awb-ink); border-top: 0; }
.awb-original { font-weight: 700; letter-spacing: 2px; color: var(--awb-ink); }
.awb-bottom { display: flex; justify-content: space-between; align-items: center;
    padding: 2px 6px; border: 1px solid var(--awb-ink); border-top: 0; }
/* 填写版：栏位内嵌无边框输入框，页面即一张真实提单填写页 */
.awb-page--form .awb-input { display: block; width: 100%; border: 0; background: transparent; color: #111;
    font-size: 10px; line-height: 1.2; padding: 1px; font-family: inherit; box-sizing: border-box; }
.awb-page--form .awb-input:focus { outline: 1px solid var(--primary); background: #fffbe6; }
.awb-page--form .awb-input::placeholder { color: #c9a6a2; }
.awb-page--form .awb-textarea { resize: vertical; min-height: 13px; }
/* 行内填空框（Executed on/at、Signature 等下划线栏位）：不占整行，宽度自适应 */
.awb-page--form .awb-input--inline { display: inline-block; width: auto; min-width: 46px; max-width: 62%;
    border-bottom: 1px dotted var(--awb-ink); }
.awb-page--form .awb-select { appearance: auto; }

/* ===== 订单对账单页: 单据版式(对照《客户对账单模版参考.pdf》) ===== */
.order-statement-page .card-body { padding-bottom: 10px; }
.order-statement-page .stm-doc { padding: 0 0 4px; }
.order-statement-page .stm-doc--break { page-break-after: always; }
.order-statement-page .stm-doc + .stm-doc { margin-top: 18px; border-top: 1px dashed var(--border-2); padding-top: 14px; }
/* 抬头 */
.order-statement-page .stm-head { display: flex; align-items: center; gap: 16px; }
.order-statement-page .stm-head-logo { flex: none; width: 120px; }
.order-statement-page .stm-head-logo img { max-width: 120px; max-height: 52px; }
.order-statement-page .stm-head-co { flex: 1; min-width: 0; }
.order-statement-page .stm-co-cn { font-size: 19px; font-weight: 700; color: var(--text-1); line-height: 1.35; }
.order-statement-page .stm-co-en { font-size: 12.5px; color: var(--text-2); line-height: 1.35; }
.order-statement-page .stm-co-addr { font-size: 12px; color: var(--text-3); line-height: 1.35; }
/* 分隔线 */
.order-statement-page .stm-rule { border-top: 1px solid var(--text-2); }
.order-statement-page .stm-rule--double { border-top: 3px double var(--text-2); }
.order-statement-page .stm-rule--dashed { border-top: 1px dashed var(--border-2); }
.order-statement-page .stm-doc-title { text-align: center; font-size: 17px; font-weight: 700; letter-spacing: 2px; color: var(--text-1); padding: 7px 0; }
/* 信息区: 标签定宽右对齐, 冒号成一条竖线 */
.order-statement-page .stm-info2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; padding: 3px 0; }
.order-statement-page .stm-info3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 24px; padding: 3px 0; }
.order-statement-page .stm-line { display: flex; align-items: baseline; font-size: 12.5px; line-height: 1.45; padding: 2px 0; border-bottom: 1px dashed var(--border-1); }
.order-statement-page .stm-line:last-child { border-bottom: none; }
.order-statement-page .stm-lb { flex: none; width: 104px; text-align: right; color: var(--text-3); }
.order-statement-page .stm-vl { flex: 1 1 auto; min-width: 0; padding-left: 6px; color: var(--text-1); word-break: break-word; }
.order-statement-page .stm-vl--strong { font-weight: 600; }
.order-statement-page .stm-right { text-align: right; }
/* 区块标题 */
.order-statement-page .stm-sec-title { text-align: center; font-size: 14px; font-weight: 700; letter-spacing: 1px; color: var(--text-1); padding: 8px 0 5px; }
.order-statement-page .stm-sec-title--left { text-align: left; font-size: 13px; padding: 7px 0 4px; }
/* 费用明细表(紧凑) */
.order-statement-page .stm-table { border: none; table-layout: fixed; }
.order-statement-page .stm-table th,
.order-statement-page .stm-table td { padding: 5px 8px; font-size: 12.5px; white-space: normal; word-break: break-word; }
.order-statement-page .stm-table td.col-num { white-space: nowrap; }
.order-statement-page .stm-table th { background: transparent; border-bottom: 1px solid var(--text-2); color: var(--text-2); font-weight: 600; text-align: left; }
.order-statement-page .stm-table th.col-num { text-align: right; }
.order-statement-page .stm-table td { border-bottom: 1px dashed var(--border-1); }
.order-statement-page .stm-subtotal td { background: var(--bg-2); color: var(--text-2); }
.order-statement-page .stm-total-row td { border-top: 1px solid var(--text-2); border-bottom: none; padding-top: 7px; }
.order-statement-page .stm-upper { text-align: right; font-size: 12px; color: var(--text-2); }
/* 收款账户: 用户要求单列显示(不再左右分栏) */
.order-statement-page .stm-pay-grid { display: grid; grid-template-columns: 1fr; gap: 0; }
.order-statement-page .stm-pay-grid .stm-lb { width: 150px; }
/* 温馨提示 */
.order-statement-page .stm-notice-body { font-size: 12px; color: var(--text-2); line-height: 1.7; }

/* ===== 员工对账单 ===== */
/* 表头表单: 4 行 × 5 列, 复用系统 .form-row/.form-group/.form-label(标签在上、内容在下)
   按用户要求不加输入框边框, 只保留「名称：+ 内容」的排布 */
.order-statement-page .stm-form { padding: 2px 0 0; }
.order-statement-page .stm-form .form-row { gap: 12px; }
.order-statement-page .stm-form .form-group { margin-bottom: 10px; }
.order-statement-page .stm-form .form-label { font-size: 11.5px; color: var(--text-3); margin-bottom: 1px; font-weight: 500; }
.order-statement-page .stm-form .form-static { min-height: 0; padding: 0 0 3px; font-size: 12.5px; line-height: 1.5; color: var(--text-1); }
/* 员工单行距统一: 航期/货物参数、汇总、签字等处与表头表单/明细表保持同一字号档 */
.order-statement-page .stm-doc--staff .stm-info3 .stm-line,
.order-statement-page .stm-doc--staff .stm-info3 .stm-lb { font-size: 11.5px; }
.order-statement-page .stm-doc--staff .stm-sec-title { font-size: 12.5px; }
/* 费用明细(应收/应付): 列同订单查看页, 13 列, 字号再收一档 */
.order-statement-page .stm-table--charges th,
.order-statement-page .stm-table--charges td { padding: 4px 5px; font-size: 11px; }
/* 汇总 */
.order-statement-page .stm-summary { padding: 2px 0 4px; }
.order-statement-page .stm-sum-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; padding: 3px 0; }
.order-statement-page .stm-sum-grid .stm-lb { width: 66px; }
.order-statement-page .stm-sum-grid .stm-vl { font-size: 13px; }
.order-statement-page .stm-sum-note { font-size: 11.5px; color: var(--text-3); padding: 2px 0 0 66px; }
/* 签字栏: 上方留 2 行空白便于签字, 下方也留出余量 */
.order-statement-page .stm-sign { display: flex; flex-wrap: wrap; gap: 16px 40px; padding: 44px 0 22px; font-size: 12.5px; color: var(--text-2); }
.order-statement-page .stm-sign-item { display: inline-flex; align-items: flex-end; gap: 6px; }
.order-statement-page .stm-sign-line { display: inline-block; width: 140px; height: 18px; border-bottom: 1px solid var(--text-2); }
/* 顶部切换: 单据语言 + 对账单选择 */
.order-statement-page .stm-bar { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; padding: 10px 12px; border: 1px solid var(--border-1); border-radius: var(--radius-md); background: var(--bg-2); }
.order-statement-page .stm-lang { display: flex; align-items: center; gap: 10px; }
.order-statement-page .stm-lang-label { font-size: 12px; color: var(--text-3); }
.order-statement-page .stm-lang-seg { display: inline-flex; border: 1px solid var(--border-2); border-radius: var(--radius-md); overflow: hidden; background: var(--bg-1); }
.order-statement-page .stm-lang-btn { padding: 5px 18px; font-size: 13px; line-height: 1.5; text-decoration: none; color: var(--text-2); background: var(--bg-1); transition: all .15s; }
.order-statement-page .stm-lang-btn + .stm-lang-btn { border-left: 1px solid var(--border-2); }
.order-statement-page .stm-lang-btn:hover { color: var(--primary); }
.order-statement-page .stm-lang-btn.is-active { background: var(--primary); color: #fff; font-weight: 600; }
.order-statement-page .stm-tabs-wrap { border-top: 1px dashed var(--border-2); padding-top: 9px; }
.order-statement-page .stm-tabs-title { font-size: 12px; color: var(--text-3); margin-bottom: 8px; line-height: 1.6; }
.order-statement-page .stm-tabs-title b { color: var(--primary); }
.order-statement-page .stm-tabs { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.order-statement-page .stm-tab { display: flex; flex-direction: column; gap: 3px; padding: 7px 10px; text-decoration: none; border: 1px solid var(--border-1); border-radius: var(--radius-md); background: var(--bg-1); transition: all .15s; }
.order-statement-page .stm-tab:hover { border-color: var(--primary); }
.order-statement-page .stm-tab.is-active { border-color: var(--primary); background: var(--primary-1); }
.order-statement-page .stm-tab-head { display: flex; align-items: center; gap: 6px; min-width: 0; }
.order-statement-page .stm-tab-name { font-size: 13px; font-weight: 600; color: var(--text-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.order-statement-page .stm-tab-tag { flex: none; padding: 0 6px; font-size: 11px; line-height: 16px; border-radius: 3px; background: var(--primary-1); color: var(--primary-6); }
.order-statement-page .stm-tab-amt { font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.order-statement-page .stm-tab.is-active .stm-tab-amt { color: var(--primary-6); font-weight: 600; }
/* 窄屏: 只作用于屏幕。必须限定 screen —— 否则打印/导出 PDF 时纸张宽度(A4 纵向约 794px)
   会命中该断点, 把单据的信息区压成单列, 打印出来就"全部变 1 列"了。 */
@media screen and (max-width: 900px) {
    .order-statement-page .stm-info2,
    .order-statement-page .stm-info3,
    .order-statement-page .stm-sum-grid { grid-template-columns: 1fr; }
    .order-statement-page .stm-form .form-row { flex-wrap: wrap; }
    .order-statement-page .stm-form .form-group { flex: 1 1 calc(50% - 12px); }
    .order-statement-page .stm-lb,
    .order-statement-page .stm-pay-grid .stm-lb { width: 96px; }
}

/* 打印 / 导出 PDF
   页边距设为 0: Chrome 在页边距为 0 时不再打印自带的页眉(日期+标题)与页脚(网址+页码);
   留白改由内容区 .app-content 的 padding 提供(见本段下方的 .app-content 规则)。
   ⚠ 不要改用「具名页」(@page stmt + page: stmt) 去只给对账单设边距 ——
   Chrome 132 遇到具名页会多插一个强制分页, 对账单第 1 页只排到一半就空白换页(第 2 页接剩余内容)。 */
@page { size: A4 portrait; margin: 0; }
@media print {
    /* 只打印单据本身: 卡片标题/单号区、语言与账单切换区、底部操作栏、消息提示弹窗全部不打印 */
    .order-statement-page .card-header,
    .order-statement-page .stm-bar,
    .order-statement-page .save-bar,
    .message-container,
    .modal-mask { display: none !important; }
    .order-statement-page .stm-info2 { grid-template-columns: 1fr 1fr !important; }
    .order-statement-page .stm-info3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
    .order-statement-page .stm-sum-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
    .order-statement-page .stm-pay-grid { grid-template-columns: 1fr !important; }
    .order-statement-page .stm-lb { width: 104px !important; }
    /* 员工单表头表单: 打印时压缩行高, 保证一张 A4 装得下 */
    .order-statement-page .stm-form .form-row { gap: 8px; }
    .order-statement-page .stm-form .form-group { margin-bottom: 4px; }
    .order-statement-page .stm-form .form-label { font-size: 10px; margin-bottom: 0; }
    .order-statement-page .stm-form .form-static { min-height: 0; padding: 0 0 2px; font-size: 11px; line-height: 1.45; }
    .order-statement-page .stm-doc--staff .stm-info3 .stm-line,
    .order-statement-page .stm-doc--staff .stm-info3 .stm-lb { font-size: 10.5px; }
    .order-statement-page .stm-doc--staff .stm-sec-title { font-size: 11.5px; }
    .order-statement-page .stm-sign { padding: 30px 0 16px; }
    .order-statement-page .stm-sum-grid .stm-lb { width: 60px !important; }
    .order-statement-page .stm-sum-grid .stm-vl { font-size: 12px; }
    .order-statement-page .stm-sign-line { width: 118px; }
    .order-statement-page .stm-pay-grid .stm-lb { width: 150px !important; }
    /* 单据行距在打印时收紧, 给一张 A4 留出富余量 */
    .order-statement-page .stm-doc { padding: 0; }
    .order-statement-page .stm-doc + .stm-doc { margin-top: 0; border-top: none; padding-top: 0; }
    .order-statement-page .stm-head-logo img { max-height: 40px; }
    .order-statement-page .stm-co-cn { font-size: 16px; }
    .order-statement-page .stm-doc-title { font-size: 15px; padding: 4px 0; }
    .order-statement-page .stm-sec-title { font-size: 13px; padding: 5px 0 3px; }
    .order-statement-page .stm-info2,
    .order-statement-page .stm-info3,
    .order-statement-page .stm-line { padding: 1px 0; }
    .order-statement-page .stm-table th,
    .order-statement-page .stm-table td { padding: 3px 6px; font-size: 11.5px; }
    .order-statement-page .stm-table--charges th,
    .order-statement-page .stm-table--charges td { padding: 3px 4px; font-size: 10.5px; }
    .order-statement-page .stm-sum-grid { padding: 1px 0; }
    .order-statement-page .stm-sum-note { padding-left: 70px; }
    .order-statement-page .stm-notice-body { font-size: 11.5px; line-height: 1.45; }
    .order-statement-page .stm-sec-title,
    .order-statement-page .stm-doc-title { page-break-after: avoid; }
    .order-statement-page .stm-pay,
    .order-statement-page .stm-notice,
    .order-statement-page .stm-summary,
    .order-statement-page .stm-sign { page-break-inside: avoid; }

    /* 表格滚动容器(.data-table-scroll / .dynamic-table-wrap 及其内层 .data-table-wrapper)带边框 + overflow:hidden,
       而滚动容器在分页时无法被正确拆分: Chrome 会把它的边框一路画到页面底部,
       并让表格在错误的位置断开、下半页整片留空(对账单"空白换页"的根因)。
       打印时还原成普通块 —— 不裁剪、去边框、去圆角, 表格才能正常跨页。 */
    .data-table-scroll,
    .data-table-scroll .data-table-wrapper,
    .form-page .dynamic-table-wrap,
    .form-page .dynamic-table-wrap .data-table-wrapper { overflow: visible !important; border: none !important; border-radius: 0 !important; }
    /* 表单页动态表格打印: 取消固定列宽/吸顶列, 按纸张宽度自适应, 操作列不打印 */
    .form-page .dynamic-table-wrap .data-table { table-layout: auto !important; min-width: 0 !important; width: 100% !important; font-size: 11px; }
    .form-page .dynamic-table-wrap .data-table th,
    .form-page .dynamic-table-wrap .data-table td { white-space: normal !important; }
    .form-page .dynamic-table-wrap .data-table .col-no,
    .form-page .dynamic-table-wrap .data-table .col-actions { position: static !important; }
    .form-page .dynamic-table-wrap .data-table .col-actions { display: none !important; }
}
.card-header-meta {
    display: flex; align-items: center; gap: 16px; row-gap: 4px;
    font-size: 12px; color: var(--text-3); min-width: 0; flex-wrap: wrap;
}
/* 单个元信息项内部不折行(标签与单号保持同行); 空间不够时由外层 flex-wrap 整块换行 */
.card-header-meta .meta-item { display: inline-flex; align-items: center; gap: 5px; min-width: 0; white-space: nowrap; }
.card-header-meta .meta-value {
    font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--text-1);
    overflow-wrap: anywhere;
}
.copy-icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 20px; height: 20px; padding: 0; flex: none;
    border: none; background: transparent; border-radius: 4px;
    color: var(--text-3); cursor: pointer; transition: var(--transition);
}
.copy-icon-btn svg { width: 13px; height: 13px; }
.copy-icon-btn:hover:not([disabled]) { color: var(--primary); background: var(--bg-3); }
.copy-icon-btn[disabled] { opacity: .35; cursor: not-allowed; }

/* ===== 吸顶/吸底统一组件(所有页面直接沿用) =====
   页面主卡片加 .sticky-card: 标题自动吸顶;表单操作栏加 .save-bar 自动吸底;列表页分页自动吸底
   标题栏与操作栏高度统一 40px */
.sticky-card { overflow: visible; }
.sticky-card > .card-header {
    position: sticky; top: 0;
    z-index: 30;
    background: var(--bg-1);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
/* 填充吸顶时圆角缺口,阻止滚动内容从圆角处露出 */
.sticky-card > .card-header::before {
    content: '';
    position: absolute;
    top: calc(-1 * var(--radius-lg));
    left: 0; right: 0; bottom: 0;
    background: var(--bg-1);
    z-index: -1;
    pointer-events: none;
}
.save-bar {
    position: sticky; bottom: 0;
    z-index: 30;
    display: flex; gap: 8px; justify-content: flex-end; align-items: center;
    height: 40px; padding: 0; margin-top: 12px;
    border-top: 1px solid var(--border-1);
    background: var(--bg-1);
}
/* 吸底操作栏 - 左右分组(查看页等) */
.save-bar--split { justify-content: space-between; height: auto; min-height: 40px; padding: 4px 0; }
.save-bar-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* 右侧按钮组（保存栏内的主/次操作；全系统沿用此命名） */
.save-bar__right { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-wrap: wrap; }
/* 非吸底操作栏(编辑页与「保存」栏同页时使用) */
.save-bar--static { position: static; }
/* 相关单据快捷入口 */
.doc-links { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.doc-links .btn { font-size: 12px; }

/* 订单操作栏弹窗: 订舱申请方式选择 / 制作提单单据选择 */
.oab-choice { display: flex; flex-direction: column; gap: 10px; }
.oab-choice-btn {
    display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
    width: 100%; padding: 14px 16px; text-align: left; cursor: pointer;
    border: 1px solid var(--border-1); border-radius: var(--radius-md);
    background: var(--bg-1); transition: all .15s;
}
.oab-choice-btn:hover { border-color: var(--primary); background: var(--primary-1); }
.oab-choice-btn svg { width: 18px; height: 18px; color: var(--primary); }
.oab-choice-title { font-size: 14px; font-weight: 600; color: var(--text-1); }
.oab-choice-desc { font-size: 12px; color: var(--text-3); line-height: 1.5; }
.oab-bills { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.oab-bill-btn {
    display: flex; align-items: center; gap: 8px;
    padding: 12px 14px; font-size: 13px; text-decoration: none;
    border: 1px solid var(--border-1); border-radius: var(--radius-md);
    background: var(--bg-1); color: var(--text-1); transition: all .15s;
}
.oab-bill-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-1); }
.oab-bill-btn svg { width: 16px; height: 16px; }

/* 资料操作面板（订单操作页「资料操作」弹窗）——系统统一的分区入口 */
.oo-dg-hint { font-size: 12px; color: var(--text-3); margin-bottom: 12px; line-height: 1.5; }
.oo-dg { margin-bottom: 16px; }
.oo-dg-title {
    font-size: 13px; font-weight: 600; color: var(--text-1);
    margin-bottom: 8px; padding-left: 8px; border-left: 3px solid var(--primary); line-height: 1.1;
}
.oo-dg-items { display: flex; flex-wrap: wrap; gap: 8px; }
.oo-dg-item {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 12px; font-size: 13px; cursor: pointer;
    border: 1px solid var(--border-1); border-radius: var(--radius-md);
    background: var(--bg-1); color: var(--text-1); transition: all .15s;
}
.oo-dg-item:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-1); }
.oo-dg-ic { display: inline-flex; width: 16px; height: 16px; }
.oo-dg-ic svg { width: 16px; height: 16px; }

/* 表单内文件上传(文件名提示) */
.upload-inline { display: flex; align-items: center; gap: 8px; }
.upload-inline .form-input { flex: 1; padding: 4px 8px; height: auto; line-height: 22px; }
.upload-inline .upload-file-name { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
.pagination-wrapper {
    position: sticky; bottom: 0;
    z-index: 20;
    background: var(--bg-2);
    border-top: 1px solid var(--border-1);
    padding: 8px 0;
}

/* ===== 表格 ===== */
.table-wrapper { background: var(--bg-1); border: 1px solid var(--border-1); border-radius: var(--radius-lg); overflow: hidden; }
.table-toolbar {
    padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    border-bottom: 1px solid var(--border-1);
}
.table-search { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.table-actions { display: flex; align-items: center; gap: 8px; }

.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th {
    background: var(--bg-3); color: var(--text-2); font-weight: 500;
    padding: 10px 12px; text-align: left; white-space: nowrap;
    border-bottom: 1px solid var(--border-1); position: sticky; top: 0; z-index: 1;
}
.data-table td { padding: 10px 12px; border-bottom: 1px solid var(--border-1); color: var(--text-1); }
/* ===== 系统级表头排序（th[data-sort] 后追加的上/下三角按钮，core.js FQA.initTableSort）=====
 * 服务端按 GET sort/dir 白名单排序；默认灰三角、悬停/激活主色。 */
.th-sort { display: inline-flex; flex-direction: column; justify-content: center; gap: 1px; margin-left: 5px; vertical-align: middle; }
.th-sort__btn { display: flex; align-items: center; justify-content: center; width: 14px; height: 9px; padding: 0; border: 0; background: none; cursor: pointer; }
.th-sort__btn::before { content: ''; display: block; border-left: 4px solid transparent; border-right: 4px solid transparent; }
.th-sort__btn.th-sort__asc::before { border-bottom: 5px solid var(--text-3); }
.th-sort__btn.th-sort__desc::before { border-top: 5px solid var(--text-3); }
.th-sort__btn:hover.th-sort__asc::before { border-bottom-color: var(--primary); }
.th-sort__btn:hover.th-sort__desc::before { border-top-color: var(--primary); }
.th-sort--active.th-sort--asc .th-sort__asc::before { border-bottom-color: var(--primary); }
.th-sort--active.th-sort--desc .th-sort__desc::before { border-top-color: var(--primary); }
/* ===== 表格整行底色体系：斑马纹 + 悬停（吸附列与整行必须同色）=====
 * 背景：吸附列(col-sticky-left/right)必须有**实心**底色才能盖住横向滚动的内容，
 *       但它必须与同一行普通单元格**完全同色**；历史 bug 就是只在吸附列上写了
 *       斑马纹/悬停色，普通单元格没有，于是同一行左右出现两种底色。
 * 做法：底色统一定义在「行」上（--row-bg），普通单元格与吸附列都读同一个变量，
 *       以后只改这一处，不会再漂移。
 * 规则：奇数行 白(--bg-1) / 偶数行 浅灰(--bg-2) / 悬停 浅蓝(--primary-1)。 */
.data-table tbody tr { --row-bg: var(--bg-1); background: var(--row-bg); transition: background 120ms ease; }
.data-table tbody tr:nth-child(even) { --row-bg: var(--bg-2); }
.data-table tbody tr:hover { --row-bg: var(--primary-1); }
/* 行内「固定/吸附」单元格跟随整行底色（斑马纹与悬停一起跟随）。
 * transition 必须和行保持同一时长：否则行在 120ms 渐变、吸附列却瞬间变色，
 * 悬停瞬间会出现左右短暂"两种底色"的闪烁。 */
.data-table tbody .col-sticky-left,
.data-table tbody .col-sticky-right,
.data-table tbody .col-no,
.data-table tbody .col-actions { background: var(--row-bg, var(--bg-1)); transition: background 120ms ease; }
.data-table tbody tr:last-child td { border-bottom: none; }
/* ===== 表格行内操作按钮(系统统一) =====
 * 用法:
 *   <td class="col-actions">
 *       <a class="action-view" title="查看"><?= icon_svg('eye') ?></a>
 *       <a class="action-edit" title="编辑"><?= icon_svg('pencil') ?></a>
 *       <button type="button" class="action-delete" title="删除"><?= icon_svg('trash-2') ?></button>
 *   </td>
 * 语义类(悬停统一为「实心填充 + 白色图标 + 投影」, 各语义色见下):
 *   action-view 查看 | action-edit 编辑 | action-copy 复制 | action-print 打印
 *   action-export 导出 | action-download 下载 | action-more 更多   → 主色
 *   action-approve 通过/成功                                        → 成功色
 *   action-warn 警告操作                                            → 警告色
 *   action-delete / action-danger 删除等危险操作                     → 危险色
 */
.data-table .col-num { text-align: right; white-space: nowrap; }
.data-table .col-actions { white-space: nowrap; text-align: right; }
.data-table .col-actions a,
.data-table .col-actions button {
    --action-color: var(--primary);
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; border-radius: var(--radius-sm);
    border: none; background: transparent; cursor: pointer;
    color: var(--text-3); vertical-align: middle;
    transition: background var(--transition), color var(--transition), box-shadow var(--transition);
}
.data-table .col-actions a:hover,
.data-table .col-actions button:hover {
    background: var(--action-color); color: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}
.data-table .col-actions a svg,
.data-table .col-actions button svg { width: 15px; height: 15px; }
/* 语义色 */
.data-table .col-actions .action-view,
.data-table .col-actions .action-edit,
.data-table .col-actions .action-copy,
.data-table .col-actions .action-print,
.data-table .col-actions .action-export,
.data-table .col-actions .action-download,
.data-table .col-actions .action-more { --action-color: var(--primary); }
.data-table .col-actions .action-approve { --action-color: var(--success); }
.data-table .col-actions .action-warn { --action-color: var(--warning); }
.data-table .col-actions .action-delete,
.data-table .col-actions .action-danger { --action-color: var(--danger); }
/* 锁定态操作(如：订单费用未审核不可编辑) —— 置灰不可点 */
.data-table .col-actions .action-locked { --action-color: var(--text-4); color: var(--text-4); cursor: not-allowed; }
.data-table .col-actions .action-locked:hover { background: var(--bg-3); color: var(--text-3); box-shadow: none; }
/* 相邻按钮间距 */
.data-table .col-actions > * + * { margin-left: 2px; }

/* 分页 (系统统一)
 * 布局: 左侧 "共X条/当前页汇总"  |  右侧 [页码导航] [每页条数] [跳转页码] */
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; flex-wrap: wrap; }
.pagination-info { font-size: 13px; color: var(--text-3); }
.pagination-controls { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.pagination button {
    min-width: 32px; height: 32px; padding: 0 6px; border: 1px solid var(--border-1);
    background: var(--bg-1); border-radius: var(--radius-sm);
    cursor: pointer; color: var(--text-1); font-size: 13px;
    display: inline-flex; align-items: center; justify-content: center;
    transition: all var(--transition);
}
.pagination button:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.pagination button.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination button:disabled { color: var(--text-4); cursor: not-allowed; background: var(--bg-2); }
.pagination button svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }
.pagination .per-page-select { width: auto; min-width: 104px; height: 32px; font-size: 13px; margin-left: 8px; }
/* 跳转页码输入框(无"跳至"文字) */
.pagination-jump { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; font-size: 13px; color: var(--text-3); white-space: nowrap; }
.page-jump-input {
    width: 56px; height: 32px; padding: 0 6px; text-align: center;
    border: 1px solid var(--border-2); border-radius: var(--radius-sm);
    background: var(--bg-1); color: var(--text-1); font-size: 13px;
    transition: all var(--transition);
}
.page-jump-input:hover { border-color: var(--primary-5); }
.page-jump-input:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 2px rgba(22,119,255,0.2); }
.page-jump-input::-webkit-inner-spin-button,
.page-jump-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.page-jump-input { -moz-appearance: textfield; }

/* ===== 表单 ===== */
.form-group { margin-bottom: 12px; }
.form-label { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 4px; font-weight: 500; }
.form-label .required { color: var(--danger); margin-left: 4px; }
/* 只读字段值(查看/详情页统一使用, 与 .form-label 配套: 标签在上, 值在下) */
.form-static {
    min-height: 20px; padding: 6px 0;
    font-size: 13px; color: var(--text-1); line-height: 1.6;
    word-break: break-word; white-space: pre-wrap;
}
.form-static--mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-feature-settings: 'tnum' 1; }
.form-static--empty { color: var(--text-3); }
.form-static--strong { font-weight: 600; }
/* 订单查看/订单追踪/订舱托书: 表单区只读值按「输入框」观感呈现(与新建/编辑页表单一致, 避免整页纯文字显得单调)
   仅作用于 .form-group 内的字段值, 不影响表格单元格里复用 .form-static 的说明文字 */
.order-detail-page .form-group > .form-static,
.order-tracking-page .form-group > .form-static,
.booking-letter-page .form-group > .form-static,
.detail-page .form-group > .form-static {
    min-height: 32px; padding: 5px 10px;
    border: 1px solid var(--border-1); border-radius: var(--radius-md);
    background: var(--bg-3); line-height: 20px;
}
.form-input, .form-select, .form-textarea {
    width: 100%; height: 32px; padding: 0 8px;
    border: 1px solid var(--border-2); border-radius: var(--radius-md);
    background: var(--bg-1); color: var(--text-1); font-size: 13px;
    transition: all var(--transition);
}
.form-input:hover, .form-select:hover { border-color: var(--primary-5); }
.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: var(--primary); outline: none;
    box-shadow: 0 0 0 2px rgba(22,119,255,0.2);
}
.form-input:disabled { background: var(--bg-4); color: var(--text-4); cursor: not-allowed; }
.form-textarea { height: auto; min-height: 80px; padding: 8px 12px; resize: vertical; }
.form-error { font-size: 12px; color: var(--danger); margin-top: 4px; }

/* ===== 输入框+下拉框组件 ===== */
.input-with-dropdown {
    position: relative;
    width: 100%;
}
.input-with-dropdown input[type="text"] {
    width: 100%;
    height: 32px;
    padding: 0 28px 0 8px;
    border: 1px solid var(--border-2);
    border-radius: var(--radius-md);
    background: var(--bg-1);
    color: var(--text-1);
    font-size: 13px;
    box-sizing: border-box;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.input-with-dropdown input[type="text"]:hover {
    border-color: var(--primary-5);
}
.input-with-dropdown input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(22,119,255,0.15);
}
.input-with-dropdown input[type="text"]:disabled {
    background: var(--bg-4);
    color: var(--text-4);
    cursor: not-allowed;
}
.input-with-dropdown .dropdown-list {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    background: var(--bg-1);
    border: 1px solid var(--border-2);
    border-top: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    box-shadow: 0 4px 8px rgba(0,0,0,0.08);
    z-index: 1000;
    display: none;
    list-style: none;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}
.input-with-dropdown .dropdown-list.show {
    display: block !important;
}
.input-with-dropdown .dropdown-list li {
    padding: 6px 8px;
    cursor: pointer;
    white-space: nowrap;
    font-size: 13px;
    color: var(--text-2);
    list-style: none;
    transition: background 80ms;
}
.input-with-dropdown .dropdown-list li:hover {
    background: var(--primary-1);
    color: var(--primary);
}
.input-with-dropdown .dropdown-list li.active-item {
    background: var(--primary-1);
    color: var(--primary);
    font-weight: 500;
}
.input-with-dropdown .dropdown-list li.no-match {
    color: var(--text-4);
    cursor: default;
    text-align: center;
    padding: 8px;
}
/* 选项颜色圆点：option 带 data-color 时由 core.js 渲染（颜色选择等场景） */
.input-with-dropdown .dropdown-list li .iwd-color-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: -2px;
    border: 1px solid var(--border-2);
}
.input-with-dropdown .dropdown-list::-webkit-scrollbar { width: 6px; }
.input-with-dropdown .dropdown-list::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 9999px; }
/* 滚动容器内的iwd: dropdown使用fixed定位避免被overflow裁剪(position由JS动态计算) */
.input-with-dropdown.iwd-in-scroll .dropdown-list { z-index: 9999; }
/* 向上展开时(窗口下方放不下): 边框/圆角翻到上边，视觉上仍与输入框相连 */
.input-with-dropdown .dropdown-list.drop-up {
    border-top: 1px solid var(--border-2);
    border-bottom: none;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    box-shadow: 0 -4px 8px rgba(0,0,0,0.08);
}

/* 清空按钮 */
.input-clear-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: transparent;
    border: none;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    line-height: 1;
    color: var(--text-3);
    transition: all 0.15s ease;
    z-index: 5;
    padding: 0;
    margin: 0;
    flex-shrink: 0;
}
.input-clear-btn:hover {
    background: var(--danger);
    color: #fff;
}
.input-clear-btn.show {
    display: flex !important;
}
/* 只读(disabled)的 input-with-dropdown：不提供清除入口，与只读输入框规则一致 */
.input-clear-btn[data-iwd-readonly] {
    display: none !important;
}
/* 通用输入框清除按钮包裹器(非input-with-dropdown的文本/数字输入框) */
.input-clear-wrap {
    position: relative;
    width: 100%;
}
.input-clear-wrap .form-input {
    padding-right: 28px;
}
/* 数字输入框去除上下箭头 */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type="number"] {
    -moz-appearance: textfield;
}
/* 隐藏被转换的原始select */
select.form-select-iwd-hidden {
    display: none !important;
}
/* 表单行: 同一行的 N 列【等分且不折行】。
   注意: 不要给 .form-group 写 flex-basis 定值(如 1 1 220px) —— 列数多时(如货物参数 6 列)
   会因 6×220+间隙 超过容器宽度而把最后一列挤到独立一行。防止内容溢出靠 min-width:0。 */
.form-row { display: flex; gap: 16px; }
.form-row .form-group { flex: 1; min-width: 0; }

/* ===== 按钮 ===== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    height: 32px; padding: 0 16px; border: 1px solid var(--border-2);
    border-radius: var(--radius-md); background: var(--bg-1); color: var(--text-1);
    font-size: 14px; cursor: pointer; transition: all var(--transition); white-space: nowrap;
}
.btn:hover { border-color: var(--primary-5); color: var(--primary); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-7); border-color: var(--primary-7); color: #fff; }
.btn-danger { color: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-success { color: var(--success); border-color: var(--success); }
.btn-success:hover { background: var(--success); color: #fff; }
.btn-sm { height: 24px; padding: 0 8px; font-size: 13px; }
.btn-lg { height: 40px; padding: 0 20px; font-size: 16px; }
/* 审批通过 / 驳回: 弹窗底部等文字按钮场景(与 .btn-success/.btn-danger 同色系, 语义更明确)
   注意: 列表操作列(.col-actions)统一用图标按钮, 见上方 .data-table .col-actions 规范 */
.btn-approve { color: var(--success); border-color: var(--success); }
.btn-approve:hover { background: var(--success); border-color: var(--success); color: #fff; }
.btn-reject { color: var(--danger); border-color: var(--danger); }
.btn-reject:hover { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-link { border: none; background: transparent; color: var(--primary); padding: 0 4px; }
.btn-link:hover { color: var(--primary-7); }

/* ===== 状态标签 ===== */
.tag {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 0 8px; height: 22px; border-radius: var(--radius-sm);
    font-size: 12px; line-height: 1;
}
/* 标签行(查看页状态标签等) */
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tag-success { background: rgba(82,196,26,0.1); color: var(--success); }
.tag-warning { background: rgba(250,173,20,0.1); color: var(--warning); }
.tag-danger { background: rgba(255,77,79,0.1); color: var(--danger); }
.tag-info { background: rgba(22,119,255,0.1); color: var(--primary); }
.tag-default { background: var(--bg-4); color: var(--text-2); }

/* ===== 消息提示 ===== */
.message-container { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.message {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 16px; border-radius: var(--radius-md);
    background: var(--bg-1); border: 1px solid var(--border-1);
    box-shadow: var(--shadow-2); font-size: 14px; color: var(--text-1);
    animation: msgIn 200ms ease-out;
}
@keyframes msgIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.message-success { border-color: var(--success); }
.message-success .message-icon { color: var(--success); }
.message-warning { border-color: var(--warning); }
.message-warning .message-icon { color: var(--warning); }
.message-error { border-color: var(--danger); }
.message-error .message-icon { color: var(--danger); }
.message-info { border-color: var(--primary); }
.message-info .message-icon { color: var(--primary); }

/* ===== 弹窗 ===== */
.modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 1000; display: flex; align-items: center; justify-content: center; animation: maskIn 200ms; }
/* 二级弹窗: 需要在已打开的弹窗之上时使用(如「详情弹窗 → 审批弹窗」) */
.modal-mask--top { z-index: 1100; }
@keyframes maskIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
    background: var(--bg-1); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-3); min-width: 400px; max-width: 90vw; max-height: 90vh;
    display: flex; flex-direction: column; animation: modalIn 200ms ease-out;
}
@keyframes modalIn { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }
.modal-header { padding: 16px 20px; border-bottom: 1px solid var(--border-1); display: flex; align-items: center; justify-content: space-between; }
.modal-title { font-size: 16px; font-weight: 600; }
.modal-close { cursor: pointer; color: var(--text-3); }
.modal-close:hover { color: var(--text-1); }
.modal-body { padding: 20px; overflow-y: auto; flex: 1; }
.modal-footer { padding: 12px 20px; border-top: 1px solid var(--border-1); display: flex; align-items: center; justify-content: flex-end; gap: 8px; }

/* ===== 空状态 ===== */
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 20px; color: var(--text-3); }
.empty-state .empty-icon { width: 48px; height: 48px; margin-bottom: 12px; opacity: 0.4; }
.empty-state .empty-text { font-size: 14px; }

/* ===== 统计卡片 ===== */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat-card { background: var(--bg-1); border: 1px solid var(--border-1); border-radius: var(--radius-lg); padding: 20px; }
/* 统计卡片栅格(查看页/看板通用) */
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media screen and (max-width: 900px) { .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* 6 卡一行修饰符(客户贡献值等 6 卡列表页)：固定 6 列保证不换行；
   内边距收窄到 14px，给「币种 + 金额」留横向空间；
   窄屏回退 3 列(≤1400px) / 2 列(≤900px)。 */
.stat-grid--6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.stat-grid--6 .stat-card { padding: 14px 16px; }
/* 6 卡一行时数值行：统一 24px + 固定高度底对齐 —— 普通值/金额值字号不一、行高不同，
   会让每张卡底部「说明小字」上下错位（用户 2026-10-17 报过），固定数值行高度后
   .stat-trend 严格落在同一水平线上（同首页 .dash-page 的做法）。 */
.stat-grid--6 .stat-card .stat-value { font-size: 24px; height: 38px; display: flex; align-items: flex-end; line-height: 1.2; }
.stat-grid--6 .stat-card .stat-value--money { font-size: 24px; align-items: baseline; line-height: 1.25; }
@media screen and (max-width: 1400px) { .stat-grid--6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media screen and (max-width: 900px) { .stat-grid--6 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* 5 卡一行(发票中心 本月/本年 各 5 张)：窄屏回退 3/2 列 */
.stat-grid--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.stat-grid--5 .stat-card { padding: 14px 16px; }
.stat-grid--5 .stat-card .stat-value { font-size: 22px; height: 36px; display: flex; align-items: flex-end; line-height: 1.2; }
.stat-grid--5 .stat-card__value { font-size: 22px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-grid--5 .stat-card .stat-value--money { font-size: 22px; align-items: baseline; line-height: 1.25; }
@media screen and (max-width: 1200px) { .stat-grid--5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media screen and (max-width: 900px) { .stat-grid--5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* 多币种金额明细(卡片内一行一币种) */
.cur-lines { display: flex; flex-direction: column; gap: 6px; }
.cur-line { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.cur-line .cur { font-size: 12px; color: var(--text-3); font-family: var(--font-mono); }
.cur-line .amt { font-family: var(--font-mono); font-size: 15px; font-weight: 600; color: var(--text-1); }
.cur-line.is-neg .amt { color: var(--danger); }
.cur-line.is-total { border-top: 1px dashed var(--border-1); padding-top: 6px; margin-top: 2px; }
.stat-card .stat-label { font-size: 13px; color: var(--text-3); margin-bottom: 8px; }
.stat-card .stat-card__label { font-size: 13px; color: var(--text-3); }
.stat-card .stat-value { font-size: 24px; font-weight: 600; color: var(--text-1); font-family: var(--font-mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 「币种 + 金额」型指标值：币种做小号前缀，整行**不换行**（换行视觉很差），
 * 金额过长时省略号兜底而不是折行。 */
.stat-card .stat-value--money {
    display: flex; align-items: baseline; gap: 4px; flex-wrap: nowrap;
    font-size: 20px; white-space: nowrap; line-height: 1.25;
}
.stat-card .stat-value--money .stat-cur {
    flex: none; font-size: 10px; font-weight: 500; color: var(--text-3);
    font-family: var(--font-mono); letter-spacing: .3px;
}
.stat-card .stat-value--money .stat-num {
    flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.stat-card .stat-trend { font-size: 12px; margin-top: 8px; }
.stat-trend.up { color: var(--success); }
.stat-trend.down { color: var(--danger); }

/* ===== 客户等级徽标（排名 + 等级；客户贡献值列表 / 客户详情通用） =====
 * 等级由系统自动计算，徽标颜色固定：钻石 蓝 / VVIP 紫 / 铂金 青 / 黄金 橙 / 白银 灰 / 青铜 棕 */
.lv-badge {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 600;
    line-height: 18px; white-space: nowrap; vertical-align: middle;
}
/* 排名徽标：小圆片纯数字（1 / 2 / 13），不再用「#1」井号表达（用户 2026-10-17：# 太难看）；
   悬浮 title 由输出方带「排名第N」。列表/客户详情页通用。 */
.lv-rank {
    flex: none; display: inline-flex; align-items: center; justify-content: center;
    min-width: 20px; height: 17px; padding: 0 6px; margin-right: 4px;
    border-radius: 999px; background: var(--bg-3); color: var(--text-2);
    font-size: 11px; font-weight: 600; font-family: var(--font-mono); vertical-align: middle;
}
.lv-diamond  { background: #e0edff; color: #2563eb; }
.lv-vvip     { background: #f3e8ff; color: #7c3aed; }
.lv-platinum { background: #ccfbf1; color: #0f766e; }
.lv-gold     { background: #fef3c7; color: #b45309; }
.lv-silver   { background: #e2e8f0; color: #475569; }
.lv-bronze   { background: #ffedd5; color: #9a3412; }
/* 排名/等级紧凑条（客户详情「客户贡献值与客户等级」区，2026-10-17 用户：原 4 列大盒子太空太难看）：
   一行药丸 = 指标名 + 排名圆片(.lv-rank) + 等级徽标(.lv-badge)，自动换行、高度随内容 */
.cv-rank-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 2px 0 12px; }
.cv-rank-strip__item { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border: 1px solid var(--border-1); border-radius: 10px; background: var(--bg-2); }
.cv-rank-strip__label { font-size: 12px; color: var(--text-2); }
.cv-rank-strip__item--overall { background: var(--primary-1); border-color: var(--primary-2); }
.cv-rank-strip__item--overall .cv-rank-strip__label { color: var(--primary-7); font-weight: 600; }

/* 可点选标签组（单选/多选 chips，表单页编辑用；客户公开反馈页有同款 .fb-chip 独立样式）
   2026-10-17 满意度/投诉字段丰富化：服务项逐项评分、做得好/需改进/涉及环节多选 */
.cc-chip-row { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.cc-chip-name { font-size: 13px; color: var(--text-2); min-width: 84px; }
.cc-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.cc-chip { font-size: 13px; padding: 4px 14px; border-radius: 999px; border: 1px solid var(--border-2); background: var(--bg-1); color: var(--text-2); cursor: pointer; user-select: none; transition: color .13s, border-color .13s, background .13s; }
.cc-chip:hover { border-color: var(--primary-5); color: var(--primary-5); }
.cc-chip.on { background: var(--primary-1); border-color: var(--primary-5); color: var(--primary-5); font-weight: 600; }

/* ===== 响应式 ===== */
@media screen and (max-width: 1200px) {
    :root { --content-padding: 12px; }
}
@media screen and (max-width: 992px) {
    .sidebar { position: fixed; left: 0; top: 0; bottom: 0; z-index: 100; transform: translateX(-100%); width: var(--sidebar-width); }
    .sidebar.show { transform: translateX(0); }
}
@media screen and (max-width: 768px) {
    :root { --content-padding: 10px; }
    .header-datetime { display: none; }
    .data-table { font-size: 13px; }
    .modal { min-width: auto; width: 95vw; }
    .form-row { flex-direction: column; gap: 0; }
}

/* 滚动条全局 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 9999px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-3); }

/* SVG图标默认 */
svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm svg { width: 14px; height: 14px; }
.icon-lg svg { width: 24px; height: 24px; }

/* ===== P1 组件补全：2026设计规范 ===== */

/* 搜索栏 */

/* 数据表格 */
.data-table-wrapper { background: var(--bg-1); border: 1px solid var(--border-1); border-radius: var(--radius-lg); overflow: hidden; }
.data-table--compact td, .data-table--compact th { padding: 6px 12px; }
.data-table--comfortable td, .data-table--comfortable th { padding: 14px 12px; }
/* 分组表头(thead 两行, 如「预计/实际」分组):
   表头第二行若也吸顶会与第一行重叠, 故整块表头改为随内容滚动; 序号列/操作列仍左右固定 */
.data-table--grouped-head thead th { position: static; }
.data-table--grouped-head thead th.col-no { position: sticky; top: auto; left: 0; z-index: 3; }
.data-table--grouped-head thead th.col-actions { position: sticky; top: auto; right: 0; z-index: 3; }
.col-checkbox { text-align: center; width: 40px; }
.col-checkbox input { cursor: pointer; }
.table-sort-icon { display: inline-flex; margin-left: 4px; opacity: 0.4; cursor: pointer; vertical-align: middle; }
.table-sort-icon svg { width: 12px; height: 12px; }
th[data-sortable]:hover .table-sort-icon { opacity: 1; }
.table-loading, .table-empty { text-align: center; padding: 32px 12px; color: var(--text-3); font-size: 14px; }
.table-spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--border-2); border-top-color: var(--primary); border-radius: 50%; animation: cbSpin 600ms linear infinite; vertical-align: middle; margin-right: 8px; }
@keyframes cbSpin { to { transform: rotate(360deg); } }
.pagination-ellipsis { color: var(--text-3); padding: 0 4px; }
.pagination-jumper { display: flex; align-items: center; gap: 4px; margin-left: 12px; }
.pagination-jump-input { width: 56px; height: 32px; border: 1px solid var(--border-1); border-radius: var(--radius-sm); text-align: center; background: var(--bg-1); color: var(--text-1); font-size: 13px; }
.pagination-jump-label { font-size: 13px; color: var(--text-3); white-space: nowrap; }

/* 表单构建器 */
.form-builder { display: flex; flex-direction: column; gap: 16px; }
.form-group-section { border: 1px solid var(--border-1); border-radius: var(--radius-lg); padding: 20px; background: var(--bg-1); }
.form-group-title { font-size: 15px; font-weight: 600; color: var(--text-1); margin-bottom: 16px; padding-bottom: 8px; border-bottom: 1px solid var(--border-1); }
.form-row-wrap { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.form-builder__actions { display: flex; align-items: center; gap: 8px; padding-top: 8px; }
.form-help { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.form-radio, .form-checkbox { display: inline-flex; align-items: center; gap: 6px; margin-right: 16px; font-size: 14px; cursor: pointer; }
.form-radio input, .form-checkbox input { cursor: pointer; }
.form-switch { position: relative; display: inline-block; width: 40px; height: 22px; cursor: pointer; }
.form-switch input { opacity: 0; width: 0; height: 0; }
.form-switch-slider { position: absolute; inset: 0; background: var(--border-2); border-radius: 9999px; transition: var(--transition); }
.form-switch-slider::before { content: ''; position: absolute; width: 18px; height: 18px; left: 2px; top: 2px; background: #fff; border-radius: 50%; transition: var(--transition); }
.form-switch input:checked + .form-switch-slider { background: var(--primary); }
.form-switch input:checked + .form-switch-slider::before { transform: translateX(18px); }
.date-range-input { display: flex; align-items: center; gap: 6px; }
.date-range-sep { color: var(--text-3); font-size: 13px; }

/* 标签页 */
.tabs { display: flex; flex-direction: column; }
.tabs__nav { display: flex; align-items: center; gap: 4px; border-bottom: 1px solid var(--border-1); padding: 0 4px; }
.tabs--card .tabs__nav { background: var(--bg-3); padding: 8px 8px 0; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.tabs--border .tabs__nav { border: 1px solid var(--border-1); border-bottom: none; border-radius: var(--radius-lg) var(--radius-lg) 0 0; padding: 0 8px; }
.tabs__tab { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; font-size: 14px; color: var(--text-2); cursor: pointer; border-radius: var(--radius-sm) var(--radius-sm) 0 0; transition: all 150ms ease; white-space: nowrap; position: relative; }
.tabs__tab:hover { color: var(--text-1); }
.tabs__tab--active { color: var(--primary); font-weight: 500; }
.tabs--line .tabs__tab--active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--primary); }
.tabs--card .tabs__tab { border: 1px solid transparent; }
.tabs--card .tabs__tab--active { background: var(--bg-1); border-color: var(--border-1); border-bottom-color: var(--bg-1); }
.tabs--border .tabs__tab { border: 1px solid transparent; border-bottom: none; margin-bottom: -1px; }
.tabs--border .tabs__tab--active { background: var(--bg-1); border-color: var(--border-1); }
.tabs__tab-icon svg { width: 14px; height: 14px; }
.tabs__tab-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 9999px; background: var(--danger); color: #fff; font-size: 11px; }
.tabs__tab-close { display: flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; }
.tabs__tab-close svg { width: 12px; height: 12px; }
.tabs__tab-close:hover { background: var(--border-2); }
.tabs__content { padding: 16px 0; }
.tabs__pane { animation: tabFade 200ms ease-out; }

/* 字段权限：不可写字段的只读外观（设计文档 §11.5 read/masked） */
.form-input.fp-readonly,
.form-select.fp-readonly,
.fp-readonly input,
.fp-readonly .form-input {
    background: var(--bg-3);
    color: var(--text-2);
    cursor: not-allowed;
}
.fp-readonly-group .form-label { color: var(--text-2); }
.fp-readonly-tag { margin-left: 6px; font-size: 11px; padding: 0 4px; }

/* 链接式页签（服务端 ?tab= 切换）：与客户端页签共用 .tabs 视觉，避免出现第二套页签样式 */
.tabs--nav {
    flex: none;
    position: sticky;
    top: 0;
    z-index: 40;
    background: var(--bg-1);
    box-shadow: 0 1px 0 var(--border-1);
}
.tabs--nav .tabs__nav { padding: 0 4px; background: var(--bg-1); }
a.tabs__tab { text-decoration: none; color: var(--text-2); }
a.tabs__tab:hover { color: var(--text-1); }
a.tabs__tab.tabs__tab--active { color: var(--primary); font-weight: 500; }
.tabs--nav + .list-page, .tabs--nav + .table-wrapper { margin-top: 0; }
@keyframes tabFade { from { opacity: 0; } to { opacity: 1; } }

/* ===== 状态步骤条(系统统一组件) =====
 * 线性流程可视化：订单22态流转 / 审批流 / 任意多阶段状态机。
 * 结构：.status-steps > .status-steps__group(阶段) > .status-steps__group-label + .status-steps__list > .status-step
 * 步骤态：.status-step--done(已过) / .status-step--current(当前) / .status-step--future(未到) / .status-step--danger(终止态)
 * 连接线：.status-step__conn(+ .status-step__conn--done)
 * 用法：<div class="status-steps"><div class="status-steps__group">…</div>…</div>
 */
.status-steps { display: flex; align-items: flex-start; gap: 0; overflow-x: auto; padding: 2px 0 4px; }
.status-steps__group { display: flex; flex-direction: column; gap: 8px; flex: none; padding: 0 8px; }
.status-steps__group:first-child { padding-left: 0; }
.status-steps__group + .status-steps__group { border-left: 1px dashed var(--border-1); }
.status-steps__group-label { font-size: 11px; font-weight: 600; color: var(--text-3); text-align: center; letter-spacing: .5px; }
.status-steps__group--active .status-steps__group-label { color: var(--primary); }
.status-steps__list { display: flex; align-items: flex-start; }
.status-step { display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 46px; flex: none; }
.status-step__dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--border-2); background: var(--bg-1); color: var(--text-3); display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 600; transition: all .2s; }
.status-step__dot svg { width: 11px; height: 11px; }
.status-step__label { font-size: 11px; color: var(--text-3); text-align: center; line-height: 1.25; max-width: 56px; word-break: break-all; }
.status-step--done .status-step__dot { background: var(--success); border-color: var(--success); color: #fff; }
.status-step--done .status-step__label { color: var(--text-2); }
.status-step--current .status-step__dot { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 0 0 4px var(--primary-1); }
.status-step--current .status-step__label { color: var(--primary); font-weight: 600; }
.status-step--danger .status-step__dot { background: var(--danger); border-color: var(--danger); color: #fff; }
.status-step--danger .status-step__label { color: var(--danger); }
.status-step__conn { flex: none; width: 12px; height: 2px; background: var(--border-1); margin-top: 8px; }
.status-step__conn--done { background: var(--success); }
/* 弹窗内步骤条：宽度有限，按阶段整组换行，避免横向截断 */
.modal .status-steps { flex-wrap: wrap; overflow-x: visible; row-gap: 12px; }

/* 流程信息卡：阶段指引 + 步骤条 统一容器 */
.flow-info-card { border: 1px solid var(--border-1); border-radius: var(--radius-lg); background: var(--bg-1); overflow: hidden; }
.flow-info-card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; background: var(--bg-2); border-bottom: 1px solid var(--border-1); flex-wrap: wrap; }
.flow-info-card__title { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-1); }
.flow-info-card__title svg { width: 15px; height: 15px; color: var(--primary); }
.flow-info-card__body { padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.flow-guide { display: flex; flex-direction: column; gap: 6px; }
.flow-guide__row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.flow-guide__phase { font-size: 15px; font-weight: 600; color: var(--text-1); }
.flow-guide__tip { font-size: 13px; color: var(--text-2); }
.flow-guide__actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.flow-guide__actions-label { font-size: 12px; color: var(--text-3); }
.flow-guide__sep { border-top: 1px dashed var(--border-1); }

/* ===== 状态按钮组(系统统一组件) =====
 * 把多态状态渲染成可点击按钮组：节点状态/目标状态选择等。
 * 用法：<div class="op-status-btn-group"><button class="op-status-btn" data-value="x" onclick="...">文案</button>…</div>
 * 选中态：.active（配合 --done 绿 / --danger 红 语义色）
 */
.op-status-btn-group { display: flex; gap: 6px; flex-wrap: wrap; }
.op-status-btn { padding: 6px 14px; border: 1px solid var(--border-1); border-radius: var(--radius-md); background: var(--bg-1); color: var(--text-2); font-size: 13px; cursor: pointer; transition: all .15s; font-family: inherit; line-height: 1.4; }
.op-status-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-1); }
.op-status-btn.active { border-color: var(--primary); background: var(--primary); color: #fff; }
.op-status-btn--done.active { border-color: var(--success); background: var(--success); color: #fff; }
.op-status-btn--danger.active { border-color: var(--danger); background: var(--danger); color: #fff; }

/* 弹窗扩展 */
.modal--sm { min-width: 320px; max-width: 480px; }
.modal--md { min-width: 480px; max-width: 720px; }
.modal--lg { min-width: 720px; max-width: 960px; }
.modal--xl { min-width: 960px; max-width: 1200px; }
.modal--xxl { width: 95vw; max-width: 1600px; }

/* 弹窗表单网格：两列表单，宽字段用 .pc-col-span-2 跨列。
   全系统弹窗表单统一使用该组件，勿在单页内重复定义。 */
.pc-modal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 18px;
}
.pc-modal-grid > .form-group { margin-bottom: 0; min-width: 0; }
/* 3/4 列变体：用于「按行分区」的弹窗（如三单匹配账单头：3列一行、4列一行） */
.pc-modal-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pc-modal-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pc-modal-grid .pc-col-span-2 { grid-column: 1 / -1; }
/* 全宽字段：`full` 是历史写法（联系人/合同/权限规则弹窗在用），此前没有对应样式 →
 * 那些"备注/合同名称"被挤在半列里，看起来排版不合理。这里统一补齐（与 .pc-col-span-2 等价）。 */
.pc-modal-grid > .full { grid-column: 1 / -1; }
/* 弹窗里的分区标题（多字段弹窗按区段分组，与表单页 .section-title 观感一致） */
.pc-modal-grid > .pc-section { grid-column: 1 / -1; margin: 2px 0 -4px; padding-top: 6px; border-top: 1px dashed var(--border-1); font-size: 12px; font-weight: 600; color: var(--text-2); }
.pc-modal-grid > .pc-section:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
@media screen and (max-width: 720px) {
    .pc-modal-grid { grid-template-columns: minmax(0, 1fr); }
    .pc-modal-grid .pc-col-span-2,
    .pc-modal-grid > .full { grid-column: auto; }
}

/* 提示组件 */
.alert { display: flex; align-items: flex-start; gap: 8px; padding: 12px 16px; border-radius: var(--radius-md); border: 1px solid var(--border-1); background: var(--bg-1); }
.alert--success { background: rgba(82,196,26,0.06); border-color: rgba(82,196,26,0.3); }
.alert--warning { background: rgba(250,173,20,0.06); border-color: rgba(250,173,20,0.3); }
.alert--error { background: rgba(255,77,79,0.06); border-color: rgba(255,77,79,0.3); }
.alert--info { background: rgba(22,119,255,0.06); border-color: rgba(22,119,255,0.3); }
.alert__icon { display: flex; align-items: center; flex-shrink: 0; }
.alert--success .alert__icon { color: var(--success); }
.alert--warning .alert__icon { color: var(--warning); }
.alert--error .alert__icon { color: var(--danger); }
.alert--info .alert__icon { color: var(--primary); }
.alert__content { flex: 1; }
.alert__title { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.alert__message { font-size: 13px; color: var(--text-2); }
.alert__close { cursor: pointer; color: var(--text-3); display: flex; align-items: center; }
.alert__close:hover { color: var(--text-1); }

/* 面包屑 - 已整合到上方 */
.breadcrumb-icon svg { width: 14px; height: 14px; }

/* 统计卡片扩展 */
.stat-card--primary { border-left: 3px solid var(--primary); }
.stat-card--success { border-left: 3px solid var(--success); }
.stat-card--warning { border-left: 3px solid var(--warning); }
.stat-card--danger { border-left: 3px solid var(--danger); }
.stat-card--info { border-left: 3px solid var(--info, #1677ff); }
.stat-card__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.stat-card__icon { color: var(--text-3); }
.stat-card__value { font-size: 24px; font-weight: 600; color: var(--text-1); font-family: var(--font-mono); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-card__subtitle { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.stat-card__trend { display: flex; align-items: center; gap: 4px; font-size: 12px; margin-top: 8px; }
.stat-trend__dir { font-weight: 600; }
.stat-trend__label { color: var(--text-3); }
.stat-trend.flat { color: var(--text-3); }

/* 状态徽章 */
.status-badge { display: inline-flex; align-items: center; gap: 4px; padding: 0 8px; height: 22px; border-radius: var(--radius-sm); font-size: 12px; line-height: 1; white-space: nowrap; }
.status-badge__dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-badge__icon svg { width: 12px; height: 12px; }
.status-badge--success { background: rgba(82,196,26,0.1); color: var(--success); }
.status-badge--warning { background: rgba(250,173,20,0.1); color: var(--warning); }
.status-badge--danger { background: rgba(255,77,79,0.1); color: var(--danger); }
.status-badge--info { background: rgba(22,119,255,0.1); color: var(--primary); }
.status-badge--default { background: var(--bg-4); color: var(--text-2); }
.status-badge--success .status-badge__dot { background: var(--success); }
.status-badge--warning .status-badge__dot { background: var(--warning); }
.status-badge--danger .status-badge__dot { background: var(--danger); }
.status-badge--info .status-badge__dot { background: var(--primary); }
.status-badge--default .status-badge__dot { background: var(--text-3); }

/* 文件上传 */
.file-upload { display: flex; flex-direction: column; gap: 8px; }
.file-upload--disabled { opacity: 0.5; pointer-events: none; }
.file-upload__dropzone { border: 1px dashed var(--border-2); border-radius: var(--radius-md); padding: 24px 12px; text-align: center; cursor: pointer; transition: all var(--transition); background: var(--bg-2); }
.file-upload__dropzone:hover { border-color: var(--primary); background: var(--primary-1); }
.file-upload__dropzone--drag { border-color: var(--primary); background: var(--primary-1); }
.file-upload__icon { color: var(--text-3); margin-bottom: 8px; }
.file-upload__icon svg { width: 32px; height: 32px; }
.file-upload__text { font-size: 14px; color: var(--text-2); }
.file-upload__hint { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.file-upload__list { display: flex; flex-direction: column; gap: 4px; }
.file-upload__item { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--border-1); border-radius: var(--radius-sm); background: var(--bg-1); font-size: 13px; }
.file-upload__item-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-upload__item-size { color: var(--text-3); font-size: 12px; }
.file-upload__item-progress { width: 100%; height: 4px; background: var(--bg-4); border-radius: 9999px; overflow: hidden; }
.file-upload__item-progress-bar { height: 100%; background: var(--primary); transition: width 200ms; }
.file-upload__item-remove { cursor: pointer; color: var(--text-3); }
.file-upload__item-remove:hover { color: var(--danger); }

/* 空状态扩展 */
.empty-state--small { padding: 24px 12px; }
.empty-state--large { padding: 64px 20px; }
.empty-state__icon { color: var(--text-3); opacity: 0.4; margin-bottom: 12px; }
.empty-state__icon svg { width: 48px; height: 48px; }
.empty-state__title { font-size: 14px; color: var(--text-2); margin-bottom: 4px; }
.empty-state__description { font-size: 13px; color: var(--text-3); margin-bottom: 12px; }
.empty-state__action { margin-top: 8px; }

/* 抽屉 */
.drawer-mask { position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 1000; animation: maskIn 200ms; }
.drawer { position: fixed; top: 0; bottom: 0; right: 0; background: var(--bg-1); box-shadow: var(--shadow-3); display: flex; flex-direction: column; z-index: 1001; animation: drawerIn 250ms ease-out; }
.drawer--left { right: auto; left: 0; }
@keyframes drawerIn { from { transform: translateX(100%); } to { transform: translateX(0); } }
.drawer--left { animation-name: drawerInLeft; }
@keyframes drawerInLeft { from { transform: translateX(-100%); } to { transform: translateX(0); } }
.drawer--sm { width: 360px; }
.drawer--md { width: 480px; }
.drawer--lg { width: 640px; }
.drawer--xl { width: 960px; }
.drawer-header { padding: 16px 20px; border-bottom: 1px solid var(--border-1); display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px; }
.drawer-footer { padding: 12px 20px; border-top: 1px solid var(--border-1); display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-shrink: 0; }

/* 步骤条 */
.steps { display: flex; }
.steps--vertical { flex-direction: column; }
.step { display: flex; align-items: center; flex: 1; }
.steps--vertical .step { flex: none; min-height: 64px; }
.step__circle { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--border-2); display: flex; align-items: center; justify-content: center; font-size: 13px; color: var(--text-3); flex-shrink: 0; background: var(--bg-1); }
.step--finish .step__circle { background: var(--primary); border-color: var(--primary); color: #fff; }
.step--process .step__circle { background: var(--primary); border-color: var(--primary); color: #fff; }
.step--error .step__circle { background: var(--danger); border-color: var(--danger); color: #fff; }
.step__line { flex: 1; height: 2px; background: var(--border-2); margin: 0 8px; }
.step--finish .step__line { background: var(--primary); }
.steps--vertical .step__line { width: 2px; height: 32px; margin: 4px 0; }
.step__content { margin-left: 12px; }
.step__title { font-size: 14px; color: var(--text-1); }
.step__desc { font-size: 12px; color: var(--text-3); margin-top: 2px; }

/* 时间线 */
.timeline { display: flex; flex-direction: column; }
.timeline-item { display: flex; gap: 12px; padding-bottom: 20px; position: relative; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before { content: ''; position: absolute; left: 7px; top: 20px; bottom: 0; width: 2px; background: var(--border-1); }
.timeline-item:last-child::before { display: none; }
.timeline-item__dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--primary); background: var(--bg-1); flex-shrink: 0; margin-top: 2px; z-index: 1; }
.timeline-item--success .timeline-item__dot { border-color: var(--success); }
.timeline-item--warning .timeline-item__dot { border-color: var(--warning); }
.timeline-item--danger .timeline-item__dot { border-color: var(--danger); }
.timeline-item__content { flex: 1; }
.timeline-item__time { font-size: 12px; color: var(--text-3); font-family: var(--font-mono); }
.timeline-item__title { font-size: 14px; color: var(--text-1); margin-top: 2px; }
.timeline-item__desc { font-size: 13px; color: var(--text-2); margin-top: 4px; }

/* 树形控件 */
.tree { font-size: 14px; }
.tree-node { }
.tree-node__header { display: flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: var(--radius-sm); cursor: pointer; white-space: nowrap; }
.tree-node__header:hover { background: var(--bg-4); }
.tree-node__header--selected { background: var(--primary-1); color: var(--primary); }
.tree-node__toggle { display: flex; align-items: center; width: 16px; height: 16px; }
.tree-node__toggle svg { width: 12px; height: 12px; transition: transform 150ms; }
.tree-node--expanded .tree-node__toggle svg { transform: rotate(90deg); }
.tree-node__checkbox { cursor: pointer; }
.tree-node__label { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.tree-node__children { padding-left: 20px; }

/* 骨架屏 */
.skeleton { display: block; background: linear-gradient(90deg, var(--bg-3) 25%, var(--bg-4) 37%, var(--bg-3) 63%); background-size: 400% 100%; animation: skeleton 1.4s ease infinite; border-radius: var(--radius-sm); }
@keyframes skeleton { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.skeleton-text { height: 14px; margin-bottom: 8px; }
.skeleton-title { height: 20px; width: 50%; margin-bottom: 12px; }
.skeleton-avatar { width: 40px; height: 40px; border-radius: 50%; }

/* 描述列表 */
.descriptions { border: 1px solid var(--border-1); border-radius: var(--radius-lg); overflow: hidden; }
.descriptions__title { padding: 12px 20px; border-bottom: 1px solid var(--border-1); font-size: 15px; font-weight: 600; background: var(--bg-3); }
.descriptions__grid { display: grid; grid-template-columns: repeat(2, 1fr); }
.descriptions__item { display: flex; border-bottom: 1px solid var(--border-1); }
.descriptions__item:nth-child(2n) { border-left: 1px solid var(--border-1); }
.descriptions__label { padding: 12px 16px; background: var(--bg-3); color: var(--text-2); font-size: 13px; min-width: 120px; flex-shrink: 0; }
.descriptions__value { padding: 12px 16px; color: var(--text-1); font-size: 13px; flex: 1; }

/* 徽章 */
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9999px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 500; line-height: 1; }
.badge--primary { background: var(--primary); }
.badge--success { background: var(--success); }
.badge--warning { background: var(--warning); }

/* 折叠面板 */
.collapse { border: 1px solid var(--border-1); border-radius: var(--radius-lg); overflow: hidden; }
.collapse__item { border-bottom: 1px solid var(--border-1); }
.collapse__item:last-child { border-bottom: none; }
.collapse__header { padding: 12px 16px; cursor: pointer; display: flex; align-items: center; justify-content: space-between; font-size: 14px; font-weight: 500; }
.collapse__header:hover { background: var(--bg-3); }
.collapse__arrow { transition: transform 150ms; }
.collapse__item--expanded .collapse__arrow { transform: rotate(180deg); }
.collapse__body { padding: 0 16px 12px; display: none; }
.collapse__item--expanded .collapse__body { display: block; }

/* 进度条 */
.progress { display: flex; align-items: center; gap: 8px; }
.progress__bar { flex: 1; height: 8px; background: var(--bg-4); border-radius: 9999px; overflow: hidden; }
.progress__inner { height: 100%; background: var(--primary); border-radius: 9999px; transition: width 300ms; }
.progress--success .progress__inner { background: var(--success); }
.progress--danger .progress__inner { background: var(--danger); }
.progress__label { font-size: 12px; color: var(--text-3); min-width: 36px; text-align: right; }

/* 工具提示 */
.tooltip { position: relative; display: inline-flex; }
.tooltip__content { position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: var(--text-1); color: var(--bg-1); padding: 4px 8px; border-radius: var(--radius-sm); font-size: 12px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 150ms; z-index: 999; }
.tooltip:hover .tooltip__content { opacity: 1; }

/* 响应式补充 */
@media screen and (max-width: 768px) {
    .form-row-wrap { grid-template-columns: 1fr !important; }
    .descriptions__grid { grid-template-columns: 1fr; }
    .descriptions__item:nth-child(2n) { border-left: none; }
    .tabs__nav { overflow-x: auto; }
    .stat-row { grid-template-columns: 1fr; }
    .drawer, .drawer--sm, .drawer--md, .drawer--lg, .drawer--xl { width: 100vw; }
}

/* ===== 2026企业级设计令牌补充 ===== */

/* 金额列等宽字体 */
.amount, .tabular-nums, [data-field="amount"], [data-field="total_revenue"], [data-field="total_cost"], 
[data-field="gross_profit"], [data-field="balance"], [data-field="settled_amount"], [data-field="paid_amount"] {
    font-variant-numeric: tabular-nums;
    text-align: right;
}

/* 表格行hover增强 */
.data-table thead th { background: var(--bg-2, #fafafa); font-weight: 500; }

/* Tabs标签栏样式 (高度30px) */
.tabs-container { display: flex; align-items: center; flex: 1; height: 30px; background: var(--bg-1); border-bottom: 1px solid var(--border-2); padding: 0 12px; overflow: hidden; }
.tabs-list { display: flex; align-items: center; flex: 1; overflow-x: auto; gap: 4px; }
.tabs-list::-webkit-scrollbar { height: 0; }
.tab-item { display: inline-flex; align-items: center; flex-shrink: 0; height: 24px; padding: 0 10px; font-size: 12px; border-radius: 4px; cursor: pointer; white-space: nowrap; color: var(--text-3); transition: all 120ms; user-select: none; }
.tab-item:hover { background: var(--bg-3); color: var(--text-1); }
.tab-item.active { background: var(--primary-1); color: var(--primary-6); font-weight: 500; }
.tab-item .tab-close { display: inline-flex; margin-left: 6px; opacity: 0.5; transition: opacity 120ms; }
.tab-item .tab-close:hover { opacity: 1; }
.tab-item .tab-close svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }
.tabs-actions { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.tabs-action-btn { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 4px; cursor: pointer; color: var(--text-3); transition: all 120ms; }
.tabs-action-btn:hover { background: var(--bg-3); color: var(--text-1); }
.tabs-action-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }

/* 页脚样式 (高度30px，吸底固定) */
.app-footer { display: flex; align-items: center; justify-content: center; height: 30px; padding: 0 24px; background: var(--bg-1); border-top: 1px solid var(--border-2); position: sticky; bottom: 0; z-index: 10; }
.footer-copyright { font-size: 12px; color: var(--text-3); }
.footer-link { color: inherit; text-decoration: none; transition: color 120ms, font-weight 120ms; }
.footer-link:hover { color: var(--primary); font-weight: 600; }
.footer-version { font-size: 12px; color: var(--text-4); }
.footer-stats { display: flex; gap: 16px; }
.footer-stat-item { font-size: 12px; color: var(--text-3); }
.footer-stat-item strong { color: var(--text-1); font-weight: 500; }
.app-footer:empty { height: 0; border: none; padding: 0; }

/* 三级菜单样式 */
.menu-group { margin-bottom: 4px; }
.menu-group.expanded .menu-children { display: block; }
.menu-group:not(.expanded) .menu-children { display: none; }
.menu-arrow { margin-left: auto; transition: transform 120ms; }
.menu-group.expanded .menu-arrow { transform: rotate(180deg); }
.menu-arrow svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }
.menu-children { padding-left: 0; }
.menu-subgroup { margin-bottom: 2px; }
.menu-subgroup-title { display: flex; align-items: center; padding: 6px 12px; font-size: 13px; color: var(--text-3); cursor: pointer; border-radius: 4px; transition: background 120ms; }
.menu-subgroup-title:hover { background: var(--bg-3); }
.menu-subgroup.expanded .menu-grandchildren { display: block; }
.menu-subgroup:not(.expanded) .menu-grandchildren { display: none; }
.menu-grandchildren { padding-left: 8px; }

/* 虚拟滚动表格样式 */
.data-table-virtual { border: 1px solid var(--border-2); border-radius: var(--radius-md); overflow: hidden; }
.dtv-header { background: var(--bg-2); border-bottom: 1px solid var(--border-2); overflow: hidden; }
.dtv-header-row { display: flex; }
.dtv-cell { padding: 0 12px; font-size: 13px; border-right: 1px solid var(--border-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dtv-header-cell { font-weight: 500; color: var(--text-2); line-height: 40px; background: var(--bg-2); }
.dtv-sortable { cursor: pointer; }
.dtv-sortable:hover { background: var(--bg-3); }
.dtv-sortable.sorted-asc::after { content: ' ↑'; color: var(--primary-6); }
.dtv-sortable.sorted-desc::after { content: ' ↓'; color: var(--primary-6); }
.dtv-body-wrap { overflow: hidden; }
.dtv-viewport { overflow-y: auto; overflow-x: hidden; }
.dtv-content { will-change: transform; }
.dtv-row { display: flex; border-bottom: 1px solid var(--border-1); transition: background 120ms; }
.dtv-row:hover { background: #f0f5ff; }
.dtv-row-stripe { background: var(--bg-2); }
.dtv-row-stripe:hover { background: #f0f5ff; }
.dtv-amount { font-variant-numeric: tabular-nums; text-align: right; }
.dtv-fixed-left { position: sticky; left: 0; z-index: 2; background: inherit; }
.dtv-fixed-right { position: sticky; right: 0; z-index: 2; background: inherit; }
.dtv-cell-checkbox { width: 40px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }

/* 右键菜单 */
.tab-context-menu { position: fixed; z-index: 10000; background: var(--bg-1); border: 4px solid var(--border-2); border-radius: 4px; box-shadow: var(--shadow-md); min-width: 120px; padding: 4px 0; }
.ctx-menu-item { padding: 6px 16px; font-size: 13px; color: var(--text-2); cursor: pointer; }
.ctx-menu-item:hover { background: var(--bg-3); color: var(--text-1); }

/* 侧边栏折叠态 */
.sidebar { transition: width 200ms ease; }

/* 暗黑模式切换按钮 */
.header-icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 4px; cursor: pointer; color: var(--text-3); transition: all 120ms; }
.header-icon-btn:hover { background: var(--bg-3); color: var(--text-1); }
.header-icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }

/* ===== P2 表单创建/编辑页面通用样式 ===== */
/* 适用于所有模块的新建/编辑页面: 订单/报价/订舱/报关/对账...
 * 各页面只需在根容器加 class="form-page" 即可继承所有样式 */

/* 页面布局基础 */
.form-page { padding: 0; } /* 内容区间隙统一由 app-content 控制 */
.form-page .card-body { padding-bottom: 0; } /* 吸底操作栏紧贴卡片底部,不留白 */

/* 区块标题 */
.form-page .section-title {
    font-size: 14px; font-weight: 600; color: var(--primary);
    margin: 16px 0 8px; padding-bottom: 6px;
    border-bottom: 1px solid var(--border-1);
    display: flex; align-items: center; gap: 6px;
}
.form-page .section-title:first-child { margin-top: 0; }

/* 表单行跨列: 同一行 N 列等分, 不折行(需要折行请改用 .form-row-wrap 网格) */
.form-page .form-row { display: flex; gap: 12px; margin-bottom: 0; flex-wrap: nowrap; }
.form-page .form-row .form-group { flex: 1; min-width: 0; }
.form-page .form-row .form-group.col-2 { flex: 2; }
.form-page .form-row .form-group.col-3 { flex: 3; }
.form-page .form-row .form-group.col-4 { flex: 4; }

/* 表单行：固定 4 列网格（字段跨行对齐；不足 4 个留空，隐藏字段不占位） */
.form-page .form-row.form-row--grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.form-page .form-row.form-row--grid-4 .form-group { flex: none; min-width: 0; }
@media (max-width: 1280px) { .form-page .form-row.form-row--grid-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px)  { .form-page .form-row.form-row--grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px)  { .form-page .form-row.form-row--grid-4 { grid-template-columns: 1fr; } }

/* 表格内 是/否 勾选（工作流节点配置等） */
.form-page .node-flag { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-1); cursor: pointer; white-space: nowrap; }
.form-page .node-flag input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--primary, #2563eb); cursor: pointer; }

/* 工作流节点配置：适用订单类型多选（勾选式，比原生多选列表框更直观） */
.form-page .node-type-opts { display: flex; flex-wrap: wrap; gap: 2px 12px; }
.form-page .node-type-opts label { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-1); white-space: nowrap; cursor: pointer; }
.form-page .node-type-opts input[type=checkbox] { width: 14px; height: 14px; accent-color: var(--primary, #2563eb); cursor: pointer; }
.form-page .node-type-all { font-size: 12px; color: var(--text-3); }

/* 单选按钮组(名称在上,选项在下; 圆圈+高亮选中态) */
.form-page .radio-group {
    display: flex; flex-wrap: wrap; gap: 4px; align-items: center;
}
.form-page .radio-item {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 10px; border-radius: 4px; cursor: pointer;
    font-size: 13px; border: 1px solid var(--border-1);
    background: var(--bg-1); transition: all .15s; user-select: none;
}
.form-page .radio-item:hover { border-color: var(--primary); }
.form-page .radio-item input[type="radio"] { display: none; }
.form-page .radio-item::before {
    content: ''; width: 13px; height: 13px; border-radius: 50%;
    border: 1.5px solid var(--border-2, #ccc); background: var(--bg-1, #fff);
    flex-shrink: 0; transition: all .15s; box-sizing: border-box;
}
.form-page .radio-item.checked {
    background: var(--primary); color: #fff; border-color: var(--primary);
}
.form-page .radio-item.checked::before {
    background: #fff; border-color: #fff;
}
/* 布尔「是/否」按钮组（由 initBoolSwitch 自动生成，替代是/否下拉） */
.bool-switch {
    display: inline-flex; border: 1px solid var(--border-1);
    border-radius: 6px; overflow: hidden; background: var(--bg-1);
}
.bool-switch__btn {
    padding: 6px 18px; font-size: 13px; line-height: 1.4;
    border: 0; background: transparent; color: var(--text-2);
    cursor: pointer; transition: all .15s; white-space: nowrap;
}
.bool-switch__btn + .bool-switch__btn { border-left: 1px solid var(--border-1); }
.bool-switch__btn:hover { color: var(--primary); }
.bool-switch__btn.is-active { background: var(--primary); color: #fff; }
.bool-switch__select { display: none !important; }
/* 单开关(系统统一)：是/否字段只显示正向标签(如「是」)，选中=是(蓝)，不选=否(灰，默认)。
   全系统统一——不再显示「否/是」两个按钮。 */
.bool-switch--single { border: 0; border-radius: 0; overflow: visible; background: transparent; }
.bool-switch--single .bool-switch__btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 14px; border: 1px solid var(--border-1); border-radius: 6px;
    background: var(--bg-1); color: var(--text-3);
}
.bool-switch--single .bool-switch__btn::before {
    content: ''; width: 13px; height: 13px; border-radius: 50%;
    border: 1.5px solid var(--border-2, #ccc); background: var(--bg-1, #fff);
    box-sizing: border-box; flex-shrink: 0; transition: all .15s;
}
.bool-switch--single .bool-switch__btn:hover { color: var(--primary); border-color: var(--primary); }
.bool-switch--single .bool-switch__btn.is-active { background: var(--primary); color: #fff; border-color: var(--primary); }
.bool-switch--single .bool-switch__btn.is-active::before { background: #fff; border-color: #fff; }
.bool-switch--single.is-disabled .bool-switch__btn { opacity: .6; cursor: not-allowed; }
/* 多态「状态」按钮组（由 initStatusSwitch 自动生成，替代状态下拉；支持确认/锁定/语义色） */
.status-switch {
    display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px;
}
.status-switch__btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 16px; font-size: 13px; line-height: 1.4;
    border: 1px solid var(--border-2); border-radius: 999px;
    background: var(--bg-1); color: var(--text-2);
    cursor: pointer; white-space: nowrap;
    transition: background .15s, color .15s, border-color .15s, box-shadow .15s;
}
/* 状态点：未选中=语义色，选中=白色 */
.status-switch__btn::before {
    content: ''; width: 6px; height: 6px; border-radius: 50%;
    background: var(--sw-color, var(--text-4)); flex: none;
}
.status-switch__btn:hover { border-color: var(--sw-color, var(--primary)); color: var(--sw-color, var(--primary)); }
.status-switch__btn.is-active {
    background: var(--sw-color, var(--primary)); border-color: var(--sw-color, var(--primary));
    color: #fff; font-weight: 600; box-shadow: 0 2px 6px rgba(0, 0, 0, .12);
}
.status-switch__btn.is-active::before { background: #fff; }
/* 语义色 → --sw-color */
.status-switch__btn--default { --sw-color: var(--text-3); }
.status-switch__btn--primary { --sw-color: var(--primary); }
.status-switch__btn--info    { --sw-color: var(--primary); }
.status-switch__btn--success { --sw-color: var(--success); }
.status-switch__btn--warning { --sw-color: var(--warning); }
.status-switch__btn--danger  { --sw-color: var(--danger); }
.status-switch__select { display: none !important; }
/* 锁定态 */
.status-switch.is-locked .status-switch__btn { cursor: not-allowed; opacity: .6; }
.status-switch.is-locked .status-switch__btn:hover { border-color: var(--border-2); color: var(--text-2); }
.status-switch__lock { font-size: 12px; color: var(--warning); white-space: nowrap; }
/* 多选按钮组（与单选 .radio-group 同一视觉语言，方形标记） */
.form-page .check-group { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }.form-page .check-item {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 10px; border-radius: 4px; cursor: pointer;
    font-size: 13px; border: 1px solid var(--border-1);
    background: var(--bg-1); transition: all .15s; user-select: none;
}
.form-page .check-item:hover { border-color: var(--primary); }
.form-page .check-item input[type="checkbox"] { display: none; }
.form-page .check-item::before {
    content: ''; width: 13px; height: 13px; border-radius: 3px;
    border: 1.5px solid var(--border-2, #ccc); background: var(--bg-1, #fff);
    flex-shrink: 0; transition: all .15s; box-sizing: border-box;
}
.form-page .check-item.checked { background: var(--primary); color: #fff; border-color: var(--primary); }
.form-page .check-item.checked::before { background: #fff; border-color: #fff; }

/* 预计/实际标签徽章 */
.form-page .ratio-badge-wrap {
    display: flex; align-items: flex-end; gap: 4px;
}
.form-page .ratio-badge-content {
    flex: 1; min-width: 0; display: flex; flex-direction: column;
}
.form-page .ratio-badge {
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 12px; height: 32px;
    padding: 0 8px; box-sizing: border-box;
    border-radius: 3px; color: #fff; flex-shrink: 0; white-space: nowrap;
}
.form-page .ratio-badge-expected { background: #3b82f6; }
.form-page .ratio-badge-actual { background: #f59e0b; }

/* 区块新增按钮 */
.form-page .section-add-btn {
    margin-left: auto; font-size: 12px; padding: 3px 10px;
    border: 1px solid var(--primary); color: var(--primary);
    background: transparent; border-radius: 4px; cursor: pointer;
    display: inline-flex; align-items: center; gap: 4px;
}
.form-page .section-add-btn:hover { background: var(--primary); color: #fff; }
.form-page .section-add-btn svg { width: 14px; height: 14px; }
/* 同一标题栏内有多个操作按钮时: 仅第一个把整组推到右侧, 其余紧跟其后 */
.form-page .section-title .section-add-btn + .section-add-btn { margin-left: 0; }

/* 费用合计(按币种分组显示在标题中) */
.form-page .charge-total { font-size: 13px; color: var(--text-2); font-weight: 400; margin-left: 8px; }

/* ===== 变更记录(字段级前后值追溯) ===== */
.change-batch {
    border: 1px solid var(--border-1); border-radius: var(--radius-lg);
    margin-bottom: 12px; overflow: hidden; background: var(--bg-1);
}
.change-batch-head {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap; row-gap: 4px;
    padding: 8px 12px; background: var(--bg-3);
    border-bottom: 1px solid var(--border-1); font-size: 12px; color: var(--text-2);
}
.change-batch-head .change-batch-no { font-weight: 600; color: var(--text-1); }
.change-batch-head .change-batch-meta { color: var(--text-3); }
.change-batch .data-table-scroll { margin-bottom: 0; }
.change-batch .data-table th,
.change-batch .data-table td { padding: 6px 12px; font-size: 13px; }
.change-old { color: var(--text-3); text-decoration: line-through; word-break: break-all; }
.change-new { color: var(--success); font-weight: 600; word-break: break-all; }
/* 审计日志弹窗内的原始 JSON */
.audit-json {
    margin: 0 0 12px; padding: 10px 12px; max-height: 260px; overflow: auto;
    background: var(--bg-3); border: 1px solid var(--border-1); border-radius: var(--radius-md);
    font-family: var(--font-mono); font-size: 12px; line-height: 1.6; color: var(--text-1);
    white-space: pre-wrap; word-break: break-all;
}
.text-muted { color: var(--text-3); }

/* 可重复表单区块(提货信息 / 报关信息 等共用同一套卡片样式) */
.form-page .pickup-section,
.form-page .repeat-section { border: 1px solid var(--border-1); border-radius: 6px; padding: 12px 16px 4px; margin-bottom: 10px; background: var(--bg-1); position: relative; }
.form-page .pickup-header,
.form-page .repeat-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--border-1); }
.form-page .pickup-no,
.form-page .repeat-no { font-size: 13px; font-weight: 600; color: var(--text-2); }
.form-page .pickup-del-btn,
.form-page .repeat-del-btn { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: none; background: transparent; color: var(--text-3); cursor: pointer; border-radius: 4px; transition: all .15s; }
.form-page .pickup-del-btn:hover,
.form-page .repeat-del-btn:hover { color: var(--danger); background: rgba(239,68,68,0.08); }
.form-page .pickup-del-btn svg,
.form-page .repeat-del-btn svg { width: 15px; height: 15px; }

/* 可重复卡片区块内部: 7 列网格布局(行间列宽对齐), 与订单创建/编辑页一致。
   订单创建页用 .pickup-section/.repeat-section(其 <style> 内 .order-create-page 作用域),
   订单资料操作弹窗用 .repeat-section —— 统一到系统级, 两处观感一致。 */
.form-page .repeat-section .form-row { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0 16px; }
.form-page .repeat-section .form-row .form-group { flex: none; min-width: 0; }
.form-page .repeat-section .repeat-col-2 { grid-column: span 2; }
.form-page .repeat-section .repeat-col-3 { grid-column: span 3; }
.form-page .repeat-section .repeat-col-4 { grid-column: span 4; }
.form-page .repeat-section .repeat-col-5 { grid-column: span 5; }
.form-page .repeat-section .repeat-col-6 { grid-column: span 6; }
.form-page .repeat-section .repeat-col-7 { grid-column: span 7; }

/* 附件上传区块 */
.form-page .attach-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 12px; }
.form-page .attach-col { border: 1px dashed var(--border-1); border-radius: 6px; padding: 10px 12px; min-height: 80px; background: var(--bg-1); }
.form-page .attach-label { font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 8px; }
.form-page .attach-list { margin-bottom: 8px; }
.form-page .attach-item { display: flex; align-items: center; gap: 6px; padding: 4px 0; font-size: 12px; color: var(--text-2); border-bottom: 1px solid var(--border-1); }
.form-page .attach-item:last-child { border-bottom: none; }
.form-page .attach-item-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--primary); cursor: pointer; }
.form-page .attach-item-name:hover { text-decoration: underline; }
.form-page .attach-item-size { color: var(--text-3); font-size: 11px; white-space: nowrap; }
.form-page .attach-item-del { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border: none; background: transparent; color: var(--text-3); cursor: pointer; border-radius: 3px; flex-shrink: 0; }
.form-page .attach-item-del:hover { color: var(--danger); }
.form-page .attach-item-del svg { width: 12px; height: 12px; }
.form-page .attach-add-btn { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; padding: 4px 10px; border: 1px dashed var(--border-1); color: var(--text-3); background: transparent; border-radius: 4px; cursor: pointer; width: 100%; justify-content: center; transition: all .15s; }
.form-page .attach-add-btn:hover { border-color: var(--primary); color: var(--primary); }
.form-page .attach-uploading { font-size: 11px; color: var(--text-3); padding: 4px 0; }
.form-page .attach-uploading-bar { height: 2px; background: var(--border-1); border-radius: 1px; margin-top: 2px; overflow: hidden; }
.form-page .attach-uploading-bar > div { height: 100%; background: var(--primary); width: 0%; transition: width .2s; }

/* 动态子表 */
.form-page .dynamic-table-wrap { margin-bottom: 12px; overflow-x: auto; }
/* 内层 .data-table-wrapper 默认 overflow:hidden 会把超宽表格直接裁掉(外层滚动条永远不出现),
   这里改为横向滚动, 表格过宽时可左右滑动; 配合 .col-no 左固定 / .col-actions 右固定 */
.form-page .dynamic-table-wrap .data-table-wrapper { overflow-x: auto; }
.form-page .dynamic-table-wrap .data-table { font-size: 13px; table-layout: fixed; min-width: 100%; }
.form-page .dynamic-table-wrap .data-table th {
    padding: 8px 6px; font-size: 12px; white-space: nowrap;
    /* 固定布局下列名过长时裁切, 避免与相邻列"文字重合" */
    overflow: hidden; text-overflow: ellipsis;
}
.form-page .dynamic-table-wrap .data-table td { padding: 4px 4px; vertical-align: middle; white-space: nowrap; }
/* 动态子表: 表格超宽横向滚动时, 序号列固定左侧、操作列固定右侧(不透明背景避免内容穿透)
 * 底色统一走行的 --row-bg（见 .data-table 整行底色体系），这里只负责定位，
 * 不再单独写 background，否则吸附列又会与整行不同色。 */
.form-page .dynamic-table-wrap .data-table .col-no { width: 40px; text-align: center; position: sticky; left: 0; z-index: 6; }
.form-page .dynamic-table-wrap .data-table .col-actions { width: 40px; text-align: center; position: sticky; right: 0; z-index: 6; }
.form-page .dynamic-table-wrap .data-table thead .col-no,
.form-page .dynamic-table-wrap .data-table thead .col-actions { background: var(--bg-2, #fafafa); z-index: 7; }
/* 表单页可编辑子表不参与斑马纹，悬停沿用原来的浅灰（观感与改造前一致） */
.form-page .dynamic-table-wrap .data-table tbody tr:nth-child(even) { --row-bg: var(--bg-1); }
.form-page .dynamic-table-wrap .data-table tbody tr:hover { --row-bg: var(--bg-3); }

/* 动态子表多列吸附（费用行等）：左侧可吸附 No./费用名称/结算单位，右侧吸附操作列。
   与列表页/弹窗复用同一套语义类名 .col-sticky-left[-N] / .col-sticky-right；
   偏移量由页面按实际列宽写入 --sticky-left-2 / --sticky-left-3（见订单新建/编辑页 <style>）。
   z-index 必须高于 .input-clear-btn(z-index:5)，否则横向滚动时输入框的清除按钮"×"
   会盖在吸附列上，出现"×与固定内容交叉显示"。 */
.form-page .dynamic-table-wrap .data-table .col-sticky-left { position: sticky; z-index: 6; }
.form-page .dynamic-table-wrap .data-table .col-sticky-left--1 { left: 0; }
.form-page .dynamic-table-wrap .data-table .col-sticky-left--2 { left: var(--sticky-left-2, 130px); }
.form-page .dynamic-table-wrap .data-table .col-sticky-left--3 { left: var(--sticky-left-3, 300px); }
.form-page .dynamic-table-wrap .data-table thead .col-sticky-left { background: var(--bg-2, #fafafa); z-index: 7; }
.form-page .dynamic-table-wrap .data-table .col-sticky-right { position: sticky; right: 0; z-index: 6; }
.form-page .dynamic-table-wrap .data-table thead .col-sticky-right { background: var(--bg-2, #fafafa); z-index: 7; }
.form-page .dynamic-table-wrap .data-table .col-sticky-left::after { content: ''; position: absolute; top: 0; right: -6px; bottom: 0; width: 6px; background: linear-gradient(to right, rgba(0,0,0,0.06), transparent); pointer-events: none; }
.form-page .dynamic-table-wrap .data-table .col-sticky-right::before { content: ''; position: absolute; top: 0; left: -6px; bottom: 0; width: 6px; background: linear-gradient(to left, rgba(0,0,0,0.06), transparent); pointer-events: none; }
/* 吸附列(position:sticky;z-index:6)会创建层叠上下文，其内部 fixed 的下拉层会被"钉"在 z-index:6 这一层，
   从而被下一行(同为 z-index:6 且 DOM 靠后)盖住 → 表现为"下拉框显示在下一行的下面"。
   单元格内控件获得焦点(如下拉输入框)时临时抬高该单元格的 z-index，让下拉层浮到最上层。
   与 .modal .data-table td:focus-within 同一套做法。 */
.form-page .dynamic-table-wrap .data-table td.col-sticky-left:focus-within,
.form-page .dynamic-table-wrap .data-table td.col-sticky-right:focus-within { z-index: 30; }

/* 动态子表空态: 无数据行时隐藏整表(含表头), 点「添加」生成第一行后自动显示
   (由 FQA.syncEmptyDynamicTables() 切换 .is-empty, 见 core.js) */
.dynamic-table-wrap.collapse-empty.is-empty { display: none; }

/* ===== 只读数据表(查看页 / 对账单 等) =====
   与订单列表页一致: 列宽按内容自适应(不裁切), 超出容器时整表横向滚动 ——
   解决只读表格因 table-layout:fixed 造成相邻两列文字互相重叠的问题 */
.data-table-scroll { margin-bottom: 12px; overflow-x: auto; }
/* 内层 .data-table-wrapper 默认 overflow:hidden 会把超宽表格直接裁掉(外层滚动条永远不出现),
   这里改为横向滚动, 只读表格过宽时可左右滑动查看 */
.data-table-scroll .data-table-wrapper { overflow-x: auto; }
.data-table-scroll .data-table { table-layout: auto; width: auto; min-width: 100%; }
.data-table-scroll .data-table th,
.data-table-scroll .data-table td { white-space: nowrap; }
.data-table-scroll .data-table td.wrap,
.data-table-scroll .data-table th.wrap { white-space: normal; min-width: 180px; }
.data-table-scroll .data-table tfoot td { font-weight: 600; }

/* 表格内控件(与系统form-input统一32px高度) */
.form-page .td-input {
    width: 100%; height: 32px; padding: 0 8px; font-size: 13px;
    border: 1px solid var(--border-1); border-radius: 3px;
    background: var(--bg-1); box-sizing: border-box;
}
.form-page .td-input:focus { border-color: var(--primary); outline: none; }
.form-page .td-input[readonly] { background: var(--bg-3); }
/* 表单页只读输入框统一「只读观感」：灰底 + 默认光标（不再各页面写 inline style）
 * 典型场景：理赔投诉/订舱等表单里从订单只读带出的字段。 */
.form-page .form-input[readonly],
.form-page .form-textarea[readonly],
.form-page .form-select[disabled] { background: var(--bg-3); cursor: default; }
/* 动态行单元格内的原生下拉（不参与 input-with-dropdown/bool-switch 自动转换，保持紧凑） */
.form-page .td-select {
    width: 100%; height: 30px; padding: 0 6px; font-size: 13px;
    border: 1px solid var(--border-1); border-radius: 3px;
    background: var(--bg-1); color: var(--text-1); box-sizing: border-box;
}
.form-page .td-select:focus { border-color: var(--primary); outline: none; }
/* 已审核锁定(disabled)的单元格控件统一灰化 —— 锁定行必须一眼看出只读，
   否则数字输入框没有 :disabled 规则会保持白色，看起来仍可编辑 */
.form-page .td-input:disabled { background: var(--bg-3); color: var(--text-4); cursor: not-allowed; }
.form-page .td-check { width: 16px; height: 16px; cursor: pointer; margin: 0; vertical-align: middle; }
.form-page .td-check:disabled { cursor: not-allowed; opacity: .55; }
/* 锁定行整行浅底，进一步强化"已锁定"观感（吸附列自带不透明底，不透明覆盖无碍） */
.form-page .dynamic-table-wrap .data-table tr.is-locked > td { background: var(--bg-2, #fafafa); }
.form-page .dynamic-table-wrap .data-table tr.is-locked .td-input:disabled,
.form-page .dynamic-table-wrap .data-table tr.is-locked .input-with-dropdown input[type="text"]:disabled { background: var(--bg-3); }

/* 删除按钮hover高亮 */
.form-page .dynamic-table-wrap .col-actions button {
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; border-radius: var(--radius-sm, 3px);
    color: var(--text-2, #666); cursor: pointer; border: none; background: transparent;
    transition: all 120ms;
}
.form-page .dynamic-table-wrap .col-actions button:hover { background: rgba(239,68,68,0.08); color: var(--danger, #dc2626); }
.form-page .dynamic-table-wrap .col-actions button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* 动态表格内的input-with-dropdown紧凑模式 */
.form-page .dynamic-table-wrap .input-with-dropdown input[type="text"] {
    height: 32px; padding: 0 24px 0 8px; font-size: 13px;
    /* 与同排 .td-input 保持一致的描边/圆角, 避免一行内控件外观参差 */
    border-color: var(--border-1); border-radius: 3px;
}
/* 锁定的下拉(已审核费用行)与数字框保持同一灰度，避免"有的灰有的白" */
.form-page .dynamic-table-wrap .input-with-dropdown input[type="text"]:disabled {
    background: var(--bg-3); color: var(--text-4); cursor: not-allowed;
}
.form-page .dynamic-table-wrap .input-with-dropdown .dropdown-list {
    font-size: 13px;
}
.form-page .dynamic-table-wrap .input-with-dropdown .input-clear-btn {
    width: 18px; height: 18px; font-size: 10px; right: 4px;
}
/* 动态表格单元格内的文本/数字输入框: 复用系统统一清除按钮 */
.form-page .dynamic-table-wrap .input-clear-wrap { width: 100%; }
.form-page .dynamic-table-wrap .input-clear-wrap .td-input { padding-right: 20px; }
.form-page .dynamic-table-wrap .input-clear-wrap .input-clear-btn { width: 16px; height: 16px; font-size: 10px; right: 3px; }

/* 弹窗内动态子表（系统统一）：.modal 复用表单页(.form-page)同一套动态行版式 ——
   区块标题 + 添加按钮 + .dynamic-table-wrap 表格 + .td-input 单元格输入框。
   让弹窗里的明细行与「新建订单」等表单页保持完全一致的排版。 */
.modal .section-title {
    font-size: 14px; font-weight: 600; color: var(--primary);
    margin: 16px 0 8px; padding-bottom: 6px;
    border-bottom: 1px solid var(--border-1);
    display: flex; align-items: center; gap: 6px;
}
.modal .section-title:first-child { margin-top: 0; }
.modal .section-add-btn {
    margin-left: auto; font-size: 12px; padding: 3px 10px;
    border: 1px solid var(--primary); color: var(--primary);
    background: transparent; border-radius: 4px; cursor: pointer;
    display: inline-flex; align-items: center; gap: 4px;
}
.modal .section-add-btn:hover { background: var(--primary); color: #fff; }
.modal .section-add-btn svg { width: 14px; height: 14px; }
.modal .section-title .section-add-btn + .section-add-btn { margin-left: 0; }
.modal .td-input {
    width: 100%; height: 32px; padding: 0 8px; font-size: 13px;
    border: 1px solid var(--border-1); border-radius: 3px;
    background: var(--bg-1); box-sizing: border-box;
}
.modal .td-input:focus { border-color: var(--primary); outline: none; }
.modal .td-input[readonly] { background: var(--bg-3); }
.modal .dynamic-table-wrap .col-actions button {
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; border-radius: var(--radius-sm, 3px);
    color: var(--text-2, #666); cursor: pointer; border: none; background: transparent;
    transition: all 120ms;
}
.modal .dynamic-table-wrap .col-actions button:hover { background: rgba(239,68,68,0.08); color: var(--danger, #dc2626); }
.modal .dynamic-table-wrap .col-actions button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.modal .dynamic-table-wrap .input-with-dropdown input[type="text"] {
    height: 32px; padding: 0 24px 0 8px; font-size: 13px;
    border-color: var(--border-1); border-radius: 3px;
}
.modal .dynamic-table-wrap .input-with-dropdown .dropdown-list { font-size: 13px; }
.modal .dynamic-table-wrap .input-clear-wrap { width: 100%; }
.modal .dynamic-table-wrap .input-clear-wrap .td-input { padding-right: 20px; }
.modal .dynamic-table-wrap .input-clear-wrap .input-clear-btn { width: 16px; height: 16px; font-size: 10px; right: 3px; }

/* 保存操作栏 */
.form-page .save-bar {
    display: flex; align-items: center; justify-content: flex-end; gap: 8px;
    padding: 8px 0; border-top: 1px solid var(--border-1); margin-top: 16px;
    background: var(--bg-1); position: sticky; bottom: 0; z-index: 5;
}

/* 表单页面响应式补充 */
@media screen and (max-width: 768px) {
    .form-page .attach-row { grid-template-columns: 1fr 1fr; }
    .form-page .pickup-section .form-row, .form-page .repeat-section .form-row { grid-template-columns: 1fr !important; }
}

/* ===== P3 列表页通用样式 ===== */
/* 适用于所有模块的列表页: 订单/报价/订舱/报关/对账...
 * 各页面只需在根容器加 class="list-page" 即可继承所有样式
 * 页头/筛选/分页固定不动,仅表格区滚动 */

/* 列表页整体布局: flex纵向 */
.list-page { display: flex; flex-direction: column; overflow: hidden; }

/* 多区块页面的主体滚动区(与 .list-page 搭配: 页头/筛选固定, 主体滚动)
   用法: <div class="list-page"><div class="list-header">…</div><div class="list-body">…</div></div> */
.list-body { flex: 1; overflow: auto; min-height: 0; }

/* 列表页内的固定区块(统计卡/流程卡/批量条等)不参与 flex 收缩:
   否则窗口变矮时这些区块会被压扁, 内容被父级 overflow:hidden 裁掉
   —— 表现为「区块被隐藏,看不到完整内容」。表格区(.list-table-wrap flex:1)才允许伸缩。 */
.list-page > .stat-grid,
.list-page > .stat-cards,
.list-page > .flow-info-card,
.list-page > .ops-node-batch-bar { flex: none; }

/* 撑满内容区可视高度 —— 页头/筛选/分页固定不动, 仅表格区(.list-table-wrap)内部滚动(吸顶+吸底)
   高度 = 内容区高度 - 上边距(首位子元素被赋予 margin-top: var(--content-padding)) */
.app-content > .list-page { height: calc(100% - var(--content-padding)); }
/* 看板型页面(发票中心/驾驶舱)：统计卡+筛选+图表整体随 .app-content 滚动，
   避免窗口变矮时固定区占满高度，只剩很窄一条内容区。 */
.app-content > .list-page.list-page--dashboard { height: auto; min-height: calc(100% - var(--content-padding)); overflow: visible; display: block; }
.list-page.list-page--dashboard .list-body { overflow: visible; min-height: 0; }

/* 列表页页头 */
.list-header { flex: none; padding: 10px 0; margin-bottom: 0; border-bottom: 1px solid var(--border-1); background: var(--bg-1); }
/* 列表页头部右侧按钮区（全系统沿用此命名） */
.list-header-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* 列表页筛选区 (沿用表单页布局: 标签在上, 控件在下) */
.list-filters { flex: none; background: var(--bg-2); border: 1px solid var(--border-1); border-radius: var(--radius-lg); padding: 12px 14px 0; margin: 8px 0 12px 0; }

/* 筛选行: 每行多个字段, 每个字段为 form-group */
.filter-row { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.filter-row .form-group { flex: 1 1 0; min-width: 150px; }

/* 操作按钮行: 右对齐吸附在最右侧 */
.filter-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; padding-bottom: 12px; }
.filter-actions .btn { height: 32px; font-size: 13px; }
/* 单行筛选: 字段与「查询/重置」同排, 节省纵向空间
   按钮也包一层 .form-group(空 label) → 与字段同高同基线, 严格对齐 */
.filter-row--inline { align-items: flex-end; padding-bottom: 12px; }
.filter-row--inline .form-group { flex: 0 1 auto; min-width: 0; }
.filter-row--inline .filter-inline-actions { flex: 0 0 auto; margin-left: auto; }
.filter-row--inline .filter-inline-btns { display: flex; align-items: center; gap: 8px; }
.filter-row--inline .filter-inline-btns .btn { height: 32px; font-size: 13px; }
/* 展开/收起（系统统一，文字链 + 箭头样式，订单列表/财务列表/任意卡片区共用）
 * 触发元素加 [data-collapse-target]，由 core.js FQA.initCollapseToggle 绑定；
 * 折叠目标加 .is-collapsed 即隐藏，按钮内箭头图标随之翻转。 */
.filter-toggle-btn,
.collapse-toggle { font-size: 13px; color: var(--primary); cursor: pointer; user-select: none; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; background: transparent; border: none; padding: 0; font-family: inherit; line-height: 1.4; }
.filter-toggle-btn:hover,
.collapse-toggle:hover { text-decoration: underline; }
.collapse-toggle svg { transition: transform .2s; }
.collapse-toggle--collapsed svg { transform: rotate(180deg); }
.is-collapsed { display: none !important; }

/* 日期范围选择器(双月历弹层, 系统统一组件)
 * 标记契约: .date-range-picker[data-date-range] > [data-range-display] + .dual-calendar[data-range-calendar] + hidden[data-range-from/to] */
.date-range-picker { position: relative; }
.date-range-picker [data-range-display] { width: 100%; cursor: pointer; padding-right: 28px; }

.dual-calendar {
    display: none; position: absolute; top: calc(100% + 4px); left: 0; z-index: 1000;
    background: var(--bg-1); border: 1px solid var(--border-2);
    border-radius: var(--radius-lg); padding: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    user-select: none; white-space: nowrap;
}
.dual-calendar.show { display: block; }

/* 内部容器: 左右留出导航按钮空间, 保证标题与月历列对齐 */
.dual-calendar .cal-inner { position: relative; padding: 0 32px; }

/* 导航按钮 */
.dual-calendar .cal-nav {
    position: absolute; top: 0;
    display: inline-flex; align-items: center; justify-content: center;
    width: 26px; height: 26px; border: 1px solid var(--border-1);
    border-radius: var(--radius-sm); background: var(--bg-1);
    color: var(--text-2); cursor: pointer; font-size: 15px; line-height: 1;
    transition: all var(--transition);
}
.dual-calendar .cal-nav:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-1); }
.dual-calendar .cal-nav[data-dir="prev"] { left: 0; }
.dual-calendar .cal-nav[data-dir="next"] { right: 0; }

/* 月份标题行 */
.dual-calendar .cal-header { display: flex; gap: 16px; margin-bottom: 8px; }
.dual-calendar .cal-month-title { flex: 1; text-align: center; font-size: 13px; font-weight: 600; color: var(--text-1); }

/* 双月主体 */
.dual-calendar .cal-bodies { display: flex; gap: 16px; }
.dual-calendar .cal-month { flex: 1; min-width: 182px; }
.dual-calendar .cal-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: 11px; color: var(--text-4); margin-bottom: 4px; }
.dual-calendar .cal-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }

/* 日期单元格 */
.dual-calendar .cal-day {
    display: flex; align-items: center; justify-content: center;
    height: 28px; font-size: 12px; border-radius: var(--radius-sm);
    color: var(--text-1); cursor: pointer;
    transition: background .12s, color .12s;
}
.dual-calendar .cal-day:hover { background: var(--primary-1); color: var(--primary); }
.dual-calendar .cal-day.other-month { color: var(--text-4); }
.dual-calendar .cal-day.other-month:hover { background: var(--bg-4); color: var(--text-2); }
.dual-calendar .cal-day.today { color: var(--primary); font-weight: 600; box-shadow: inset 0 0 0 1px var(--primary-5, var(--primary)); }
.dual-calendar .cal-day.in-range { background: var(--primary-1); border-radius: 0; color: var(--primary); }
/* 悬停预览区间(已选起始日期后, 鼠标移动时实时高亮 起始~悬停) */
.dual-calendar .cal-day.preview-range { background: var(--primary-1); border-radius: 0; color: var(--primary); }
.dual-calendar .cal-day.selected,
.dual-calendar .cal-day.selected:hover { background: var(--primary); color: #fff; font-weight: 600; }

/* 底部提示栏(无按钮: 选完起止日期自动确定并关闭) */
.dual-calendar .cal-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border-1); }
.dual-calendar .cal-hint { font-size: 12px; font-weight: 500; color: var(--text-2); }
.dual-calendar .cal-tip { font-size: 11px; color: var(--text-4); }

/* ===== 单日期/日期时间选择器(系统统一组件)
 * 标记契约: .date-picker[data-dp-init] > [data-dp-display] + .input-clear-btn[data-dp-clear]
 *                                + input[type=date|datetime-local] (隐藏的原生输入, 仍是取值载体)
 *                                + .dual-calendar.single-calendar[data-dp-calendar]
 * 由 core.js 的 FQA.initDatePicker() 自动包裹系统内所有 date / datetime-local 输入框。 */
.date-picker { position: relative; width: 100%; }
.date-picker [data-dp-display] {
    width: 100%; cursor: pointer; padding-right: 28px;
    font-variant-numeric: tabular-nums;
}
.date-picker [data-dp-display].is-empty { color: var(--text-4); }
.date-picker [data-dp-display][disabled] { cursor: not-allowed; }
/* 隐藏的原生输入：仍参与表单提交与校验，只是不可见 */
.date-picker .date-picker-native {
    position: absolute; inset: 0; width: 100%; height: 100%;
    opacity: 0; pointer-events: none; border: 0; padding: 0; margin: 0;
}
/* 日历图标（叠在展示框右侧，清除按钮出现时自动让位） */
.date-picker .dp-icon {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    display: inline-flex; align-items: center; justify-content: center;
    width: 14px; height: 14px; color: var(--text-3); pointer-events: none;
    transition: opacity .15s;
}
.date-picker .dp-icon svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }
.date-picker .input-clear-btn.show ~ .dp-icon { opacity: 0; }
/* 单月版：只显示一个月，宽度收窄 */
.single-calendar { padding: 12px; }
.single-calendar .cal-month { min-width: 224px; }
.single-calendar .cal-day { height: 30px; font-size: 12.5px; }
.single-calendar.dp-with-time { min-width: 300px; }

/* 顶部年月导航：« 年 ‹ 月  标题  › 月 » 年
 * 注意：不复用 .cal-nav（那是给双月范围选择器做绝对定位的），这里用 flex 排布 */
.single-calendar .dp-head {
    display: flex; align-items: center; gap: 2px; margin-bottom: 8px;
}
.single-calendar .dp-nav {
    display: inline-flex; align-items: center; justify-content: center;
    width: 24px; height: 24px; flex: none;
    border: 1px solid transparent; border-radius: var(--radius-sm);
    color: var(--text-2); cursor: pointer; font-size: 13px; line-height: 1;
    transition: all var(--transition);
}
.single-calendar .dp-nav:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-1); }
.single-calendar .dp-title {
    flex: 1; text-align: center; font-size: 13px; font-weight: 600; color: var(--text-1);
    padding: 3px 0; border-radius: var(--radius-sm); cursor: pointer; white-space: nowrap;
    transition: all var(--transition);
}
.single-calendar .dp-title:hover { background: var(--primary-1); color: var(--primary); }
.single-calendar .dp-title::after {
    content: ''; display: inline-block; margin-left: 4px; vertical-align: 1px;
    border-left: 3.5px solid transparent; border-right: 3.5px solid transparent;
    border-top: 4px solid currentColor; opacity: .55;
}

/* 年月快速选择面板（点标题进入） */
.single-calendar .dp-mpanel { min-width: 224px; }
.single-calendar .dp-mpanel-head {
    display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px;
}
.single-calendar .dp-mpanel-year { flex: 1; text-align: center; font-size: 13px; font-weight: 600; color: var(--text-1); }
.single-calendar .dp-mpanel-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.single-calendar .dp-mcell {
    text-align: center; padding: 7px 0; font-size: 12.5px; border-radius: var(--radius-sm);
    color: var(--text-1); cursor: pointer; border: 1px solid transparent;
    transition: all var(--transition);
}
.single-calendar .dp-mcell:hover { background: var(--primary-1); color: var(--primary); border-color: var(--primary-5, var(--primary)); }
.single-calendar .dp-mcell.is-cur { background: var(--primary); color: #fff; font-weight: 600; }
/* 禁用日期（超出 min/max） */
.single-calendar .cal-day.disabled,
.single-calendar .cal-day.disabled:hover {
    color: var(--text-4); background: transparent; cursor: not-allowed; opacity: .45;
}
/* 时间选择行（datetime-local / time）
 * 外观对齐系统统一表单控件（同 .form-input / .form-select 的高度、描边、圆角、字号），
 * 用自绘箭头替代各平台不一致的原生下拉外观。 */
.dp-time {
    display: flex; align-items: center; justify-content: flex-start; gap: 8px;
    margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border-1);
    font-size: 12px; color: var(--text-2); white-space: nowrap;
}
.dp-time-label { color: var(--text-3); flex: none; }
/* 时/分：用系统统一的 .form-select → input-with-dropdown，
 * 弹出层就是系统通用 .dropdown-list（不再用各平台不一致的原生 select 下拉） */
.dp-time-pick { position: relative; display: inline-flex; width: 72px; flex: none; }
.dp-time-pick .input-with-dropdown { width: 100%; }
.dp-time-pick .input-with-dropdown input[type="text"] {
    height: 30px; padding: 0 22px 0 8px; text-align: center;
    font-size: 13px; font-variant-numeric: tabular-nums; cursor: pointer;
}
/* 只读态：仍可点击展开下拉，别套用"禁用灰" */
.dp-time-pick .input-with-dropdown input[type="text"][readonly] {
    background: var(--bg-1); color: var(--text-1); cursor: pointer;
}
/* 自绘下拉箭头（原生 select 已隐藏，补一个可发现性提示） */
.dp-time-pick::after {
    content: ''; position: absolute; right: 9px; top: 50%; margin-top: -2px;
    width: 0; height: 0; pointer-events: none;
    border-left: 4px solid transparent; border-right: 4px solid transparent;
    border-top: 5px solid var(--text-3);
}
.dp-time-pick .input-with-dropdown .dropdown-list { max-height: 168px; }
.dp-time-pick .input-with-dropdown .dropdown-list li { text-align: center; padding: 5px 8px; }
.dp-time-sep { color: var(--text-3); flex: none; }
/* 纯时间版：不显示日历，弹层收窄 */
.single-calendar.dp-time-only { padding: 10px 12px; }
.single-calendar.dp-time-only .cal-footer { margin-top: 8px; padding-top: 8px; }

/* 底栏快捷操作 */
.dp-link {
    border: none; background: transparent; cursor: pointer;
    font-size: 12px; color: var(--primary); padding: 0 2px;
}
.dp-link:hover { text-decoration: underline; }
.dp-foot-actions { display: inline-flex; align-items: center; gap: 10px; flex: none; }
/* 底栏：值在左（过长省略），按钮在右固定，避免挤成两行 */
.single-calendar .cal-footer { gap: 10px; }
.single-calendar .cal-hint {
    flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.single-calendar .cal-tip { margin-top: 6px; text-align: left; }
/* 「确认」按钮：带时间的字段用它收尾（选完日期后点它关闭） */
.dp-ok {
    border: 1px solid var(--primary); background: var(--primary); color: #fff;
    cursor: pointer; font-size: 12px; line-height: 1;
    padding: 5px 12px; border-radius: var(--radius-sm);
    transition: all var(--transition);
}
.dp-ok:hover { opacity: .88; }
.dp-ok.dp-ok-active { box-shadow: 0 0 0 3px rgba(22,119,255,.18); }

/* 列表表格区: flex:1撑满剩余空间,仅此区域滚动 */
.list-table-wrap { flex: 1; overflow: auto; border: 1px solid var(--border-1); border-radius: var(--radius-lg); min-height: 200px; }
/* 表格宽度自适应内容(不锁死),列宽由内容决定,保证完整展示;超出时由容器横向滚动 */
.list-table-wrap .data-table,
.list-body .data-table { table-layout: auto; width: max-content; min-width: 100%; }
.list-table-wrap .data-table th,
.list-table-wrap .data-table td,
.list-body .data-table th,
.list-body .data-table td { white-space: nowrap; }

/* 吸附左侧列 - 实心底色防重叠 */
/* 第1列 left:0; 第2/3/4列偏移由JS测量前序列实际宽度后写入 --sticky-left-2 / --sticky-left-3 / --sticky-left-4 */
.list-table-wrap .data-table .col-sticky-left,
.list-body .data-table .col-sticky-left { position: sticky; z-index: 3; }
.list-table-wrap .data-table .col-sticky-left--1,
.list-body .data-table .col-sticky-left--1 { left: 0; }
.list-table-wrap .data-table .col-sticky-left--2,
.list-body .data-table .col-sticky-left--2 { left: var(--sticky-left-2, 130px); }
.list-table-wrap .data-table .col-sticky-left--3,
.list-body .data-table .col-sticky-left--3 { left: var(--sticky-left-3, 300px); }
.list-table-wrap .data-table .col-sticky-left--4,
.list-body .data-table .col-sticky-left--4 { left: var(--sticky-left-4, 460px); }
.list-table-wrap .data-table thead .col-sticky-left,
.list-body .data-table thead .col-sticky-left { background: var(--bg-2); z-index: 4; }

/* 吸附右侧操作列 - 实心底色防重叠 */
.list-table-wrap .data-table .col-sticky-right,
.list-body .data-table .col-sticky-right { position: sticky; right: 0; z-index: 3; }
.list-table-wrap .data-table thead .col-sticky-right,
.list-body .data-table thead .col-sticky-right { background: var(--bg-2); z-index: 4; }

/* 吸附列阴影分隔线 */
.list-table-wrap .data-table .col-sticky-left::after,
.list-body .data-table .col-sticky-left::after { content: ''; position: absolute; top: 0; right: -6px; bottom: 0; width: 6px; background: linear-gradient(to right, rgba(0,0,0,0.06), transparent); pointer-events: none; }
.list-table-wrap .data-table .col-sticky-right::before,
.list-body .data-table .col-sticky-right::before { content: ''; position: absolute; top: 0; left: -6px; bottom: 0; width: 6px; background: linear-gradient(to left, rgba(0,0,0,0.06), transparent); pointer-events: none; }

/* 弹窗内宽数据表固定列(费用审核等)：左右两端吸附、中间横向滚动。
 * 关键：吸附单元格必须有不透明底图，否则横向滚动时后面的内容会"透"过来交错显示。
 * z-index 必须高于 .input-clear-btn(z-index:5)，否则被滚动列里输入框的清除按钮"×"盖住。
 * 偏移量用实线边框分隔，不用渐变阴影（用户要求右侧不要阴影）。 */
.modal .data-table .col-sticky-left { position: sticky; z-index: 6; }
.modal .data-table .col-sticky-left--1 { left: 0; }
.modal .data-table .col-sticky-left--2 { left: var(--sticky-left-2, 130px); }
.modal .data-table .col-sticky-left--3 { left: var(--sticky-left-3, 300px); }
.modal .data-table .col-sticky-left--4 { left: var(--sticky-left-4, 460px); }
.modal .data-table thead .col-sticky-left { background: var(--bg-2); z-index: 7; }
.modal .data-table .col-sticky-right { position: sticky; z-index: 6; }
.modal .data-table .col-sticky-right--1 { right: 0; }
.modal .data-table .col-sticky-right--2 { right: var(--sticky-right-2, 90px); }
.modal .data-table .col-sticky-right--3 { right: var(--sticky-right-3, 170px); }
.modal .data-table thead .col-sticky-right { background: var(--bg-2); z-index: 7; }
/* 吸附单元格内的下拉展开时，把该单元格提到最上层，否则下拉会被下一行的吸附列盖住 */
.modal .data-table td.col-sticky-left:focus-within,
.modal .data-table td.col-sticky-right:focus-within { z-index: 30; }
/* 吸附边界用 1px 实线，不用阴影 */
.ops-charge-modal .ops-charge-table .col-sticky-left--3 { border-right: 1px solid var(--border-2); }
.ops-charge-modal .ops-charge-table .col-sticky-right--3 { border-left: 1px solid var(--border-2); }
/* 弹窗内动态行表格：与订单新建/编辑页一致的行内控件尺寸 */
.modal .data-table td .td-input,
.modal .data-table td .form-select { height: 30px; font-size: 13px; }
.modal .data-table td .td-check { width: 16px; height: 16px; }

/* ===== 费用审核弹窗（订单操作中心）：应收在上、应付在下，行内控件与订单新建/编辑同款 ===== */
.ops-charge-modal { display: flex; flex-direction: column; }
/* 费用审核弹窗：去掉 modal-body 顶部内边距，让吸顶的利润汇总条紧贴滚动区顶部。
   否则 modal-body 有 20px padding，滚动时内容会从吸顶条上方那道缝隙"穿过"来（上下交替显示）。 */
.modal-body--flush { padding-top: 0 !important; }
/* 弹窗顶部吸顶的利润汇总（收入/成本/毛利/毛利率）—— 与订单新建/编辑页底部汇总同一口径 */
.ops-charge-profit {
    position: sticky; top: 0; z-index: 20;
    display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
    padding: 10px 16px; margin: 0 0 10px;
    background: var(--bg-1); border: 1px solid var(--border-1);
    border-radius: var(--radius-md); box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    font-size: 13px; color: var(--text-2);
}
.ops-charge-profit__item { display: inline-flex; align-items: baseline; gap: 4px; white-space: nowrap; }
.ops-charge-profit__item b { font-size: 15px; font-weight: 700; color: var(--text-1); }
.ops-charge-profit__item b.is-negative { color: var(--danger, #dc2626); }
/* 区块标题行：左标题 + 右侧「通过 / 增加行」按钮 */
.ops-charge-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 6px 0 8px; }
.ops-charge-head__title { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--text-1); }
.ops-charge-head__title svg { width: 15px; height: 15px; color: var(--primary); }
.ops-charge-head__total { font-size: 12px; font-weight: 400; color: var(--text-2); }
.ops-charge-head__actions { display: flex; align-items: center; gap: 8px; }
/* 金额提示条（参考其他系统：应收/应付总金额） */
.ops-charge-summary { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--text-1); background: var(--primary-1); border: 1px solid var(--primary-2); border-radius: var(--radius-md); padding: 7px 12px; margin-bottom: 6px; }
.ops-charge-summary svg { width: 14px; height: 14px; color: var(--primary); }
.ops-charge-summary b { color: var(--primary-7); }
.ops-charge-summary .ops-charge-head__total { padding-left: 12px; border-left: 1px solid var(--primary-2); }
.ops-charge-scroll { max-width: 100%; }
/* 固定列宽 + 整表定宽：宽度不够时容器横向滚动，左右两端吸附列保持可见。
   下面的 left/right 偏移量 = 前面各吸附列宽度之和，改列宽时需同步改这里。 */
.ops-charge-modal .ops-charge-table { table-layout: fixed; width: 2410px; min-width: 2410px; }
.ops-charge-table th, .ops-charge-table td { white-space: nowrap; }
.ops-charge-table .col-no { width: 46px; text-align: center; }
.ops-charge-table .col-charge { width: 160px; }
.ops-charge-table .col-settle { width: 180px; }
.ops-charge-table .col-nature { width: 110px; }
.ops-charge-table .col-policy { width: 110px; }
.ops-charge-table .col-billto { width: 180px; }
.ops-charge-table .col-actual { width: 180px; }
.ops-charge-table .col-sdate { width: 130px; }
.ops-charge-table .col-pay { width: 100px; }
.ops-charge-table .col-bu { width: 110px; }
.ops-charge-table .col-cc { width: 150px; }
.ops-charge-table .col-rate { width: 90px; }
.ops-charge-table .col-qty { width: 90px; }
.ops-charge-table .col-price { width: 90px; }
.ops-charge-table .col-taxr { width: 80px; }
.ops-charge-table .col-amt { width: 110px; }
.ops-charge-table .col-taxa { width: 110px; }
.ops-charge-table .col-inc { width: 56px; }
.ops-charge-table .col-note { width: 150px; }
.ops-charge-table .col-checkbox { width: 40px; text-align: center; }
.ops-charge-table .col-review { width: 64px; text-align: center; }
.ops-charge-table .col-actions { width: 72px; text-align: center; }
/* 吸附列精确偏移（= 各吸附列渲染宽度累加；改上面列宽时必须同步改这里）
   左吸附：No.(46) → 费用名称(160) → 结算单位(180)
   右吸附：操作(72) → 审核(64) → 审核选择框(40)
   注意选择器要压过上面通用的 .modal .data-table .col-sticky-left--N，否则会退回默认值导致滚动时错位。 */
.ops-charge-modal .ops-charge-table .col-sticky-left--1 { left: 0; }
.ops-charge-modal .ops-charge-table .col-sticky-left--2 { left: 46px; }
.ops-charge-modal .ops-charge-table .col-sticky-left--3 { left: 206px; }
.ops-charge-modal .ops-charge-table .col-sticky-right--1 { right: 0; }
.ops-charge-modal .ops-charge-table .col-sticky-right--2 { right: 72px; }
.ops-charge-modal .ops-charge-table .col-sticky-right--3 { right: 136px; }
.ops-charge-table td .td-input,
.ops-charge-table td .form-select { width: 100%; min-width: 0; }
/* 清除按钮(×)是绝对定位在输入框右侧的，td-input 默认 padding-right 只有 8px 会被压住数字 */
.ops-charge-table .input-clear-wrap .td-input { padding-right: 22px; }
/* 清除按钮统一为系统弹窗内动态子表的紧凑尺寸（与 .modal .dynamic-table-wrap 一致） */
.ops-charge-table .input-clear-btn { width: 16px; height: 16px; font-size: 10px; right: 4px; }
/* 只读(已审核通过)行的输入框样式 */
.ops-charge-table .td-input[disabled],
.ops-charge-table .form-select[disabled] { background: var(--bg-3); color: var(--text-2); cursor: not-allowed; }
.ops-charge-table .ops-charge-del { color: var(--danger); }
.ops-charge-table .ops-charge-del:hover { background: var(--danger); color: #fff; }
.ops-charge-table .col-actions .btn-link { font-size: 12px; }

/* 操作节点批量操作条（勾选节点后出现） */
.ops-node-batch-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 12px; margin-bottom: 8px; background: var(--primary-1); border: 1px solid var(--primary-2); border-radius: var(--radius-md); }
.ops-node-batch-bar__count { font-size: 13px; color: var(--text-1); }
.ops-node-batch-bar__count b { color: var(--primary); }
.ops-node-batch-bar__sep { width: 1px; height: 18px; background: var(--primary-2); }

/* ===== 通用「动态行」区块：弹窗内编辑子表复用表单页(.form-page)同一套版式 ——
   区块标题 + 添加按钮 + .dynamic-table-wrap 表格 + .td-input（见上方 .modal 区块）。
   旧的 .section-rows/.ops-charge-head 表格版式已废弃移除。 ===== */

/* 字段型分区里的整行字段（如订单备注 textarea） */
.form-page .form-group--full,
.modal .form-group--full { flex: 1 1 100%; max-width: 100%; }
.form-page .form-group--full .form-textarea,
.modal .form-group--full .form-textarea { width: 100%; }
/* 分区编辑弹窗：字段区左右留白与详情页一致 */
.section-edit-form { display: flex; flex-direction: column; }
.section-edit-form .form-row { margin-bottom: 12px; }

/* 列表页分页区(固定底部) */
/* 列表页分页区(固定底部): 仅作容器, 内部布局由 .pagination 负责 */
.list-pagination { flex: none; background: var(--bg-2); border-top: 1px solid var(--border-1); }
.list-pagination .pagination { padding: 8px 14px; }

/* 列表页序号列(No.) */
.list-table-wrap .data-table .col-no,
.list-body .data-table .col-no { width: 52px; text-align: center; color: var(--text-3); font-variant-numeric: tabular-nums; }
.list-table-wrap .data-table thead .col-no,
.list-body .data-table thead .col-no { color: var(--text-2); font-variant-numeric: normal; }

/* 列表页合计行(tfoot): 固定在表格区底部, 纵向滚动时始终可见(系统统一)
 * 横向滚动时靠 col-sticky-left / col-sticky-right 保持左右两端固定 */
.list-table-wrap .data-table tfoot td,
.list-body .data-table tfoot td {
    position: sticky; bottom: 0; z-index: 3;
    background: var(--bg-2); border-top: 1px solid var(--border-1);
}
.list-table-wrap .data-table tfoot td.col-sticky-left,
.list-body .data-table tfoot td.col-sticky-left { z-index: 5; background: var(--bg-2); }
.list-table-wrap .data-table tfoot td.col-sticky-right,
.list-body .data-table tfoot td.col-sticky-right { z-index: 5; background: var(--bg-2); }

/* ===== 图片本地上传(组织/公司/人事等模块) =====
 * 隐藏域存 URL + 选择按钮 + 缩略图预览；表格单元格内与表单行内通用 */
.cell-img { display: flex; align-items: center; gap: 8px; }
.cell-img .img-prev {
    width: 28px; height: 28px; object-fit: contain; flex: none;
    border: 1px solid var(--border-1); border-radius: 4px; background: var(--bg-3);
}
.cell-img .img-prev[src=""], .cell-img .img-prev:not([src]) { visibility: hidden; }
.cell-img--lg .img-prev { width: 40px; height: 40px; }
.cell-img .btn { flex: none; }

/* ===== 兼容层: 旧版列表页容器(.table-wrapper) 对齐标准列表页 =====
 * 由 core.js 的 FQA.normalizeLegacyList() 在渲染后补齐 .list-page/.list-table-wrap/.list-pagination，
 * 这里只负责尺寸与边框细节，使老页面也具备"筛选固定 + 表头吸顶 + 分页吸底"。 */
.app-content > .table-wrapper.list-page { height: calc(100% - var(--content-padding)); }
.table-wrapper.list-page > .table-toolbar { flex: none; }
.table-wrapper.list-page > .list-table-wrap { flex: 1; min-height: 160px; border: none; border-radius: 0; }
.table-wrapper.list-page > .list-pagination { flex: none; }
.table-wrapper.list-page > .empty-state { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; }

/* 行内模式: 表格只是页面中的一段(前后还有搜索条/分页), 只给表格区加滚动与吸顶表头 */
.table-wrapper.list-page-inline > .list-table-wrap { max-height: 62vh; min-height: 160px; border: none; border-radius: 0; }
.table-wrapper.list-page-inline > .empty-state { padding: 32px 0; }

/* 列表页辅助样式 */
.order-no-link { color: var(--primary); text-decoration: none; cursor: pointer; }
.order-no-link:hover { text-decoration: underline; }
.profit-negative { color: var(--danger); }

/* 页头(表单页/详情页/编辑页统一) */
.page-header {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; flex-wrap: wrap; margin-bottom: 16px;
}
.page-title { margin: 0; font-size: 18px; font-weight: 600; color: var(--text-1); }
.page-actions { display: flex; align-items: center; gap: 8px; }

/* 金额单元格(前置币种代码; 多币种时每个币种一行) */
.data-table .money { text-align: right; white-space: nowrap; }
.money .cur { color: var(--text-3); font-size: 11px; font-weight: 500; }
.money .amt { font-weight: 600; }
.money .amt-line { display: inline-block; }

/* ===== 打印: 只输出内容区(查看页等可直接打印, 内部Tab全部展开) ===== */
@media print {
    .sidebar, .app-header, .app-tabs, .app-footer, .breadcrumb,
    .card-header-actions, .card-header-meta, .copy-icon-btn, .tabs__nav, .no-print { display: none !important; }
    html, body { background: #fff !important; }
    .app-layout, .main-area { display: block !important; overflow: visible !important; height: auto !important; padding: 0 !important; margin: 0 !important; }
    /* 页边距由内容区 padding 提供(@page margin 为 0, 才不会打印浏览器自带的页眉页脚) */
    .app-content { display: block !important; overflow: visible !important; height: auto !important; padding: 10mm !important; margin: 0 !important; }
    .list-page { height: auto !important; overflow: visible !important; }
    .card { border: none !important; box-shadow: none !important; }
    .card-body { padding: 0 !important; }
    .sticky-card > .card-header { position: static !important; }
    .sticky-card > .card-header::before { display: none !important; }
    .tabs__pane { display: block !important; }
    .tabs__pane + .tabs__pane { margin-top: 18px; }
    .stat-grid { grid-template-columns: repeat(4, 1fr) !important; }
    .data-table { font-size: 12px; }
}

/* ===== 仅打印可见 / 仅屏幕可见 ===== */
.print-only { display: none; }
.od-print-header { margin-bottom: 12px; }
.od-print-header h1 { font-size: 18px; margin: 0 0 6px; color: var(--text-1); }
.od-print-meta { font-size: 12px; color: var(--text-2); line-height: 1.9; }
@media print {
    .print-only { display: block !important; }
    .od-print-header h1 { font-size: 18px; }
    .save-bar, .modal-mask { display: none !important; }
    .tabs__pane + .tabs__pane { page-break-before: auto; }
    .section-title { page-break-after: avoid; }
    tr, .stat-card { page-break-inside: avoid; }
}

/* ===== 区块标题右侧的操作组(附件上传等) ===== */
.form-page .section-title .section-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.form-page .section-title .section-select {
    width: auto; height: 24px; font-size: 12px; padding: 0 6px; line-height: 1;
}

/* ===== 左右分栏配置页(系统设置 / 权限中心 等复用) =====
   左侧竖向分类导航 + 右侧内容区(内容区自带吸顶标题与吸底操作栏) */
.split-layout { display: grid; grid-template-columns: 240px 1fr; gap: 16px; height: calc(100vh - 130px); overflow: hidden; }
/* 与标准列表页(.list-page)对齐：顶部留白一致 + 高度按内容区计算，
   页头/左侧页签固定不动、仅右侧内容区滚动，避免出现"顶部直接吸顶"的不一致观感 */
.app-content > .split-layout { margin-top: var(--content-padding); height: calc(100% - var(--content-padding)); }
.split-nav { display: flex; flex-direction: column; overflow: hidden; }
.split-nav .card-body { overflow-y: auto; flex: 1; }
.split-nav-item {
    display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: var(--radius-sm);
    font-size: 13px; color: var(--text-2); margin-bottom: 2px; cursor: pointer; text-decoration: none;
    transition: all 120ms;
}
.split-nav-item:hover { background: var(--bg-3); color: var(--text-1); }
.split-nav-item.active { color: var(--primary); background: var(--primary-1); }
/* 分栏导航项右侧的悬浮操作按钮(编辑/删除等)，hover 或选中时显示 */
.split-nav-item__actions { margin-left: auto; display: none; align-items: center; gap: 2px; }
.split-nav-item:hover .split-nav-item__actions,
.split-nav-item.active .split-nav-item__actions { display: inline-flex; }
.split-nav-item__actions button {
    display: inline-flex; align-items: center; justify-content: center;
    width: 22px; height: 22px; padding: 0; border: none; border-radius: var(--radius-sm);
    background: transparent; color: var(--text-3); cursor: pointer;
    transition: background var(--transition), color var(--transition);
}
.split-nav-item__actions button svg { width: 13px; height: 13px; }
.split-nav-item__actions button:hover { background: var(--primary); color: #fff; }
.split-nav-item__actions button.action-delete:hover { background: var(--danger); color: #fff; }
.split-nav-item__label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.split-nav-item__meta { font-size: 11px; color: var(--text-4); flex-shrink: 0; }
.split-content { display: flex; flex-direction: column; overflow: hidden; }
/* 页头不吸顶（设计文档 §13.2 页面标题区未定义吸顶）：
   右侧内容区为固定高度的 flex 列，card-header 作为 flex 子项本身就不会被滚走，
   额外的 position:sticky 反而与系统统一布局不一致。 */
.split-content > .card-header { flex-shrink: 0; }
.split-body { flex: 1; overflow-y: auto; padding: 20px 20px 0; }
/* 分栏内容区里的「列表页」：筛选固定 + 表格内滚 + 分页吸底(复用系统列表组件) */
.split-body--list { display: flex; flex-direction: column; overflow: hidden; padding: 10px 20px 0; }
.split-body--list > .list-filters { flex: none; }
.split-body--list > .list-table-wrap { flex: 1; min-height: 120px; }
.split-body--list > .list-pagination { flex: none; margin-top: 0; }
.split-content > .save-bar {
    flex-shrink: 0; position: sticky; bottom: 0; background: var(--bg-1);
    padding: 12px 20px; border-top: 1px solid var(--border-1); text-align: right; z-index: 1;
}
@media screen and (max-width: 991px) {
    .split-layout { grid-template-columns: 1fr; height: auto; overflow: visible; }
    .split-nav, .split-content { overflow: visible; }
    .split-body { overflow: visible; }
}

/* ===== 面包屑下拉箭头 ===== */
.crumb-arrow { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; opacity: .55; }

/* ===== 全局搜索面板（全库检索） ===== */
.gs-wrap { display: flex; flex-direction: column; gap: 8px; }
.gs-input { height: 38px; font-size: 14px; }
.gs-hint { font-size: 12px; color: var(--text-4); }
.gs-results { max-height: 58vh; min-height: 180px; overflow-y: auto; border: 1px solid var(--border-1); border-radius: var(--radius-md); }
.gs-group { padding: 6px 12px; font-size: 12px; color: var(--text-3); background: var(--bg-2); position: sticky; top: 0; z-index: 1; }
.gs-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; text-decoration: none; color: var(--text-1); border-bottom: 1px solid var(--border-1); }
.gs-item:last-child { border-bottom: none; }
.gs-item:hover, .gs-item.is-active { background: var(--primary-1); color: var(--primary); }
.gs-item-icon { display: inline-flex; width: 18px; height: 18px; flex: none; color: var(--text-3); }
.gs-item-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.gs-item:hover .gs-item-icon, .gs-item.is-active .gs-item-icon { color: var(--primary); }
.gs-item-body { display: flex; flex-direction: column; min-width: 0; }
.gs-item-title { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-item-sub { font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-foot { font-size: 12px; color: var(--text-4); text-align: right; }
.gs-foot b { color: var(--primary); }
.gs-loading { display: inline-block; width: 12px; height: 12px; margin-right: 6px; vertical-align: -1px;
    border: 2px solid var(--border-2); border-top-color: var(--primary); border-radius: 50%;
    animation: gsSpin 700ms linear infinite; }
@keyframes gsSpin { to { transform: rotate(360deg); } }
/* 全库搜索弹窗：宽一点，长标题不被截断 */
.modal-mask.fqa-global-search .modal--lg { width: 860px; }

/* ===== 权限勾选树(角色授权 / 权限分配, 系统通用) ===== */
.perm-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.perm-tree {
    border: 1px solid var(--border-1); border-radius: var(--radius-md);
    padding: 8px 12px; max-height: 360px; overflow-y: auto; background: var(--bg-1);
}
.perm-mod { padding: 6px 0; border-bottom: 1px dashed var(--border-1); }
.perm-mod:last-child { border-bottom: none; }
.perm-mod-head {
    display: flex; align-items: center; gap: 6px; cursor: pointer;
    font-weight: 600; font-size: 13px; color: var(--text-1); padding: 2px 0;
}
.perm-items { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 6px 0 2px 22px; }
.perm-item { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; font-size: 13px; color: var(--text-2); }
.perm-item:hover { color: var(--primary); }
.perm-item em { font-style: normal; font-size: 11px; color: var(--text-3); }

/* ===== 权限矩阵(表格化勾选, 角色授权专用) ===== */
.perm-matrix-wrap {
    border: 1px solid var(--border-1); border-radius: var(--radius-lg);
    overflow: auto; max-height: 460px; background: var(--bg-1);
}
.perm-matrix { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.perm-matrix th,
.perm-matrix td { padding: 6px 10px; border-bottom: 1px solid var(--border-1); white-space: nowrap; vertical-align: middle; }
.perm-matrix thead th {
    position: sticky; top: 0; z-index: 2;
    background: var(--bg-2); font-weight: 500; color: var(--text-2);
    text-align: center; font-size: 12px;
}
.perm-matrix thead th.perm-matrix-title { text-align: left; }
.perm-matrix tbody tr:hover { background: var(--bg-3); }
.perm-matrix .perm-matrix-group td {
    background: var(--bg-3); font-weight: 600; color: var(--text-1); font-size: 13px;
}
.perm-matrix .perm-matrix-group .perm-group-count { font-weight: 400; color: var(--text-3); margin-left: 8px; font-size: 12px; }
.perm-matrix .perm-matrix-res { color: var(--text-1); }
.perm-matrix .perm-cell { text-align: center; }
.perm-matrix .perm-cell .perm-none { color: var(--text-4, var(--text-3)); }
.perm-matrix .perm-others { display: flex; flex-wrap: wrap; gap: 2px 10px; }
.perm-matrix .perm-item-sm { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; color: var(--text-2); cursor: pointer; }
.perm-matrix .perm-item-sm:hover { color: var(--primary); }

/* ===== 键值信息区块(.stmt-*) —— 对账单 / 审批详情弹窗 等通用只读展示组件 ===== */
.stmt-head {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 16px; flex-wrap: wrap; row-gap: 8px;
    padding-bottom: 12px; margin-bottom: 14px; border-bottom: 2px solid var(--primary);
}
.stmt-head > div { min-width: 0; }
.stmt-head h1 { font-size: 20px; margin: 0 0 4px; color: var(--text-1); }
.stmt-sub { font-size: 12px; color: var(--text-3); }
.stmt-head-right { text-align: right; font-size: 12px; color: var(--text-2); line-height: 2; }
.stmt-head-right span { color: var(--text-3); }

.stmt-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.stmt-block {
    border: 1px solid var(--border-1); border-radius: var(--radius-lg);
    padding: 12px 14px; background: var(--bg-1);
}
.stmt-block-title {
    font-size: 13px; font-weight: 600; color: var(--primary);
    margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px dashed var(--border-1);
}
.stmt-kv { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; line-height: 1.9; }
.stmt-kv > span { color: var(--text-3); flex: none; min-width: 56px; }
.stmt-kv > b { color: var(--text-1); font-weight: 500; word-break: break-word; min-width: 0; flex: 1 1 auto; overflow-wrap: anywhere; }

/* ===== 统一审批处理弹窗(.ah-*) —— 审批内容/前后对比/流程节点 一屏看全（2026-10-12） ===== */
.ah-meta {
    display: flex; flex-wrap: wrap; align-items: center; gap: 4px 2px;
    font-size: 13px; color: var(--text-2);
    padding: 10px 12px; margin-bottom: 10px;
    background: var(--bg-3); border: 1px solid var(--border-1); border-radius: var(--radius-lg);
}
.ah-meta b { color: var(--text-1); }
.ah-kv-grid {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 24px;
}
.ah-kv-grid .stmt-kv > span { min-width: 88px; }
.ah-diff .ah-old { color: var(--danger, #c0392b); }
.ah-diff .ah-old:not(:empty)::before { content: ' '; }
.ah-diff .ah-new { color: var(--success, #1e8e5a); font-weight: 500; }
@media screen and (max-width: 900px) { .ah-kv-grid { grid-template-columns: 1fr; } }

.stmt-total-row td { background: var(--bg-3); }
.stmt-foot {
    display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; row-gap: 10px;
    margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border-1);
    font-size: 13px; color: var(--text-2);
}
.stmt-remark { flex: 1 1 260px; min-width: 0; }
.stmt-sign { flex: none; text-align: right; line-height: 2.6; }
.stmt-sign i { display: inline-block; width: 120px; border-bottom: 1px solid var(--border-2); }

@media screen and (max-width: 1000px) { .stmt-grid { grid-template-columns: 1fr; } }
@media print {
    .stmt-grid { grid-template-columns: repeat(3, 1fr) !important; }
    .order-statement-page .card-body { padding: 0 !important; }
}

/* ===== 条件表达式可视化向导(.cond-wizard) —— 通用：逻辑 + 字段 + 运算符 + 值 的傻瓜式条件构建器 =====
   用于「数据范围=条件表达式」等场景，字段/值下拉统一走系统 .form-select → input-with-dropdown，
   宽度用栅格列控制，避免各控件忽宽忽窄、内容被裁切。 */
.cond-wizard { display: flex; flex-direction: column; gap: 8px; }
.cond-wizard > .btn { align-self: flex-start; }
.cond-wizard__row {
    display: grid;
    grid-template-columns: 60px minmax(0, 1.15fr) 118px minmax(0, 1.15fr) 32px;
    align-items: center; gap: 8px;
    padding: 8px 10px;
    background: var(--bg-3); border: 1px solid var(--border-1); border-radius: var(--radius-lg);
}
.cond-wizard__row > * { min-width: 0; }
/* 行内所有表单控件铺满所在栅格列（含已转换的 input-with-dropdown / 清除包裹层） */
.cond-wizard__row > .form-select,
.cond-wizard__row > .form-input,
.cond-wizard__row .input-with-dropdown,
.cond-wizard__row .input-clear-wrap { width: 100%; }
.cond-wizard__row .input-with-dropdown input[type="text"] { min-width: 0; }
/* 第一列：首条标记 */
.cond-wizard__lead { color: var(--text-3); font-size: 12px; text-align: center; }
/* 值格：运算符为「为空/不为空」时的占位提示 */
.cond-wizard__none { color: var(--text-3); font-size: 13px; padding-left: 4px; }
/* 删除按钮 */
.cond-wizard__del {
    width: 32px; height: 32px; padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--danger); border-color: var(--border-2); background: var(--bg-1);
}
.cond-wizard__del:hover { background: var(--danger); border-color: var(--danger); color: #fff; }
/* 条件预览 */
.cond-wizard__preview {
    padding: 8px 10px; background: var(--primary-1); border: 1px solid var(--primary-3);
    border-radius: var(--radius-md); font-size: 12px; color: var(--primary-7); line-height: 1.8;
}
.cond-wizard__preview b { color: var(--primary-7); }
.cond-wizard__logic { color: var(--warning); font-weight: 600; }

/* ===== 查看页顶部标志标注(.detail-flags) —— 通用：详情页标题下方展示关键标志标签 ===== */
.detail-flags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.detail-flags .tag { height: 22px; }

/* ===== 只读值里的链接（查看页 网站/邮箱 等，可点击新窗口打开） ===== */
.form-static a { color: var(--primary); text-decoration: none; word-break: break-all; }
.form-static a:hover { text-decoration: underline; }

/* ===== 只读弹窗(.pc-modal-grid)：readonly 输入框也做成「只读观感」 ===== */
.pc-modal-grid .form-input[readonly],
.pc-modal-grid .form-textarea[readonly] { background: var(--bg-3); cursor: default; }

/* ===== 系统级页面水印(.sys-watermark) —— 全系统防泄漏平铺水印，helper.php sys_watermark_html() 输出 ===== */
.sys-watermark {
    position: fixed; inset: 0; z-index: 9999; pointer-events: none; user-select: none;
    background-repeat: repeat; -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
@media print {
    .sys-watermark { display: none; }
}

/* ===== 邮件编辑器(.mail-*) —— 邮件中心「发邮件」弹窗系统级组件 ===== */
/* 头部行：发件账户/优先级/回执 横向排布 */
.mail-headrow { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.mail-headrow .form-group { margin: 0; }
/* 收件人/抄送/密送 行：标签 + 输入 + 联系人按钮 */
.mail-to-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.mail-to-row > label { flex: 0 0 52px; text-align: justify; text-align-last: justify; font-size: 13px; color: var(--text-2); }
.mail-to-row .form-input { flex: 1 1 auto; min-width: 0; }
.mail-to-row .mail-add-btn { flex: 0 0 auto; height: 30px; padding: 0 8px; font-size: 12px; border: 1px solid var(--border-2); border-radius: 6px; background: var(--bg-1); color: var(--text-2); cursor: pointer; display: inline-flex; align-items: center; gap: 3px; }
.mail-to-row .mail-add-btn:hover { color: var(--primary); border-color: var(--primary-3); background: var(--primary-1); }
.mail-to-row .mail-add-btn svg { width: 13px; height: 13px; }
.mail-cc-toggle { font-size: 12px; color: var(--primary); cursor: pointer; user-select: none; flex: 0 0 auto; }
.mail-cc-toggle:hover { text-decoration: underline; }
/* 富文本工具栏 + 正文编辑区 */
.mail-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 6px 8px; border: 1px solid var(--border-2); border-bottom: 0; border-radius: 8px 8px 0 0; background: var(--bg-2); }
.mail-toolbar .mtb { width: 28px; height: 28px; border: 0; border-radius: 6px; background: transparent; color: var(--text-2); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; }
.mail-toolbar .mtb:hover { background: var(--bg-4); color: var(--primary); }
.mail-toolbar .mtb svg { width: 15px; height: 15px; }
.mail-toolbar .mtb-sep { width: 1px; height: 18px; background: var(--border-2); margin: 0 5px; }
.mail-toolbar .mtb-select { height: 28px; border: 1px solid var(--border-2); border-radius: 6px; background: var(--bg-1); font-size: 12px; color: var(--text-1); padding: 0 2px; }
.mail-toolbar .mtb-color { width: 28px; height: 28px; padding: 2px; border: 1px solid var(--border-2); border-radius: 6px; background: var(--bg-1); cursor: pointer; }
.mail-editor { min-height: 240px; max-height: 460px; overflow: auto; border: 1px solid var(--border-2); border-radius: 0 0 8px 8px; padding: 12px 14px; font-size: 14px; line-height: 1.75; color: var(--text-1); background: var(--bg-1); outline: none; word-break: break-word; }
.mail-editor:empty::before { content: attr(data-placeholder); color: var(--text-4); pointer-events: none; }
.mail-editor img { max-width: 100%; }
.mail-editor blockquote { margin: 6px 0; padding: 4px 12px; border-left: 3px solid var(--border-2); color: var(--text-2); }
/* 附件条 */
.mail-attach-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.mail-attach-add { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 10px; font-size: 12px; border: 1px dashed var(--border-2); border-radius: 6px; background: var(--bg-1); color: var(--text-2); cursor: pointer; }
.mail-attach-add:hover { color: var(--primary); border-color: var(--primary-3); }
.mail-attach-add svg { width: 14px; height: 14px; }
.mail-attach-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 240px; height: 30px; padding: 0 10px; border: 1px solid var(--border-1); border-radius: 6px; background: var(--bg-2); font-size: 12px; color: var(--text-2); }
.mail-attach-chip .att-name { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-attach-chip .att-size { color: var(--text-4); }
.mail-attach-chip .att-x { cursor: pointer; color: var(--text-3); display: inline-flex; }
.mail-attach-chip .att-x:hover { color: var(--danger); }
.mail-attach-chip .att-x svg { width: 13px; height: 13px; }
/* 联系人选择弹窗 */
.mail-pick-tabs { display: flex; gap: 4px; margin-bottom: 8px; }
.mail-pick-tabs .mpt { height: 28px; padding: 0 14px; font-size: 13px; border: 1px solid var(--border-2); border-radius: 6px; background: var(--bg-1); color: var(--text-2); cursor: pointer; }
.mail-pick-tabs .mpt--active { color: var(--primary); border-color: var(--primary-3); background: var(--primary-1); font-weight: 600; }
.mail-pick-list { max-height: 330px; overflow: auto; border: 1px solid var(--border-1); border-radius: 8px; }
.mail-pick-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--border-1); cursor: pointer; }
.mail-pick-item:last-child { border-bottom: 0; }
.mail-pick-item:hover { background: var(--bg-3); }
.mail-pick-item input[type="checkbox"] { flex: 0 0 auto; }
.mail-pick-item .mp-name { flex: 0 0 auto; min-width: 72px; font-size: 13px; color: var(--text-1); font-weight: 500; }
.mail-pick-item .mp-email { flex: 1 1 auto; min-width: 0; font-size: 12px; color: var(--text-2); font-family: var(--font-mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-pick-item .mp-extra { flex: 0 0 auto; font-size: 12px; color: var(--text-4); }
.mail-pick-empty { padding: 28px; text-align: center; color: var(--text-3); font-size: 13px; }

/* ===== 系统统一图表组件（FQA.renderChartPanel，纯 SVG 无第三方依赖） =====
 * 结构：.fqa-chart > .fqa-chart__toolbar(类型切换 + 数值列下拉) + .fqa-chart__body + .fqa-chart__foot
 * 用法：FQA.renderChartPanel(el, { type:'table|bar|line|pie', columns:[], rows:[], summary:{}, height:280 })
 * 报表中心「运行报表 / 报表快照」用它渲染「表格/柱状图/折线图/饼图」。 */
.fqa-chart { display: flex; flex-direction: column; gap: 8px; }
.fqa-chart__toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.fqa-chart__types { display: inline-flex; border: 1px solid var(--border-1); border-radius: var(--radius-md); overflow: hidden; background: var(--bg-1); }
.fqa-chart__type {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 5px 10px; font-size: 12px; line-height: 1;
    color: var(--text-2); background: transparent; border: 0; cursor: pointer;
    border-right: 1px solid var(--border-1); white-space: nowrap;
}
.fqa-chart__type:last-child { border-right: 0; }
.fqa-chart__type:hover { color: var(--primary); background: var(--primary-1); }
.fqa-chart__type.is-active { color: #fff; background: var(--primary); }
.fqa-chart__type svg { width: 13px; height: 13px; }
.fqa-chart__measure { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); }
.fqa-chart__measure label { white-space: nowrap; }
.fqa-chart__measure .form-select { min-width: 150px; height: 30px; font-size: 12px; }
.fqa-chart__body { width: 100%; min-height: 80px; padding: 2px 0; }
/* 只让「直角坐标图」的 svg 撑满宽度；饼图的 svg 是固定方形，由属性定尺寸（不能拉满） */
.fqa-chart__body > svg { display: block; width: 100%; height: auto; }
/* ⚠️ 全局图标规则 `svg { stroke: currentColor; stroke-width: 1.5; fill: none }` 是为 <svg> 图标准备的，
 *    但 stroke 是继承属性，会漏进图表 SVG：文字被描边（看起来又粗又糊）、柱子被加一圈深色边。
 *    这里只对「本来就不该描边」的元素显式关掉；线条/圆点/扇形自带 stroke 属性，不受影响。 */
.fqa-chart svg text,
.fqa-chart svg .fqa-chart__bar { stroke: none; }
/* 柱状图：悬停高亮（SVG 元素用 opacity 提示，不做位移避免跳动） */
.fqa-chart__bar { transition: opacity .15s ease-out; }
.fqa-chart__bar:hover { opacity: .82; }
/* 饼图：环形图 + 右侧图例列表（窄屏自动换行到下方；整体居中） */
.fqa-chart__pie { display: flex; align-items: center; justify-content: center; gap: 24px; flex-wrap: wrap; }
.fqa-chart__pie-svg { flex: none; display: block; width: auto; height: auto; max-width: 100%; }
/* ⚠️ 这里的 flex 基线只作用于「宽度」——它是 .fqa-chart__pie-side（纵向 flex）的子项，
 *    写成 `flex: 0 1 440px` 会被当成**高度**基线：图例只有 2 项也被撑到 max-height 268px，
 *    饼图卡片里凭空多出 300px 空白。故高度方向用 auto，超出才靠 max-height 滚动。 */
.fqa-chart__pie-legend {
    flex: 0 0 auto; min-width: 0; max-height: 268px; overflow: auto;
    display: flex; flex-direction: column; gap: 7px;
    margin: 0; padding: 0; list-style: none;
}
.fqa-chart__pie-item { display: flex; align-items: center; gap: 8px; font-size: 12px; line-height: 1.4; }
.fqa-chart__pie-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-1); }
.fqa-chart__pie-val { flex: none; font-family: var(--font-mono); color: var(--text-2); }
.fqa-chart__pie-pct { flex: none; width: 52px; text-align: right; font-family: var(--font-mono); color: var(--text-3); }
.fqa-chart__legend { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 2px 2px 0; }
.fqa-chart__legend-item { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); }
.fqa-chart__legend-dot { width: 10px; height: 10px; border-radius: 2px; flex: none; }
.fqa-chart__empty { padding: 30px; text-align: center; color: var(--text-3); font-size: 13px; }
.fqa-chart__foot { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--text-2); }
.fqa-chart__foot b { font-family: var(--font-mono); }

/* ===== 工作台首页（/dashboard）系统级布局 =====
 * 结构：.dash-page > .dash-hero(欢迎条) + .stat-grid(指标卡) + .card(各功能块)
 *       + .dash-grid(两列自适应) + .dash-list/.dash-money/.dash-msg 等块内列表
 * 说明：全部复用系统既有卡片/标签/表格样式，这里只补「首页专属」的栅格与列表排版，
 *       其它模块做看板页可直接复用这些类。 */
.dash-page { display: flex; flex-direction: column; gap: 14px; }

/* --- 欢迎条 --- */
.dash-hero {
    display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    background: linear-gradient(90deg, var(--primary-1), var(--bg-1) 62%);
    border: 1px solid var(--border-1); border-radius: var(--radius-lg);
    padding: 16px 20px;
}
html.dark .dash-hero { background: linear-gradient(90deg, var(--primary-1), var(--bg-1) 62%); }
.dash-hero__title { font-size: 18px; font-weight: 600; color: var(--text-1); margin-bottom: 6px; }
.dash-hero__sub { font-size: 13px; color: var(--text-2); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dash-hero__sub svg { width: 14px; height: 14px; vertical-align: -2px; }
.dash-hero__scope { display: inline-flex; align-items: center; gap: 4px; color: var(--text-2); }
.dash-hero__todo { color: var(--primary); font-weight: 500; display: inline-flex; align-items: center; gap: 4px; }
.dash-hero__todo b { font-family: var(--font-mono); }
.dash-hero__done { color: var(--success); display: inline-flex; align-items: center; gap: 4px; }
.dash-hero__actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dash-hero__actions .btn svg { width: 15px; height: 15px; }

/* --- 环比标签 --- */
.dash-delta { display: inline-flex; align-items: center; gap: 3px; font-family: var(--font-mono); }
.dash-delta svg { width: 13px; height: 13px; }
.dash-delta--up { color: var(--success); }
.dash-delta--down { color: var(--danger); }
.dash-delta--flat { color: var(--text-3); }
.dash-muted { color: var(--text-3); }

/* --- 两列自适应栅格（保留：行网格，同行卡片会被拉伸对齐） ---
 * align-items:start：卡片各按自身内容高度，不随同行最高的卡片拉伸。
 */
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 14px; align-items: start; }
@media screen and (max-width: 900px) { .dash-grid { grid-template-columns: 1fr; } }

/* --- 两列瀑布布局（首页用）：列内纵向堆叠，卡片紧贴，不留行内空白 --- */
/* ≤1200px 就并成单列：半宽列里放 4 列以上的表格会横向溢出（客户与信用/货物动态），
 * 并成单列后表宽 = 整页宽，反而更整齐。 */
.dash-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.dash-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
@media screen and (max-width: 1200px) { .dash-cols { grid-template-columns: 1fr; } }

/* --- 看板小列表：统一的「列头 + 网格行」表格化排版（首页待办/货物动态共用） ---
 * 列宽由行内 `--cols` 变量给出；**列头与数据行必须用同一份模板**，否则标题与内容错位。
 * 列宽一律给固定值 + 一个 minmax(0,1fr) 自适应列 —— 不能用 auto（各行 auto 宽度不同会错位）。 */
.dash-list { display: flex; flex-direction: column; }
.dash-list-row {
    display: grid; grid-template-columns: var(--cols, minmax(0, 1fr));
    gap: 6px; align-items: center; padding: 5px 6px;
    border-top: 1px dashed var(--border-1); font-size: 12px; min-width: 0;
}
.dash-list-row:first-child { border-top: 0; }
/* ⚠️ 列头与数据行的**左右内边距必须一致**，否则列会整体错位 6px（踩过） */
.dash-list-row--head {
    padding: 3px 6px 5px; border-top: 0; border-bottom: 1px solid var(--border-1);
    font-size: 11px; color: var(--text-3); background: var(--bg-2); margin-bottom: 2px;
}
.dash-list-th { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-list-th--amount, .dash-list-th--time { text-align: right; }
.dash-list-cell { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-list-no   { color: var(--primary); }
.dash-list-bill { color: var(--text-2); }
.dash-list-title { color: var(--text-2); }
.dash-list-sub  { color: var(--text-3); }
.dash-list-amt  { color: var(--text-1); text-align: right; }
.dash-list-time { color: var(--text-4); font-size: 11px; text-align: right; }

/* --- 预警区（订单/费用/业务/审批）：2 列，卡片各按内容高度 --- */
/* 每张预警卡至少 700px：窗口不够宽时自动变单列铺满 —— 否则 5~6 列表格会被挤到内容截断（用户报过两次） */
.dash-alert-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(660px, 1fr)); gap: 14px; align-items: start; }
.dash-alert-grid > .card:last-child:nth-child(odd) { grid-column: 1 / -1; }
@media screen and (max-width: 900px) { .dash-alert-grid { grid-template-columns: 1fr; } }
/* 卡内一个预警分组：计数 + 名称 + 说明 + 全部链接 + 表格 */
.dash-alert { border-top: 1px solid var(--border-1); padding-top: 10px; margin-top: 10px; }
.dash-alert:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.dash-alert__head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; min-width: 0; }
.dash-alert__label { font-size: 13px; font-weight: 600; color: var(--text-1); flex: none; }
.dash-alert__hint { font-size: 12px; color: var(--text-3); flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- 操作预警：节点计数条 --- */
.dash-ops { display: flex; flex-wrap: wrap; gap: 10px; }
.dash-ops__item {
    flex: 0 0 auto; width: 168px; min-width: 0; display: flex; flex-direction: row; align-items: baseline; justify-content: center; gap: 8px;
    padding: 10px 12px; border: 1px solid var(--border-1); border-radius: var(--radius-md);
    background: var(--bg-1); color: var(--text-2); transition: all var(--transition);
}
.dash-ops__item:hover { border-color: var(--primary-3); background: var(--primary-1); color: var(--primary); transform: translateY(-1px); }
.dash-ops__num { font-size: 18px; font-weight: 600; line-height: 1.1; color: var(--text-1); }
.dash-ops__item:hover .dash-ops__num { color: var(--primary); }
.dash-ops__name { font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- 待办节点明细：整行铺满（卡内 9 列，2 列并排会把「承运人/起运港/目的港」压到截断） --- */
.dash-ops-panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(1050px, 1fr)); gap: 14px; align-items: start; }
/* 奇数个面板时最后一个跨满整行，避免右下角空出一格 */
.dash-ops-panels > .card:last-child:nth-child(odd) { grid-column: 1 / -1; }
@media screen and (max-width: 1200px) { .dash-ops-panels { grid-template-columns: 1fr; } }

/* --- 待办/预警计数条（chips）：分组数量与入口，替代原来的「每组一张小卡」 --- */
.dash-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.dash-chip {
    display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px;
    border: 1px solid var(--border-1); border-radius: 9999px; background: var(--bg-1);
    font-size: 12px; color: var(--text-2); transition: all var(--transition);
}
.dash-chip:hover { border-color: var(--primary-3); background: var(--primary-1); color: var(--primary); }
.dash-chip__label { white-space: nowrap; }

/* --- 订单阶段进度 --- */
.dash-phases { display: flex; flex-direction: column; gap: 6px; }
.dash-phase { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.dash-phase__name { flex: none; width: 72px; }
.dash-phase__bar { flex: 1 1 auto; height: 8px; background: var(--bg-4); border-radius: 9999px; overflow: hidden; }
.dash-phase__bar i { display: block; height: 100%; background: var(--primary); border-radius: 9999px; transition: width .4s ease-out; }
.dash-phase__val { flex: none; width: 42px; text-align: right; color: var(--text-2); }

/* --- 财务块 --- */
.dash-money { display: flex; flex-direction: column; gap: 8px; }
.dash-money__row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 13px; }
.dash-money__name { color: var(--text-3); }
.dash-money__val { color: var(--text-1); font-size: 15px; font-weight: 600; }
.dash-money__val--ok { color: var(--success); }
.dash-money__row--danger .dash-money__val { color: var(--danger); }
.dash-money__bar { position: relative; height: 10px; background: var(--bg-4); border-radius: 9999px; overflow: hidden; margin-top: 2px; }
.dash-money__bar i { display: block; height: 100%; background: var(--success); border-radius: 9999px; }
.dash-money__bar span { position: absolute; right: 8px; top: -18px; font-size: 11px; color: var(--text-3); }
.dash-sub { font-size: 12px; color: var(--text-3); margin: 14px 0 8px; padding-top: 10px; border-top: 1px solid var(--border-1); }
.dash-none { font-size: 12px; color: var(--text-3); display: flex; align-items: center; gap: 6px; padding: 6px 0; }
.dash-none svg { width: 14px; height: 14px; color: var(--success); }
/* 看板列表里的「已清零 / 无待办」灰字（右对齐占位，避免该列空掉后行高跳动） */
.dash-times { font-size: 11px; color: var(--text-4); }
.dash-aging { display: flex; flex-wrap: wrap; gap: 8px; }
.dash-aging__item {
    flex: 1 1 120px; display: flex; flex-direction: column; gap: 2px;
    border: 1px solid var(--border-1); border-radius: var(--radius-md); padding: 8px 10px; background: var(--bg-2);
}
.dash-aging__k { font-size: 12px; color: var(--text-3); }
.dash-aging__v { font-size: 14px; font-weight: 600; color: var(--text-1); }
.dash-aging__n { font-size: 11px; color: var(--text-4); }

/* --- 客户/信用 --- */
.dash-kv { display: flex; gap: 10px; flex-wrap: wrap; }
.dash-kv__item {
    flex: 1 1 90px; border: 1px solid var(--border-1); border-radius: var(--radius-md);
    padding: 8px 10px; background: var(--bg-2); display: flex; flex-direction: column; gap: 2px;
}
.dash-kv__item span { font-size: 12px; color: var(--text-3); }
.dash-kv__item b { font-size: 16px; color: var(--text-1); }
/* --- 货物动态 ---
 * 在途订单 / 最近跟踪事件都走上面的 .dash-list 统一表格化排版，
 * 这里只留「状态标签列」的微调（标签不能被省略号裁切）。 */
.dash-list-row .tag { max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }

/* --- 我的消息 --- */
.dash-msg { display: flex; flex-direction: column; }
.dash-msg__item { display: flex; align-items: flex-start; gap: 8px; padding: 9px 20px; border-top: 1px solid var(--border-1); min-width: 0; }
.dash-msg__item:first-child { border-top: 0; }
.dash-msg__item.is-unread { background: var(--primary-1); }
.dash-msg__dot { flex: none; width: 6px; height: 6px; border-radius: 50%; margin-top: 6px; background: var(--border-2); }
.dash-msg__item.is-unread .dash-msg__dot { background: var(--danger); }
.dash-msg__main { flex: 1 1 auto; min-width: 0; }
.dash-msg__title { font-size: 13px; color: var(--text-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-msg__body { font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.dash-msg__time { flex: none; font-size: 11px; color: var(--text-4); }

/* --- 快捷入口 --- */
/* 快捷入口：固定 9 列 —— 超管 18 个刚好 2 行对齐；窄屏降列数 */
.dash-actions { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 10px; }
@media screen and (max-width: 760px) { .dash-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.dash-action {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
    height: 74px; border: 1px solid var(--border-1); border-radius: var(--radius-md);
    background: var(--bg-1); color: var(--text-2); transition: all var(--transition);
}
.dash-action:hover { border-color: var(--primary-3); color: var(--primary); background: var(--primary-1); transform: translateY(-1px); }
.dash-action__ic svg { width: 20px; height: 20px; }
.dash-action__label { font-size: 12px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 首页指标卡：两行各 6 张自适应铺满一行（系统 .stat-grid 默认 4 列，首页指标更多）。
 * 下限 190px：1500 宽下正好 6 列一行（不留孤卡、不浪费一整行）；
 * 指标值「币种 + 金额」不换行，金额过长由省略号兜底。 */
.dash-page .stat-grid { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
/* 首页指标卡内边距略收：一行 6 张时给「币种 + 金额」多留横向空间，避免长金额被省略号截断；
 * 卡片改纵向 flex —— 同一行里「多行文本卡」与「单值卡」高度不同，让底部环比小字始终贴底对齐 */
.dash-page .stat-card { padding: 16px; display: flex; flex-direction: column; }
.dash-page .stat-card .stat-trend { margin-top: auto; padding-top: 8px; }
/* 指标值统一高度：普通值 28px、金额值 20px，字号不同会让底部「环比」小字上下错位（用户报过）。
 * 固定数值行高度（不是 min-height，28px 文字的自然行高会撑到 42px）+ 底对齐
 * → 每张卡的 .stat-trend 严格落在同一水平线上。 */
.dash-page .stat-card .stat-value { height: 38px; display: flex; align-items: flex-end; line-height: 1.2; }
.dash-page .stat-card .stat-value--money { align-items: baseline; line-height: 1.25; }
/* 多行指标值（订单类型 / 箱型这类「名称 + 数量」列表）：高度自适应、内容贴底，与单值卡底部对齐 */
.dash-page .stat-card .stat-value--lines { height: auto; min-height: 38px; flex-direction: column; justify-content: flex-end; align-items: stretch; gap: 2px; }
.stat-value--lines .stat-line { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; min-width: 0; font-size: 12.5px; font-weight: 400; line-height: 1.55; }
.stat-value--lines .stat-line__name { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat-value--lines .stat-line__num { font-family: var(--font-mono, monospace); font-weight: 600; color: var(--text-1); white-space: nowrap; }

/* 饼图右侧：数值列（币种）标题 + 图例列表
 * ⚠️ flex-basis 必须接近图例真实宽度：写 440px 时「饼图(190) + 440」超过容器，
 *    flex-wrap 会按未收缩的基线判定换行 → 图例被挤到饼图下方，卡片白白高出 ~90px。
 *    改成 240px 基线后宽卡片可并排，窄容器才换行（设计本意）。 */
.fqa-chart__pie-side { flex: 1 1 240px; min-width: 220px; display: flex; flex-direction: column; gap: 6px; }
.fqa-chart__pie-caption { font-size: 12px; color: var(--text-3); }

/* 财务往来台账（应收/应付）：紧凑固定列宽 + 允许换行，避免 20+ 列挤压错位 */
.data-table.finance-ledger-table { table-layout: fixed; width: 100%; min-width: 1200px; }
.data-table.finance-ledger-table th,
.data-table.finance-ledger-table td { white-space: normal; word-break: break-word; vertical-align: top; }
.data-table.finance-ledger-table .col-no { width: 40px; text-align: center; }
.data-table.finance-ledger-table .col-doc { width: 120px; }
.data-table.finance-ledger-table .col-party { width: 130px; }
.data-table.finance-ledger-table .col-order { width: 165px; }
.data-table.finance-ledger-table .col-nature { width: 70px; }
.data-table.finance-ledger-table .col-policy { width: 100px; }
.data-table.finance-ledger-table .col-stmt { width: 80px; }
.data-table.finance-ledger-table .col-amt { width: 110px; }
.data-table.finance-ledger-table .col-settle { width: 110px; }
.data-table.finance-ledger-table .col-progress { width: 90px; }
.data-table.finance-ledger-table .col-status { width: 75px; }
.data-table.finance-ledger-table .col-actions { width: 110px; }
