/* ==========================================================================
   custom-theme.css  —  佳韵针织 界面美化主题（参考 Tabler 风格）
   说明：本文件为“叠加层”，放在所有其他 CSS 之后加载，用于覆盖默认样式。
        不修改任何原有文件，删除本文件的引用即可完全还原。
   ========================================================================== */

:root,
[data-bs-theme="light"] {
    --jy-bg: #faf9f5;              /* 暖瓷白背景 */
    --jy-surface: #ffffff;
    --jy-surface-soft: #fcfbf7;
    --jy-control-bg: #ffffff;
    --jy-border: rgba(84, 125, 109, .16);
    --jy-border-strong: rgba(200, 154, 73, .38);
    --jy-text: #34443e;
    --jy-text-muted: #64716b;
    --jy-text-muted-rgb: 100, 113, 107;
    --jy-primary: #547d6d;         /* 雾青绿 */
    --jy-primary-dark: #466a5d;
    --jy-primary-rgb: 84, 125, 109;
    --jy-accent: #769889;
    --jy-gold: #c89a49;
    --jy-gold-rgb: 200, 154, 73;
    --jy-chart-1: #00afc1;
    --jy-chart-2: #2e7bd7;
    --jy-chart-3: #4aa8ff;
    --jy-chart-4: #3468d4;
    --jy-chart-5: #5965d8;
    --jy-chart-6: #2f9bef;
    --jy-chart-7: #795ec7;
    --jy-chart-8: #1d72c9;
    --jy-chart-9: #8ea3b5;
    --jy-chart-10: #16a085;
    --jy-chart-11: #465ed1;
    --jy-chart-12: #169bd5;
    --jy-chart-13: #00a6a6;
    --jy-chart-14: #6c5dd3;
    --jy-chart-15: #21a6b8;
    --jy-chart-16: #477bff;
    --jy-chart-17: #3ba5dc;
    --jy-chart-18: #73c7d5;
    --jy-chart-19: #4971a7;
    --jy-chart-20: #e5a93b;
    --jy-chart-21: #7893aa;
    --jy-chart-highlight: #ffffff;
    --jy-danger: #b65d55;
    --jy-danger-dark: #994b45;
    --jy-danger-rgb: 182, 93, 85;
    --jy-priority-bg: #f1f6f3;
    --jy-th-bg: #f7f8f5;
    --jy-row-hover: #eef3f0;
    /* 查询报价：02 青瓷雾面玻璃 */
    --jy-quote-shell: rgba(241, 246, 243, .84);
    --jy-quote-glass: rgba(255, 255, 255, .62);
    --jy-quote-glass-strong: rgba(252, 251, 247, .82);
    --jy-quote-control: rgba(255, 255, 255, .7);
    --jy-quote-highlight: rgba(255, 255, 255, .76);
    --jy-quote-lace: rgba(84, 125, 109, .11);
    --jy-quote-shadow: 0 20px 56px rgba(52, 68, 62, .13), 0 2px 8px rgba(52, 68, 62, .06);
    /* 认证卡片：08 织物磨砂玻璃 */
    --jy-auth-glass: rgba(255, 255, 255, .64);
    --jy-auth-glass-strong: rgba(252, 251, 247, .9);
    --jy-auth-control: rgba(255, 255, 255, .7);
    --jy-auth-border: rgba(200, 154, 73, .46);
    --jy-auth-highlight: rgba(255, 255, 255, .82);
    --jy-auth-thread: rgba(84, 125, 109, .12);
    --jy-auth-shadow: 0 30px 90px rgba(52, 68, 62, .2), 0 4px 16px rgba(52, 68, 62, .08);
    --bs-primary: #547d6d;
    --bs-primary-rgb: 84, 125, 109;
    --bs-link-color: #547d6d;
    --bs-link-hover-color: #466a5d;
    --jy-radius: 10px;
    --jy-control-height: 40px;
    --jy-placeholder-size: 13px;
    --jy-shadow: 0 8px 24px rgba(52, 68, 62, .055), 0 1px 2px rgba(52, 68, 62, .04);
    --jy-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Microsoft YaHei", "Noto Sans CJK SC", "Helvetica Neue", sans-serif;
    --bs-body-font-family: var(--jy-font);
    --bs-body-font-size: 15px;
    --bs-body-color: var(--jy-text);
    --bs-body-color-rgb: 52, 68, 62;
    --bs-secondary-color: var(--jy-text-muted);
    --bs-secondary-color-rgb: var(--jy-text-muted-rgb);
}

/* ==========================================================================
   统一关键字搜索、更多筛选与单行快捷视图（最终响应式覆盖）
   ========================================================================== */
.service-toolbar-groups > .jy-table-tabs,
.service-toolbar-groups > [class*="mobile-control-slot"] {
    min-width: 0;
    flex: 0 0 auto;
}

.service-toolbar-groups > .inventory-mobile-control-slot {
    display: flex;
    min-width: 0;
    align-items: center;
    flex: 0 0 auto;
}

.jy-table-tabs {
    max-width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.jy-table-tabs > .btn,
.jy-table-tabs > [role="tab"] {
    flex: 0 0 auto;
}

[data-bs-theme="dark"] {
    color-scheme: dark;
    --jy-bg: #090a0b;
    --jy-surface: #141414;
    --jy-surface-soft: #1a1a19;
    --jy-control-bg: #181817;
    --jy-border: rgba(201, 168, 76, .18);
    --jy-border-strong: rgba(201, 168, 76, .42);
    --jy-text: #f5f1e8;
    --jy-text-muted: #b8b1a7;
    --jy-text-muted-rgb: 184, 177, 167;
    --jy-primary: #c9a84c;
    --jy-primary-dark: #e0bd62;
    --jy-primary-rgb: 201, 168, 76;
    --jy-accent: #d2b461;
    --jy-gold: #c9a84c;
    --jy-gold-rgb: 201, 168, 76;
    --jy-chart-1: #18c6d9;
    --jy-chart-2: #4f97ff;
    --jy-chart-3: #36a9ff;
    --jy-chart-4: #477bff;
    --jy-chart-5: #6670f0;
    --jy-chart-6: #42b6ff;
    --jy-chart-7: #8a6fe8;
    --jy-chart-8: #2b86e2;
    --jy-chart-9: #9cb4c8;
    --jy-chart-10: #21b8a6;
    --jy-chart-11: #5a72ec;
    --jy-chart-12: #24aee0;
    --jy-chart-13: #19c0be;
    --jy-chart-14: #826fe3;
    --jy-chart-15: #29b8c9;
    --jy-chart-16: #5b86ff;
    --jy-chart-17: #45b4e8;
    --jy-chart-18: #84d4df;
    --jy-chart-19: #5f8fbf;
    --jy-chart-20: #e8b44c;
    --jy-chart-21: #88a8c4;
    --jy-chart-highlight: #ffffff;
    --jy-danger: #df786d;
    --jy-danger-dark: #ef9187;
    --jy-danger-rgb: 223, 120, 109;
    --jy-priority-bg: #1b1913;
    --jy-th-bg: #191918;
    --jy-row-hover: #201e19;
    /* 查询报价：08 黑曜石堆叠玻璃 */
    --jy-quote-shell: rgba(9, 10, 11, .93);
    --jy-quote-glass: rgba(20, 20, 20, .76);
    --jy-quote-glass-strong: rgba(26, 26, 25, .88);
    --jy-quote-control: rgba(24, 24, 23, .8);
    --jy-quote-highlight: rgba(245, 241, 232, .09);
    --jy-quote-lace: rgba(201, 168, 76, .1);
    --jy-quote-shadow: 0 24px 64px rgba(0, 0, 0, .58), 0 3px 12px rgba(0, 0, 0, .38);
    /* 认证卡片：04 玄夜黑金玻璃 */
    --jy-auth-glass: rgba(12, 13, 13, .76);
    --jy-auth-glass-strong: rgba(20, 20, 19, .94);
    --jy-auth-control: rgba(24, 24, 23, .78);
    --jy-auth-border: rgba(201, 168, 76, .58);
    --jy-auth-highlight: rgba(245, 241, 232, .1);
    --jy-auth-thread: rgba(201, 168, 76, .1);
    --jy-auth-shadow: 0 34px 100px rgba(0, 0, 0, .72), 0 5px 20px rgba(0, 0, 0, .44);
    --bs-primary: #c9a84c;
    --bs-primary-rgb: 201, 168, 76;
    --bs-link-color: #d6b75d;
    --bs-link-hover-color: #ead07e;
    --bs-body-color: var(--jy-text);
    --bs-body-color-rgb: 245, 241, 232;
    --bs-secondary-color: var(--jy-text-muted);
    --bs-secondary-color-rgb: var(--jy-text-muted-rgb);
    --jy-shadow: 0 12px 30px rgba(0, 0, 0, .34), 0 1px 2px rgba(0, 0, 0, .48);
}

/* ---------- 全局字体与背景 ---------- */
body {
    font-family: var(--jy-font) !important;
    font-weight: 400 !important;            /* 去掉全局加粗（原为楷体bold） */
    font-size: 15px;                        /* 日常办公基准字号，兼顾清晰度与信息密度 */
    background-color: var(--jy-bg) !important;
    background-image:
        radial-gradient(circle at 100% 0, rgba(var(--jy-primary-rgb), .055), transparent 28rem),
        radial-gradient(circle at 0 100%, rgba(var(--jy-gold-rgb), .035), transparent 30rem);
    background-attachment: fixed;
    color: var(--jy-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

button,
input,
optgroup,
select,
textarea {
    font-family: var(--jy-font);
}

.text-muted,
.text-secondary,
.text-body-secondary,
.form-text {
    color: var(--jy-text-muted) !important;
}

/* ---------- 顶部主导航栏 ---------- */
.navbar.bg-body-tertiary {
    background: var(--jy-surface) !important;
    border-bottom: 1px solid var(--jy-border);
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.navbar .navbar-brand {
    font-weight: 600;
    color: var(--jy-primary);
    letter-spacing: .3px;
    font-size: 15px;
}
.navbar .nav-link {
    color: var(--jy-text) !important;
    border-radius: 8px;
    padding: .4rem .7rem !important;
    margin: 0 1px;
    font-size: 14px;
    transition: background-color .15s ease, color .15s ease;
    white-space: nowrap;
}
.navbar .nav-link:hover {
    background-color: var(--jy-row-hover);
    color: var(--jy-primary) !important;
}
.navbar .nav-link.active {
    background-color: rgba(var(--jy-primary-rgb), .1);
    color: var(--jy-primary) !important;
    font-weight: 600;
}

@media (min-width: 1200px) and (max-width: 1499.98px) {
    .navbar .container-fluid {
        padding-right: 8px;
        padding-left: 8px;
    }

    .navbar .navbar-brand {
        margin-right: .25rem;
    }

    .navbar .nav-link {
        padding-right: .38rem !important;
        padding-left: .38rem !important;
        font-size: 13px;
    }
}

/* ---------- 主导航图标控制台 ---------- */
.jy-app-shell {
    --jy-app-topbar-height: 56px;
    min-height: 100dvh;
}

.jy-app-rail {
    position: fixed;
    inset: 0 0 auto;
    z-index: 1040;
    width: 100%;
    height: var(--jy-app-topbar-height);
    flex-direction: row;
    align-items: center;
    justify-content: center;
    background: transparent;
    pointer-events: none;
}

.jy-app-rail__brand {
    display: none;
}

.jy-app-rail__nav {
    display: flex;
    flex: 0 0 auto;
    width: auto;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    padding: 7px 8px;
    pointer-events: auto;
}

.jy-rail-group {
    width: 54px;
    height: 54px;
}

.jy-rail-action {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    gap: 5px;
    padding: 0 5px;
    color: var(--jy-text-muted);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 11px;
    text-decoration: none;
    transition: color .15s ease, background-color .15s ease, border-color .15s ease, transform .15s ease;
}

.jy-rail-action i {
    order: 2;
    font-size: 19px;
    line-height: 1;
}

.jy-rail-label {
    order: 1;
    color: currentColor;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: .08em;
    text-orientation: upright;
    writing-mode: vertical-rl;
}

.jy-rail-action.dropdown-toggle::after {
    display: none;
}

.jy-rail-action:hover,
.jy-rail-action:focus-visible,
.jy-rail-action.show {
    color: var(--jy-primary);
    background: var(--jy-row-hover);
    border-color: rgba(var(--jy-primary-rgb), .18);
    outline: 0;
}

.jy-rail-action:focus-visible {
    box-shadow: 0 0 0 3px rgba(var(--jy-primary-rgb), .16);
}

.jy-rail-action.active,
.jy-rail-group.is-active > .jy-rail-action {
    color: var(--jy-primary);
    background: var(--jy-priority-bg);
    border-color: rgba(var(--jy-gold-rgb), .5);
    box-shadow: inset 3px 0 0 var(--jy-gold);
}

.jy-rail-flyout {
    min-width: 220px;
    margin-top: 8px !important;
    padding: 8px;
    border-color: rgba(var(--jy-gold-rgb), .34);
    box-shadow: 0 18px 48px rgba(28, 39, 34, .16);
}

.jy-rail-flyout__title {
    margin: 0 0 6px;
    padding: 7px 10px 9px;
    color: var(--jy-text-muted);
    border-bottom: 1px solid var(--jy-border);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
}

.jy-rail-flyout .dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    padding: 8px 10px;
    border-radius: 8px;
    color: var(--jy-text);
    font-size: 14px;
}

.jy-rail-flyout .dropdown-item i {
    width: 18px;
    color: var(--jy-text-muted);
    text-align: center;
}

.jy-rail-flyout .dropdown-item:hover,
.jy-rail-flyout .dropdown-item:focus,
.jy-rail-flyout .dropdown-item.active {
    color: var(--jy-primary);
    background: var(--jy-row-hover);
}

.jy-rail-flyout .dropdown-item.active {
    box-shadow: inset 3px 0 0 var(--jy-gold);
    font-weight: 700;
}

.jy-rail-flyout .dropdown-item.active i {
    color: var(--jy-primary);
}

.jy-app-workspace {
    min-width: 0;
    min-height: 100dvh;
    margin-left: 0;
}

.jy-app-topbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: var(--jy-app-topbar-height);
    padding: 7px 16px;
    background: var(--jy-surface);
    border-bottom: 1px solid var(--jy-border);
    box-shadow: 0 1px 3px rgba(15, 23, 42, .035);
    backdrop-filter: blur(14px);
}

.jy-app-topbar__identity,
.jy-app-topbar__actions {
    display: flex;
    align-items: center;
    min-width: 0;
}

.jy-app-topbar__identity {
    gap: 10px;
}

.jy-app-topbar__home {
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    color: var(--jy-primary);
    background: var(--jy-priority-bg);
    border: 1px solid rgba(var(--jy-gold-rgb), .52);
    border-radius: 10px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .06em;
}

.jy-app-topbar__home:hover,
.jy-app-topbar__home:focus-visible {
    color: var(--jy-primary-dark);
    border-color: var(--jy-gold);
    outline: 0;
}

.jy-app-topbar__actions {
    flex: 0 0 auto;
    gap: 7px;
}

.jy-app-topbar__brand {
    color: var(--jy-primary);
    font-weight: 700;
    white-space: nowrap;
}

.jy-app-topbar__divider {
    width: 1px;
    height: 22px;
    background: var(--jy-border);
}

.jy-app-topbar__title {
    min-width: 0;
    overflow: hidden;
    color: var(--jy-text);
    font-size: 15px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jy-topbar-icon,
.jy-topbar-user {
    align-items: center;
    justify-content: center;
    min-width: 38px;
    min-height: 38px;
    padding: 0 10px;
    color: var(--jy-text);
    background: var(--jy-control-bg);
    border: 1px solid var(--jy-border);
    border-radius: 9px;
    text-decoration: none;
    transition: color .15s ease, background-color .15s ease, border-color .15s ease;
}

.jy-topbar-icon {
    padding: 0;
    font-size: 17px;
}

.jy-topbar-icon:hover,
.jy-topbar-icon:focus-visible,
.jy-topbar-user:hover,
.jy-topbar-user:focus-visible,
.jy-topbar-user.show {
    color: var(--jy-primary);
    background: var(--jy-row-hover);
    border-color: rgba(var(--jy-primary-rgb), .3);
    outline: 0;
}

.jy-topbar-user {
    display: inline-flex;
    min-height: 42px;
    gap: 7px;
    padding: 4px 8px 4px 5px;
    border-radius: 11px;
    font-size: 13px;
}

.jy-topbar-user::after {
    display: none;
}

.jy-topbar-user__avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    color: var(--jy-primary);
    background: var(--jy-priority-bg);
    border: 1px solid rgba(var(--jy-gold-rgb), .34);
    border-radius: 9px;
}

.jy-topbar-user__name {
    max-width: 86px;
    overflow: hidden;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jy-topbar-user__chevron {
    color: var(--jy-text-muted);
    font-size: 10px;
    transition: transform .16s ease;
}

.jy-topbar-user.show .jy-topbar-user__chevron {
    transform: rotate(180deg);
}

.jy-user-dropdown {
    width: 224px;
    min-width: 224px;
    margin-top: 9px !important;
    padding: 8px;
    color: var(--jy-text);
    background: var(--jy-surface);
    border: 1px solid rgba(var(--jy-gold-rgb), .34);
    border-radius: 13px;
    box-shadow: 0 18px 46px rgba(28, 39, 34, .16);
}

.jy-user-dropdown__header {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 3px;
    padding: 7px 10px 8px;
}

.jy-user-dropdown__header span {
    color: var(--jy-text-muted);
    font-size: 11px;
}

.jy-user-dropdown__header strong {
    overflow: hidden;
    color: var(--jy-text);
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jy-user-dropdown .dropdown-divider {
    margin: 3px 2px 6px;
    border-color: var(--jy-border);
}

.jy-user-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    min-height: 42px;
    gap: 10px;
    padding: 6px 8px;
    color: var(--jy-text);
    border-radius: 9px;
    font-size: 13px;
}

.jy-user-dropdown .dropdown-item:hover,
.jy-user-dropdown .dropdown-item:focus {
    color: var(--jy-primary);
    background: var(--jy-row-hover);
}

.jy-user-dropdown__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    color: var(--jy-primary);
    background: var(--jy-priority-bg);
    border: 1px solid var(--jy-border);
    border-radius: 8px;
}

.jy-user-dropdown .jy-user-dropdown__logout,
.jy-user-dropdown .jy-user-dropdown__logout .jy-user-dropdown__icon {
    color: var(--jy-danger);
}

.jy-user-dropdown .jy-user-dropdown__logout:hover,
.jy-user-dropdown .jy-user-dropdown__logout:focus {
    color: var(--jy-danger-dark);
    background: rgba(var(--jy-danger-rgb), .09);
}

.jy-user-dropdown .jy-user-dropdown__logout .jy-user-dropdown__icon {
    background: rgba(var(--jy-danger-rgb), .07);
    border-color: rgba(var(--jy-danger-rgb), .2);
}

.jy-topbar-quote {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    min-width: 38px;
    height: 38px;
    min-height: 38px;
    padding: 0;
}

.jy-topbar-quote i {
    margin: 0;
    font-size: 17px;
}

.jy-topbar-refresh {
    flex: 0 0 34px;
    width: 34px;
    min-width: 34px;
    min-height: 34px;
    padding: 0;
    color: var(--jy-primary);
}

.jy-topbar-context-actions {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
}

.jy-workspace-history {
    display: flex;
    min-width: 0;
    align-items: center;
}

.jy-workspace-history[hidden],
.jy-workspace-history__mobile-back[hidden] {
    display: none !important;
}

.jy-workspace-history__list {
    display: none;
    min-width: 0;
    max-width: min(32vw, 440px);
    align-items: center;
    gap: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    list-style: none;
    white-space: nowrap;
}

.jy-workspace-history__item {
    display: flex;
    min-width: 0;
    align-items: center;
    color: var(--jy-text-muted);
}

.jy-workspace-history__item:not(:first-child)::before {
    flex: 0 0 auto;
    margin: 0 7px;
    color: var(--jy-gold);
    content: "\203A";
    font-size: 17px;
    line-height: 1;
}

.jy-workspace-history__link,
.jy-workspace-history__current {
    display: block;
    min-width: 0;
    max-width: 126px;
    overflow: hidden;
    border: 0;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    line-height: 1.4;
}

.jy-workspace-history__link {
    padding: 3px 0;
    color: var(--jy-text-muted);
    background: transparent;
}

.jy-workspace-history__link:hover,
.jy-workspace-history__link:focus-visible {
    color: var(--jy-primary);
    outline: 0;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.jy-workspace-history__current {
    color: var(--jy-primary);
    font-weight: 700;
}

.jy-workspace-history__mobile-back {
    display: inline-flex;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: var(--jy-primary);
    background: var(--jy-priority-bg);
    border: 1px solid rgba(var(--jy-gold-rgb), .42);
    border-radius: 8px;
}

.jy-workspace-history__mobile-back:hover,
.jy-workspace-history__mobile-back:focus-visible {
    color: var(--jy-primary-dark);
    border-color: var(--jy-gold);
    outline: 0;
}

body.jy-workspace-frame-active {
    overflow: hidden;
}

.jy-workspace-frame-stack {
    position: relative;
    width: 100%;
    height: calc(100dvh - var(--jy-app-topbar-height));
    min-width: 0;
    overflow: hidden;
    background: var(--jy-bg);
}

.jy-workspace-frame-page,
.jy-workspace-frame {
    width: 100%;
    height: 100%;
    min-width: 0;
}

.jy-workspace-frame-page {
    position: relative;
}

.jy-workspace-frame {
    display: block;
    background: var(--jy-bg);
    border: 0;
}

.jy-workspace-frame-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    color: var(--jy-text-muted);
    background: var(--jy-bg);
    font-size: 13px;
}

.jy-workspace-frame-loading.is-delayed {
    color: var(--jy-primary);
}

.jy-workspace-frame-loading.is-error {
    color: var(--jy-danger);
}

.jy-app-shell.jy-app-shell--frame {
    --jy-app-topbar-height: 0px;
}

.jy-app-shell--frame .jy-app-rail,
.jy-app-shell--frame .jy-app-topbar,
.jy-app-shell--frame .jy-mobile-navigation {
    display: none !important;
}

.jy-app-shell--frame,
.jy-app-shell--frame .jy-app-workspace,
.jy-app-shell--frame .jy-app-content {
    min-height: 100dvh;
}

/* ---------- 每天备忘录悬浮挂件 ---------- */
.jy-daily-memo-toggle {
    position: relative;
    display: inline-flex;
    flex: 0 0 38px;
    cursor: pointer;
}

.jy-daily-memo-toggle[aria-expanded="true"] {
    color: var(--jy-primary);
    background: var(--jy-priority-bg);
    border-color: rgba(var(--jy-gold-rgb), .55);
}

.jy-daily-memo-toggle__count {
    position: absolute;
    top: -6px;
    right: -7px;
    min-width: 19px;
    padding: 3px 5px;
    color: var(--jy-surface);
    background: var(--jy-primary);
    border: 2px solid var(--jy-surface);
    font-size: 9px;
    line-height: 1;
}

.jy-daily-memo-panel {
    position: fixed;
    z-index: 1040;
    top: calc(var(--jy-app-topbar-height, 56px) + 12px);
    right: 18px;
    display: flex;
    width: min(430px, calc(100vw - 28px));
    max-height: min(720px, calc(100dvh - var(--jy-app-topbar-height, 56px) - 28px));
    overflow: hidden;
    color: var(--jy-text);
    background: var(--jy-surface);
    border-color: rgba(var(--jy-gold-rgb), .45) !important;
    box-shadow: 0 24px 62px rgba(25, 38, 32, .2) !important;
}

.jy-daily-memo-panel[hidden] {
    display: none !important;
}

.jy-daily-memo-panel.is-dragging {
    box-shadow: 0 28px 68px rgba(25, 38, 32, .28) !important;
}

.jy-daily-memo-panel__header {
    display: flex;
    min-height: 66px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    background: var(--jy-surface-soft);
    border-bottom: 1px solid var(--jy-border);
    cursor: grab;
    touch-action: none;
    user-select: none;
}

.jy-daily-memo-panel.is-drag-ready .jy-daily-memo-panel__header,
.jy-daily-memo-panel.is-dragging .jy-daily-memo-panel__header {
    cursor: grabbing;
}

.jy-daily-memo-panel__heading,
.jy-daily-memo-panel__actions {
    display: flex;
    align-items: center;
}

.jy-daily-memo-panel__heading {
    min-width: 0;
    gap: 10px;
}

.jy-daily-memo-panel__icon {
    display: inline-flex;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    align-items: center;
    justify-content: center;
    color: var(--jy-primary);
    background: var(--jy-priority-bg);
    border: 1px solid rgba(var(--jy-gold-rgb), .4);
    border-radius: 10px;
    font-size: 18px;
}

.jy-daily-memo-panel__heading h2 {
    margin: 0;
    color: var(--jy-text);
    font-size: 16px;
    font-weight: 750;
}

.jy-daily-memo-panel__heading p {
    margin: 2px 0 0;
    color: var(--jy-text-muted);
    font-size: 11px;
}

.jy-daily-memo-panel__actions {
    gap: 7px;
}

.jy-daily-memo-panel__actions .btn {
    width: 32px;
    min-width: 32px;
    height: 32px;
    padding: 0;
}

.jy-daily-memo-panel__body {
    min-height: 0;
    padding: 12px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.jy-daily-memo-create {
    margin-bottom: 10px;
}

.jy-daily-memo-create .form-control,
.jy-daily-memo-create .btn {
    min-height: 40px;
}

.jy-daily-memo-state {
    padding: 6px 2px;
    color: var(--jy-text-muted);
    font-size: 12px;
    text-align: center;
}

.jy-daily-memo-state:empty {
    display: none;
}

.jy-daily-memo-state[data-state="error"] {
    color: var(--jy-danger);
}

.jy-daily-memo-section {
    overflow: hidden;
    background: var(--jy-surface);
    border: 1px solid var(--jy-border);
    border-radius: 11px;
}

.jy-daily-memo-section + .jy-daily-memo-section {
    margin-top: 10px;
}

.jy-daily-memo-section__head {
    display: flex;
    min-height: 42px;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 10px;
    background: var(--jy-surface-soft);
    border-bottom: 1px solid var(--jy-border);
}

.jy-daily-memo-section__head h3 {
    margin: 0;
    color: var(--jy-text);
    font-size: 13px;
    font-weight: 750;
}

.jy-daily-memo-section__head .badge,
.jy-daily-memo-history__toggle .badge {
    color: var(--jy-primary);
    background: var(--jy-priority-bg);
    border: 1px solid rgba(var(--jy-primary-rgb), .2);
    font-size: 10px;
}

.jy-daily-memo-list {
    max-height: 34dvh;
    overflow-y: auto;
}

.jy-daily-memo-list--completed {
    max-height: 24dvh;
}

.jy-daily-memo-item {
    display: flex;
    min-width: 0;
    align-items: flex-start;
    gap: 9px;
    padding: 10px;
    color: var(--jy-text);
    background: var(--jy-surface);
    border-color: var(--jy-border);
}

.jy-daily-memo-item:hover {
    background: var(--jy-row-hover);
}

.jy-daily-memo-item__check {
    flex: 0 0 auto;
    margin-top: 3px;
    cursor: pointer;
}

.jy-daily-memo-item__check:disabled {
    cursor: default;
    opacity: .78;
}

.jy-daily-memo-item__body {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
    gap: 3px;
}

.jy-daily-memo-item__content {
    overflow-wrap: anywhere;
    color: var(--jy-text);
    font-size: 13px;
    line-height: 1.45;
}

.jy-daily-memo-item__content--editable {
    display: block;
    width: 100%;
    padding: 1px 3px;
    appearance: none;
    color: var(--jy-text);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    text-align: left;
    cursor: text;
}

.jy-daily-memo-item__content--editable:hover,
.jy-daily-memo-item__content--editable:focus-visible {
    color: var(--jy-primary);
    background: var(--jy-priority-bg);
    border-color: rgba(var(--jy-primary-rgb), .22);
    outline: none;
}

.jy-daily-memo-item__inline-input {
    min-height: 34px;
    font-size: 13px;
}

.jy-daily-memo-item.is-editing .jy-daily-memo-item__actions {
    opacity: .45;
}

.jy-daily-memo-item.is-saving .jy-daily-memo-item__inline-input {
    opacity: .72;
}

.jy-daily-memo-item__meta[data-state="saving"] {
    color: var(--jy-primary);
}

.jy-daily-memo-item__meta[data-state="error"] {
    color: var(--jy-danger);
}

.jy-daily-memo-item.is-completed .jy-daily-memo-item__content {
    color: var(--jy-text-muted);
    text-decoration: line-through;
}

.jy-daily-memo-item__meta {
    color: var(--jy-text-muted);
    font-size: 10px;
}

.jy-daily-memo-item__actions {
    display: flex;
    flex: 0 0 auto;
    gap: 5px;
    opacity: 0;
    transition: opacity .15s ease;
}

.jy-daily-memo-item:hover .jy-daily-memo-item__actions,
.jy-daily-memo-item:focus-within .jy-daily-memo-item__actions {
    opacity: 1;
}

.jy-daily-memo-item__actions .btn {
    width: 29px;
    min-width: 29px;
    height: 29px;
    padding: 0;
}

.jy-daily-memo-empty {
    display: flex;
    min-height: 76px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    color: var(--jy-text-muted);
    font-size: 12px;
}

.jy-daily-memo-empty i {
    color: var(--jy-accent);
    font-size: 20px;
}

.jy-daily-memo-history__head {
    padding-right: 8px;
    padding-left: 4px;
}

.jy-daily-memo-history__toggle {
    display: inline-flex;
    min-width: 0;
    flex: 1;
    align-items: center;
    gap: 6px;
    padding: 4px 6px;
    color: var(--jy-text);
    text-decoration: none;
    font-size: 13px;
    font-weight: 750;
}

.jy-daily-memo-history__toggle > span:first-of-type {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jy-daily-memo-history__toggle:hover,
.jy-daily-memo-history__toggle:focus-visible {
    color: var(--jy-primary);
}

.jy-daily-memo-history__toggle > i {
    color: var(--jy-text-muted);
    font-size: 10px;
    transition: transform .16s ease;
}

.jy-daily-memo-history__toggle[aria-expanded="false"] > i {
    transform: rotate(-90deg);
}

.jy-daily-memo-history__range {
    width: 205px;
    flex: 0 0 205px;
}

.jy-daily-memo-history__range .input-group-text {
    padding-right: 7px;
    padding-left: 7px;
    color: var(--jy-text-muted);
    background: var(--jy-surface-soft);
    border-color: var(--jy-border);
}

.jy-daily-memo-history__range .form-control {
    min-width: 0;
    min-height: 32px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
    cursor: pointer;
}

.jy-daily-memo-delete-preview {
    margin: 12px 0 0;
    padding: 9px 10px;
    overflow-wrap: anywhere;
    color: var(--jy-text);
    background: var(--jy-surface-soft);
    border-left: 3px solid var(--jy-gold);
    border-radius: 7px;
}

[data-bs-theme="dark"] .jy-daily-memo-panel {
    box-shadow: 0 28px 70px rgba(0, 0, 0, .62) !important;
}

@media (hover: none) {
    .jy-daily-memo-item__actions {
        opacity: 1;
    }
}

@media (max-width: 767px) {
    .jy-daily-memo-panel {
        top: calc(var(--jy-app-topbar-height, 56px) + 8px) !important;
        right: 8px !important;
        bottom: 8px !important;
        left: 8px !important;
        width: auto;
        max-height: none;
    }

    .jy-daily-memo-panel__header {
        cursor: default;
        touch-action: auto;
    }

    .jy-daily-memo-panel__body {
        padding: 10px;
    }

    .jy-daily-memo-list,
    .jy-daily-memo-list--completed {
        max-height: none;
    }

    .jy-daily-memo-history__range {
        width: 184px;
        flex-basis: 184px;
    }
}

.jy-app-content {
    min-width: 0;
}

[data-theme-target][hidden] {
    display: none !important;
}

.jy-mobile-navigation {
    --bs-offcanvas-width: min(328px, 90vw);
    color: var(--jy-text);
    background: var(--jy-surface);
    border-right-color: rgba(var(--jy-gold-rgb), .35);
}

.jy-mobile-navigation .offcanvas-header {
    min-height: 72px;
    border-bottom: 1px solid var(--jy-border);
}

.jy-mobile-navigation__eyebrow {
    display: block;
    margin-bottom: 2px;
    color: var(--jy-gold);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .15em;
}

.jy-mobile-navigation .offcanvas-title {
    color: var(--jy-text);
    font-size: 17px;
    font-weight: 700;
}

.jy-mobile-navigation .offcanvas-body {
    display: flex;
    min-height: 0;
    flex-direction: column;
    padding: 10px;
}

.jy-mobile-navigation__nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.jy-mobile-nav-direct,
.jy-mobile-nav-groups .accordion-button {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 46px;
    padding: 10px 12px;
    color: var(--jy-text);
    background: transparent;
    border: 0;
    border-radius: 9px;
    box-shadow: none;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.jy-mobile-nav-direct i,
.jy-mobile-nav-groups .accordion-button > i {
    width: 20px;
    color: var(--jy-text-muted);
    font-size: 17px;
    text-align: center;
}

.jy-mobile-nav-direct:hover,
.jy-mobile-nav-direct.active,
.jy-mobile-nav-groups .accordion-button:hover,
.jy-mobile-nav-groups .accordion-button:not(.collapsed),
.jy-mobile-nav-groups [data-jy-nav-group].is-active > .accordion-header .accordion-button {
    color: var(--jy-primary);
    background: var(--jy-row-hover);
}

.jy-mobile-nav-direct.active,
.jy-mobile-nav-groups [data-jy-nav-group].is-active > .accordion-header .accordion-button {
    box-shadow: inset 3px 0 0 var(--jy-gold);
}

.jy-mobile-nav-direct.active i,
.jy-mobile-nav-groups [data-jy-nav-group].is-active > .accordion-header .accordion-button > i {
    color: var(--jy-primary);
}

.jy-mobile-nav-groups .accordion-item {
    background: transparent;
    border: 0;
}

.jy-mobile-nav-groups .accordion-button::after {
    width: 14px;
    height: 14px;
    margin-left: auto;
    background-size: 14px;
}

.jy-mobile-nav-groups .accordion-body {
    display: grid;
    gap: 3px;
    padding: 4px 8px 7px 44px;
}

.jy-mobile-nav-groups .accordion-body a {
    padding: 8px 10px;
    color: var(--jy-text-muted);
    border-radius: 7px;
    text-decoration: none;
    font-size: 13px;
}

.jy-mobile-nav-groups .accordion-body a:hover,
.jy-mobile-nav-groups .accordion-body a.active {
    color: var(--jy-primary);
    background: var(--jy-row-hover);
}

.jy-mobile-nav-groups .accordion-body a.active {
    font-weight: 700;
}

.jy-mobile-navigation__utilities {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--jy-border);
}

.jy-mobile-navigation__utilities > a,
.jy-mobile-navigation__utilities > button {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 8px 10px;
    color: var(--jy-text-muted);
    background: var(--jy-control-bg);
    border: 1px solid var(--jy-border);
    border-radius: 8px;
    text-decoration: none;
    font-size: 12px;
}

.jy-mobile-navigation__utilities > a:hover,
.jy-mobile-navigation__utilities > button:hover {
    color: var(--jy-primary);
    background: var(--jy-row-hover);
}

[data-bs-theme="dark"] .jy-app-topbar {
    box-shadow: 1px 0 0 rgba(var(--jy-gold-rgb), .1);
}

[data-bs-theme="dark"] .jy-rail-flyout {
    box-shadow: 0 20px 56px rgba(0, 0, 0, .58);
}

[data-bs-theme="dark"] .jy-user-dropdown {
    box-shadow: 0 20px 56px rgba(0, 0, 0, .58);
}

@media (max-width: 1199.98px) {
    .jy-app-topbar {
        padding-right: 10px;
        padding-left: 10px;
    }
}

@media (min-width: 1200px) {
    .jy-app-shell {
        --jy-app-topbar-height: 68px;
    }

    .jy-app-topbar {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 430px minmax(0, 1fr);
    }

    .jy-app-topbar__identity {
        grid-column: 1;
    }

    .jy-app-topbar__title {
        display: none;
    }

    .jy-app-topbar__actions {
        grid-column: 3;
        justify-self: end;
    }

    .jy-workspace-history__list {
        display: flex;
    }
}

@media (max-width: 575.98px) {
    .jy-app-topbar {
        gap: 8px;
    }

    .jy-app-topbar__identity {
        gap: 8px;
    }

    .jy-app-topbar__brand {
        display: none;
    }

    .jy-app-topbar__title {
        max-width: 132px;
        font-size: 14px;
    }

    .jy-topbar-refresh {
        flex-basis: 32px;
        width: 32px;
        min-width: 32px;
        min-height: 32px;
    }
}

/* ---------- 卡片 ---------- */
.card {
    background: var(--jy-surface);
    border: 1px solid var(--jy-border) !important;
    border-radius: var(--jy-radius) !important;
    box-shadow: var(--jy-shadow) !important;
}
/* 卡片内的表格操作栏 */
.card .navbar.bg-body-tertiary {
    border-bottom: 1px solid var(--jy-border);
    border-radius: var(--jy-radius) var(--jy-radius) 0 0;
    box-shadow: none;
    padding-left: 12px;
    padding-right: 12px;
}
/* 表格区域：去掉上内边距，让表格与上方操作栏无缝连接（原 .card-body 的 16px 造成断裂） */
.card > .card-body {
    padding-top: 0;
}
/* 让表格横向铺满卡片：抵消 card-body 左右 16px 内边距，使工具栏/表头/数据行与卡片边框形成一个整体（参考 Tabler） */
.card > .card-body .dataTables_scroll {
    margin-left: -16px;
    margin-right: -16px;
}
/* 去掉 DataTables 给滚动表头表格默认加的 6px 上外边距，使浅灰表头紧贴工具栏边框线 */
.dataTables_scrollHead table {
    margin-top: 0 !important;
}
/* 底部分页/信息/按钮栏：铺满后补回左右内边距，避免贴到卡片边缘 */
.card > .card-body .dataTables_wrapper > .d-flex {
    padding: 8px 16px 0;
}
/* 导出/打印按钮：统一为柔和浅色描边风格（原 DataTables 默认深灰，与整体不搭） */
.dt-buttons .btn,
.dt-button {
    background: var(--jy-surface) !important;
    color: var(--jy-primary) !important;
    border: 1px solid var(--jy-border-strong) !important;
    border-radius: 8px !important;
    font-weight: 500;
    box-shadow: none !important;
}
.dt-buttons .btn:hover,
.dt-button:hover {
    background: var(--jy-primary) !important;
    color: #fff !important;
    border-color: var(--jy-primary) !important;
}
/* 日期后的“清除”按钮：改为柔和浅色，与整体风格一致（原 btn-outline-secondary 深黑边框偏突兀） */
#date_clear.btn-outline-secondary {
    border-color: var(--jy-border-strong);
    color: var(--jy-text-muted);
    background: var(--jy-surface);
}
#date_clear.btn-outline-secondary:hover {
    background: var(--jy-row-hover);
    border-color: var(--jy-border-strong);
    color: var(--jy-text);
}
#date_clear.btn-outline-secondary i {
    font-size: 12px;
}

/* ---------- 表格（核心美化，参考 Tabler） ---------- */
#myTable.table,
.table.table-bordered {
    --bs-table-bg: transparent;
    border-color: var(--jy-border);
    color: var(--jy-text);
    margin-bottom: 0;
}
/* 去掉生硬的竖向边框，只保留横向细线 */
#myTable.table > :not(caption) > * > *,
.table.table-bordered > :not(caption) > * > * {
    border-left: 0 !important;
    border-right: 0 !important;
    border-color: var(--jy-border) !important;
}
/* 表头：浅灰底、灰字、字距、无粗黑线 */
#myTable thead th,
.table thead th {
    background-color: var(--jy-th-bg) !important;
    color: var(--jy-text-muted) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    letter-spacing: .4px;
    text-transform: none;
    border-bottom: 1px solid var(--jy-border-strong) !important;
    border-top: 0 !important;
    padding: 10px 12px !important;
    text-align: center !important;
    white-space: nowrap;
    vertical-align: middle;
}
/* DataTables 在 scrollX/scrollY 模式下会在表体内再复制一份表头用于列宽对齐，
   需将其视觉隐藏（保留占位以对齐列宽），否则会在真实表头下方出现一条灰色空带。
   表体表格 id 仍为 myTable，故用 #myTable 提高优先级以覆盖表头样式 */
.dataTables_scrollBody #myTable > thead th,
.dataTables_scrollBody #myTable > thead td {
    background-color: transparent !important;
    border-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    line-height: 0 !important;
    color: transparent !important;
}
/* 单元格：舒适行高、垂直居中、柔和字色 */
#myTable tbody td,
.table tbody td {
    font-size: 14.5px;
    color: var(--jy-text);
    padding: 10px 12px !important;
    border-bottom: 1px solid var(--jy-border) !important;
    vertical-align: middle;
}
/* 悬停行：淡中性灰（与选中的主色蓝明显区分） */
#myTable.table-hover > tbody > tr:hover > *,
.table-hover > tbody > tr:hover > * {
    background-color: var(--jy-row-hover) !important;
}
/* 选中行：用 inset box-shadow 铺主色（同时覆盖 DataTables Select 自带的高饱和蓝）。
   box-shadow 是独立图层，叠加在 hover 背景之上，故选中态在任何情况下都清晰可辨。 */
#myTable tbody tr.selected > * {
    box-shadow:
        inset 0 2px 0 rgba(var(--jy-primary-rgb), .62),
        inset 0 -2px 0 rgba(var(--jy-primary-rgb), .62),
        inset 0 0 0 9999px rgba(var(--jy-primary-rgb), .25) !important;
    color: var(--jy-primary-dark) !important;
    font-weight: 700 !important;
    letter-spacing: .08px;
}
/* 选中行悬停时加深，强化反馈 */
#myTable.table-hover > tbody > tr.selected:hover > *,
.table-hover > tbody > tr.selected:hover > * {
    box-shadow:
        inset 0 2px 0 rgba(var(--jy-primary-rgb), .78),
        inset 0 -2px 0 rgba(var(--jy-primary-rgb), .78),
        inset 0 0 0 9999px rgba(var(--jy-primary-rgb), .35) !important;
}
/* 选中行左侧主色标识条（叠加在主色底之上，一眼可辨） */
#myTable tbody tr.selected > *:first-child {
    box-shadow:
        inset 5px 0 0 var(--jy-primary),
        inset 0 2px 0 rgba(var(--jy-primary-rgb), .62),
        inset 0 -2px 0 rgba(var(--jy-primary-rgb), .62),
        inset 0 0 0 9999px rgba(var(--jy-primary-rgb), .25) !important;
}
#myTable.table-hover > tbody > tr.selected:hover > *:first-child,
.table-hover > tbody > tr.selected:hover > *:first-child {
    box-shadow:
        inset 5px 0 0 var(--jy-primary),
        inset 0 2px 0 rgba(var(--jy-primary-rgb), .78),
        inset 0 -2px 0 rgba(var(--jy-primary-rgb), .78),
        inset 0 0 0 9999px rgba(var(--jy-primary-rgb), .35) !important;
}
#myTable tbody tr.selected > * a:not(.btn) {
    color: var(--jy-primary-dark) !important;
    font-weight: 700;
}

/* ---------- 发货 / 退货单据页 ---------- */
.jy-document-page {
    min-height: 100vh;
    padding: 28px 0;
}
.jy-document-shell {
    width: min(1180px, calc(100% - 32px));
    margin-right: auto !important;
    margin-left: auto !important;
    padding: 30px 32px 34px;
    overflow-x: auto;
    border: 1px solid var(--jy-border-strong);
    border-radius: 16px;
    background:
        radial-gradient(circle at 100% 0, rgba(var(--jy-gold-rgb), .055), transparent 18rem),
        var(--jy-surface);
    color: var(--jy-text);
    box-shadow: var(--jy-shadow);
}
.jy-document-heading {
    align-items: center;
    margin-bottom: 8px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--jy-border);
    color: var(--jy-text-muted);
}
.jy-document-company {
    color: var(--jy-text);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: .12em;
}
.jy-document-page .document-title {
    display: inline-block;
    padding: 4px 16px 5px;
    border-bottom: 2px solid var(--jy-gold);
    color: var(--jy-primary-dark);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: .15em;
}
.jy-document-page .row:not(.jy-document-heading) {
    color: var(--jy-text);
}
.jy-document-page #myTable.jy-document-table {
    display: table;
    min-width: 760px;
    margin-top: 20px;
    border: 1px solid var(--jy-border-strong) !important;
    border-collapse: collapse;
    background: var(--jy-surface);
    color: var(--jy-text);
}
.jy-document-page #myTable .jy-document-col-id { width: 6%; }
.jy-document-page #myTable .jy-document-col-product { width: 13%; }
.jy-document-page #myTable .jy-document-col-color { width: 12%; }
.jy-document-page #myTable .jy-document-col-unit { width: 6%; }
.jy-document-page #myTable .jy-document-col-quantity { width: 11%; }
.jy-document-page #myTable .jy-document-col-price { width: 10%; }
.jy-document-page #myTable .jy-document-col-extra-fee { width: 10%; }
.jy-document-page #myTable .jy-document-col-total { width: 11%; }
.jy-document-page #myTable .jy-document-col-remark { width: 21%; }
/* 单据必须保留完整网格，覆盖业务列表表格“只留横线”的通用规则。 */
.jy-document-page #myTable.jy-document-table > :not(caption) > * > * {
    padding: 9px 10px !important;
    border: 1px solid var(--jy-border-strong) !important;
    background-color: var(--jy-surface) !important;
    color: var(--jy-text) !important;
    font-size: 13.5px;
    vertical-align: middle;
}
.jy-document-page #myTable .jy-document-table-head > * {
    background-color: var(--jy-th-bg) !important;
    color: var(--jy-primary-dark) !important;
    font-size: 13px !important;
    font-weight: 700;
    letter-spacing: .04em;
}
.jy-document-page #myTable .remark,
.jy-document-page #myTable .remark small {
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.jy-document-page #myTable .remark small {
    display: block;
    font-size: 12px;
    line-height: 1.25;
}
.jy-document-page #myTable tbody td[contenteditable="true"] {
    position: relative;
    background:
        linear-gradient(rgba(var(--jy-primary-rgb), .075), rgba(var(--jy-primary-rgb), .075)),
        var(--jy-surface) !important;
    box-shadow: inset 0 -2px 0 rgba(var(--jy-primary-rgb), .48);
    cursor: text;
    transition: background-color .15s ease, box-shadow .15s ease;
}
.jy-document-page #myTable tbody td[contenteditable="true"]:hover,
.jy-document-page #myTable tbody td[contenteditable="true"]:focus {
    outline: 0;
    background:
        linear-gradient(rgba(var(--jy-primary-rgb), .14), rgba(var(--jy-primary-rgb), .14)),
        var(--jy-surface) !important;
    box-shadow:
        inset 0 0 0 2px var(--jy-primary),
        0 0 0 3px rgba(var(--jy-primary-rgb), .1);
}
.jy-document-page #myTable .jy-document-total > * {
    background:
        linear-gradient(rgba(var(--jy-gold-rgb), .09), rgba(var(--jy-gold-rgb), .09)),
        var(--jy-surface) !important;
    color: var(--jy-text) !important;
    font-weight: 700;
}
.jy-document-page #myTable .jy-document-total .sum {
    color: var(--jy-primary-dark);
    font-size: 15px;
}
.jy-document-page .footer_s {
    padding-top: 4px;
    color: var(--jy-text-muted);
}
.jy-document-actions .btn {
    min-width: 112px;
    min-height: 42px;
}
.jy-document-action-row {
    margin-top: 50px;
}
.jy-document-actions #print {
    margin-left: 12px !important;
}

/* ---------- 下拉菜单 & 弹窗/手风琴：跟随日常办公基准字号 ---------- */
.dropdown-menu {
    font-size: 15px;
}
.dropdown-item {
    font-size: 15px;
    padding: 6px 16px;
}
/* 报价/查询 offcanvas 与模态框内的手风琴按钮、表单、说明文字 */
.accordion-button,
.offcanvas .form-label,
.offcanvas .form-control,
.offcanvas .btn,
.modal .form-label,
.modal .form-control {
    font-size: 15px;
}
.accordion-button {
    font-weight: 500;
    color: var(--jy-text);
}
.accordion-button:not(.collapsed) {
    color: var(--jy-primary);
    background-color: rgba(var(--jy-primary-rgb), .08);
}
.offcanvas-title, .modal-title {
    font-size: 15px;
}

/* ---------- 按钮 ---------- */
.btn {
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    transition: all .15s ease;
}
.btn-primary {
    --bs-btn-focus-shadow-rgb: var(--jy-primary-rgb);
    background-color: var(--jy-primary);
    border-color: var(--jy-primary);
}
.btn-primary:hover {
    background-color: var(--jy-primary-dark);
    border-color: var(--jy-primary-dark);
}
.btn-outline-primary {
    --bs-btn-focus-shadow-rgb: var(--jy-primary-rgb);
    color: var(--jy-primary);
    border-color: var(--jy-border-strong);
}
.btn-outline-primary:hover {
    background-color: var(--jy-primary);
    border-color: var(--jy-primary);
}
.btn-danger {
    background-color: var(--jy-danger);
    border-color: var(--jy-danger);
    color: #fff;
}
.btn-danger:hover,
.btn-danger:focus-visible {
    background-color: var(--jy-danger-dark);
    border-color: var(--jy-danger-dark);
    color: #fff;
}
.btn-outline-secondary {
    border-color: var(--jy-border-strong);
    background-color: var(--jy-surface);
    color: var(--jy-text-muted);
}
.btn-outline-secondary:hover {
    border-color: var(--jy-border-strong);
    background-color: var(--jy-row-hover);
    color: var(--jy-text);
}
.btn-group > .btn {
    border-radius: 8px;
}
.btn.disabled,
.btn:disabled,
fieldset:disabled .btn {
    border-color: var(--bs-border-color) !important;
    background-color: var(--bs-secondary-bg) !important;
    color: var(--bs-secondary-color) !important;
    box-shadow: none !important;
    cursor: not-allowed;
    opacity: 1;
}

/* ---------- 全站提示 Toast ---------- */
.jy-toast-region {
    z-index: 11000;
    width: auto;
    max-width: 100vw;
    pointer-events: none;
}
.jy-toast-region .jy-toast {
    pointer-events: auto;
}
.jy-toast {
    --bs-toast-max-width: 420px;
    width: min(420px, calc(100vw - 24px));
    overflow: hidden;
    border: 1px solid var(--jy-border-strong);
    border-left: 4px solid var(--jy-primary);
    border-radius: 14px;
    background:
        linear-gradient(110deg, rgba(var(--jy-primary-rgb), .055), transparent 65%),
        var(--jy-surface);
    color: var(--jy-text);
    box-shadow: 0 18px 48px rgba(52, 68, 62, .18), 0 3px 10px rgba(52, 68, 62, .08);
    backdrop-filter: blur(12px);
}
.jy-toast .toast-body {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 15px;
    color: var(--jy-text);
}
.jy-toast__main {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    align-items: center;
    gap: 12px;
}
.jy-toast__icon {
    display: inline-flex;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(var(--jy-primary-rgb), .25);
    border-radius: 11px;
    background: rgba(var(--jy-primary-rgb), .1);
    color: var(--jy-primary);
    font-size: 18px;
}
.jy-toast__content {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 2px;
}
.jy-toast__title {
    color: var(--jy-text);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
}
.jy-toast .toast-text {
    color: var(--jy-text-muted);
    font-size: 13px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}
.jy-toast__actions {
    display: flex;
    flex: 0 0 auto;
    justify-content: flex-end;
    gap: 8px;
}
.jy-toast__actions .btn {
    min-width: 64px;
}
.jy-toast__dismiss,
.jy-toast__close {
    border-color: var(--jy-border) !important;
    background: var(--jy-surface-soft) !important;
    color: var(--jy-text-muted) !important;
}
.jy-toast__dismiss:hover,
.jy-toast__close:hover {
    border-color: var(--jy-border-strong) !important;
    background: var(--jy-row-hover) !important;
    color: var(--jy-text) !important;
}
.jy-toast__close {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    padding: 0;
    border-radius: 9px;
}
.jy-toast--confirm {
    border-left-color: var(--jy-gold);
    background:
        linear-gradient(110deg, rgba(var(--jy-gold-rgb), .075), transparent 65%),
        var(--jy-surface);
}
.jy-toast--confirm .toast-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
}
.jy-toast--confirm .jy-toast__icon {
    border-color: rgba(var(--jy-gold-rgb), .28);
    background: rgba(var(--jy-gold-rgb), .11);
    color: var(--jy-gold);
}
.jy-toast--success {
    border-left-color: var(--jy-primary);
}
.jy-toast--error {
    border-color: rgba(var(--jy-danger-rgb), .34);
    border-left-color: var(--jy-danger);
    background:
        linear-gradient(110deg, rgba(var(--jy-danger-rgb), .075), transparent 65%),
        var(--jy-surface);
}
.jy-toast--error .jy-toast__icon {
    border-color: rgba(var(--jy-danger-rgb), .28);
    background: rgba(var(--jy-danger-rgb), .1);
    color: var(--jy-danger);
}
[data-bs-theme="dark"] .jy-toast {
    box-shadow: 0 22px 60px rgba(0, 0, 0, .58), 0 4px 14px rgba(0, 0, 0, .36);
}

/* ---------- 表单控件 ---------- */
.form-control, .form-select, .input-group-text {
    border-radius: 8px;
    border-color: var(--jy-border-strong);
    background-color: var(--jy-control-bg);
    font-size: 15px;
    color: var(--jy-text);
}
.form-control::placeholder,
textarea::placeholder,
input::placeholder {
    color: var(--jy-text-muted);
    font-family: var(--jy-font);
    font-size: var(--jy-placeholder-size);
    font-weight: 400;
    opacity: .78;
}
.form-control:focus, .form-select:focus {
    border-color: var(--jy-primary);
    background-color: var(--jy-control-bg);
    box-shadow: 0 0 0 .2rem rgba(var(--jy-primary-rgb), .15);
}
/* Select2 自带主题包含硬编码蓝白色，必须完整覆盖其选择框、搜索框、结果和多选标签。 */
.select2-container--bootstrap-5,
.select2-container--default {
    color: var(--jy-text);
    font-family: var(--jy-font);
    font-size: 15px;
}
.select2-container--bootstrap-5 .select2-selection,
.select2-container--default .select2-selection {
    min-height: 42px;
    border: 1px solid var(--jy-border-strong) !important;
    border-radius: 8px !important;
    background-color: var(--jy-control-bg) !important;
    color: var(--jy-text) !important;
}
.select2-container--bootstrap-5 .select2-selection--single,
.select2-container--default .select2-selection--single {
    position: relative;
    height: 42px;
    padding: .55rem 2.25rem .45rem .75rem;
    background-image: none !important;
}
.select2-container--bootstrap-5 .select2-selection--single::after,
.select2-container--default .select2-selection--single::after {
    position: absolute;
    top: 50%;
    right: .9rem;
    width: 7px;
    height: 7px;
    border-right: 1.5px solid var(--jy-text-muted);
    border-bottom: 1.5px solid var(--jy-text-muted);
    content: "";
    pointer-events: none;
    transform: translateY(-70%) rotate(45deg);
}
.select2-container--bootstrap-5 .select2-selection--single .select2-selection__arrow,
.select2-container--default .select2-selection--single .select2-selection__arrow {
    display: none;
}
.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered,
.select2-container--default .select2-selection--single .select2-selection__rendered {
    padding: 0;
    color: var(--jy-text) !important;
    font-size: 15px;
    line-height: 1.5;
}
.select2-container--bootstrap-5 .select2-selection__placeholder,
.select2-container--default .select2-selection__placeholder {
    color: var(--jy-text-muted) !important;
    font-family: var(--jy-font);
    font-size: var(--jy-placeholder-size);
    font-weight: 400;
    opacity: .78;
}
.select2-container--bootstrap-5.select2-container--focus .select2-selection,
.select2-container--bootstrap-5.select2-container--open .select2-selection,
.select2-container--default.select2-container--focus .select2-selection,
.select2-container--default.select2-container--open .select2-selection {
    border-color: var(--jy-primary) !important;
    box-shadow: 0 0 0 .2rem rgba(var(--jy-primary-rgb), .15) !important;
}
.select2-container--bootstrap-5 .select2-dropdown,
.select2-container--default .select2-dropdown,
.select2-dropdown {
    overflow: hidden;
    border: 1px solid var(--jy-primary) !important;
    border-radius: 8px !important;
    background-color: var(--jy-surface) !important;
    color: var(--jy-text) !important;
    box-shadow: var(--jy-shadow);
}
.select2-container--bootstrap-5 .select2-dropdown .select2-search,
.select2-container--default .select2-dropdown .select2-search,
.select2-search--dropdown {
    padding: 8px;
    background: var(--jy-surface);
}
.select2-container--bootstrap-5 .select2-dropdown .select2-search .select2-search__field,
.select2-container--default .select2-dropdown .select2-search .select2-search__field,
.select2-search--dropdown .select2-search__field {
    min-height: 38px;
    padding: .4rem .65rem;
    border: 1px solid var(--jy-border-strong) !important;
    border-radius: 7px !important;
    outline: 0;
    background: var(--jy-control-bg) !important;
    color: var(--jy-text) !important;
    font-family: var(--jy-font);
    font-size: 15px;
}
.select2-container--bootstrap-5 .select2-dropdown .select2-search .select2-search__field:focus,
.select2-container--default .select2-dropdown .select2-search .select2-search__field:focus,
.select2-search--dropdown .select2-search__field:focus {
    border-color: var(--jy-primary) !important;
    box-shadow: 0 0 0 .2rem rgba(var(--jy-primary-rgb), .15) !important;
}
.select2-results {
    background: var(--jy-surface);
}
.select2-container--bootstrap-5 .select2-dropdown .select2-results__option,
.select2-container--default .select2-results__option,
.select2-results__option {
    padding: 8px 12px;
    background: transparent;
    color: var(--jy-text) !important;
    font-size: 15px;
}
.select2-container--bootstrap-5 .select2-dropdown .select2-results__option--highlighted,
.select2-container--bootstrap-5 .select2-dropdown .select2-results__option[aria-selected="true"].select2-results__option--highlighted,
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background-color: rgba(var(--jy-primary-rgb), .14) !important;
    color: var(--jy-text) !important;
}
.select2-container--bootstrap-5 .select2-dropdown .select2-results__option--selected,
.select2-container--bootstrap-5 .select2-dropdown .select2-results__option[aria-selected="true"]:not(.select2-results__option--highlighted),
.select2-container--default .select2-results__option--selected {
    background-color: var(--jy-primary) !important;
    color: #fff !important;
}
.select2-container--bootstrap-5 .select2-results__message,
.select2-container--bootstrap-5 .select2-results__group,
.select2-container--default .select2-results__option--disabled,
.select2-container--default .select2-results__group {
    color: var(--jy-text-muted) !important;
}
.select2-container--bootstrap-5 .select2-selection--multiple,
.select2-container--default .select2-selection--multiple {
    padding: .35rem .5rem;
}
.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice,
.select2-container--default .select2-selection--multiple .select2-selection__choice {
    border: 1px solid var(--jy-border-strong) !important;
    border-radius: 6px !important;
    background: rgba(var(--jy-primary-rgb), .09) !important;
    color: var(--jy-text) !important;
    font-size: 13px !important;
}
.select2-container--bootstrap-5 .select2-selection__clear,
.select2-container--bootstrap-5 .select2-selection__choice__remove {
    background: none !important;
    color: var(--jy-text-muted) !important;
    text-indent: 0 !important;
}
.select2-container--bootstrap-5 .select2-selection__clear::before,
.select2-container--bootstrap-5 .select2-selection__choice__remove::before {
    content: none;
}
.select2-container--bootstrap-5 .select2-selection--multiple .select2-search__field,
.select2-container--default .select2-selection--multiple .select2-search__field {
    color: var(--jy-text) !important;
}
.select2-search__field::placeholder {
    color: var(--jy-text-muted) !important;
    font-family: var(--jy-font);
    font-size: var(--jy-placeholder-size);
    font-weight: 400;
    opacity: .78;
}
.select2-container--bootstrap-5.select2-container--disabled .select2-selection,
.select2-container--default.select2-container--disabled .select2-selection {
    border-color: var(--jy-border) !important;
    background-color: var(--jy-row-hover) !important;
    color: var(--jy-text-muted) !important;
    opacity: .72;
}
[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-dropdown .select2-results__option--selected,
[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-dropdown .select2-results__option[aria-selected="true"]:not(.select2-results__option--highlighted),
[data-bs-theme="dark"] .select2-container--default .select2-results__option--selected {
    color: #17130a !important;
}
/* 复选/单选框：跟随当前主题强调色。 */
.form-check-input:checked {
    background-color: var(--jy-primary);
    border-color: var(--jy-primary);
}
.form-check-input:focus {
    border-color: var(--jy-primary);
    box-shadow: 0 0 0 .2rem rgba(var(--jy-primary-rgb), .15);
}
/* 筛选栏里“仅未完成/仅未出仓/显示详细”等勾选：让勾选框与文字垂直居中对齐、间距协调 */
.card .navbar .input-group-text label,
.service-panel-navbar .input-group-text label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 0;
    white-space: nowrap;
}
.card .navbar .input-group-text label .form-check-input,
.service-panel-navbar .input-group-text label .form-check-input {
    margin: 0;
    float: none;
}
.card .navbar .input-group-text,
.service-panel-navbar .input-group-text {
    gap: 12px;
    padding: 6px 12px;
    background: var(--jy-surface);
}

/* ---------- DataTables 分页/信息区 ---------- */
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--jy-primary) !important;
    border-color: var(--jy-primary) !important;
    color: #fff !important;
    border-radius: 6px;
}
.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 6px;
}
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_length {
    color: var(--jy-text-muted);
    font-size: 14px;
}

/* DataTables 只生成一份原生搜索控件，脚本会把它搬进统一业务工具栏。 */
.dataTables_wrapper .dataTables_filter {
    float: none;
    margin: 0;
    text-align: left;
}

/* ---------- 概览页“情况概览”卡片（原为纯黑，改柔和） ---------- */
.card.text-bg-dark,
.bg-dark.card {
    background: linear-gradient(135deg, var(--jy-primary-dark), var(--jy-primary)) !important;
    color: #fff !important;
    border: 0 !important;
}

/* ---------- 响应式业务工具栏与年月筛选 ---------- */
.service-filter-toggler {
    border-color: var(--jy-border-strong);
    color: var(--jy-text);
    font-size: 14px;
}
.service-actions {
    flex: 0 0 auto;
}
.mobile-table-hint {
    padding: 7px 12px;
    border-bottom: 1px solid var(--jy-border);
    background: rgba(var(--jy-primary-rgb), .06);
    color: var(--jy-text-muted);
    font-size: 12px;
}

.jy-date-filter {
    flex-wrap: nowrap;
}
.jy-date-filter__toggle {
    min-width: 132px;
    max-width: 220px;
    overflow: hidden;
    color: var(--jy-text) !important;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.daterangepicker {
    z-index: 3060;
    overflow: hidden;
    border: 1px solid var(--jy-border-strong);
    border-radius: 14px;
    background: var(--jy-surface);
    color: var(--jy-text);
    box-shadow: 0 18px 48px rgba(52, 68, 62, .18), var(--jy-shadow);
    font-family: var(--jy-font);
}
.daterangepicker::before {
    border-bottom-color: var(--jy-border-strong);
}
.daterangepicker::after {
    border-bottom-color: var(--jy-surface);
}
.daterangepicker.drop-up::before {
    border-top-color: var(--jy-border-strong);
}
.daterangepicker.drop-up::after {
    border-top-color: var(--jy-surface);
}
.daterangepicker .calendar-table,
.daterangepicker td.off,
.daterangepicker td.off.end-date,
.daterangepicker td.off.in-range,
.daterangepicker td.off.start-date {
    border-color: transparent;
    background: var(--jy-surface);
    color: var(--jy-text-muted);
}
.daterangepicker .calendar-table {
    border-color: var(--jy-border);
}
.daterangepicker th,
.daterangepicker td.available {
    color: var(--jy-text);
}
.daterangepicker th.month {
    color: var(--jy-text);
    font-weight: 650;
}
.daterangepicker select.monthselect,
.daterangepicker select.yearselect {
    border: 1px solid var(--jy-border-strong);
    border-radius: 6px;
    background: var(--jy-control-bg);
    color: var(--jy-text);
    font-family: var(--jy-font);
}
.daterangepicker .calendar-table .next span,
.daterangepicker .calendar-table .prev span {
    border-color: var(--jy-primary);
}
.daterangepicker td.in-range {
    background: rgba(var(--jy-primary-rgb), .12);
    color: var(--jy-text);
}
.daterangepicker td.available:hover,
.daterangepicker th.available:hover,
.daterangepicker .ranges li:hover {
    background-color: var(--jy-row-hover);
}
.daterangepicker td.active,
.daterangepicker td.active:hover,
.daterangepicker .ranges li.active {
    background-color: var(--jy-primary);
    color: #fff;
}
.daterangepicker .ranges li {
    color: var(--jy-text);
}
.daterangepicker .drp-buttons {
    border-top-color: var(--jy-border);
    background: var(--jy-surface-soft);
}
.daterangepicker .drp-selected {
    color: var(--jy-text-muted);
}
.daterangepicker .cancelBtn {
    border-color: var(--jy-border-strong);
    background: var(--jy-surface);
    color: var(--jy-text-muted);
}
[data-bs-theme="dark"] .daterangepicker {
    box-shadow: 0 22px 58px rgba(0, 0, 0, .64);
}

/* ---------- 全站 Bootstrap Modal ---------- */
.modal-backdrop.show {
    opacity: .34;
}
.modal-content {
    overflow: hidden;
    border: 1px solid var(--jy-border-strong) !important;
    border-radius: 16px !important;
    background: var(--jy-surface) !important;
    color: var(--jy-text);
    box-shadow: 0 24px 70px rgba(52, 68, 62, .18);
}
.modal-header {
    min-height: 66px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--jy-border) !important;
    background:
        radial-gradient(circle at 94% 0, rgba(var(--jy-gold-rgb), .075), transparent 12rem),
        linear-gradient(135deg, var(--jy-surface), var(--jy-surface-soft)) !important;
}
.modal-header .modal-title {
    color: var(--jy-text);
    font-weight: 700;
    letter-spacing: .02em;
}
.modal-body {
    padding: 20px;
    background: var(--jy-surface);
    color: var(--jy-text);
}
.modal-body .form-label {
    color: var(--jy-text-muted);
    font-weight: 600;
}
.modal-footer {
    gap: 8px;
    padding: 14px 20px;
    border-top: 1px solid var(--jy-border) !important;
    background: var(--jy-surface-soft);
}
.modal-footer .btn {
    min-width: 96px;
}
.modal .btn-close {
    opacity: .58;
    transition: opacity .15s ease, transform .15s ease;
}
.modal .btn-close:hover {
    opacity: .9;
    transform: rotate(8deg);
}
.jy-modal--danger .modal-content {
    border-top: 3px solid var(--jy-danger) !important;
}
.jy-modal--danger .modal-header {
    background:
        radial-gradient(circle at 0 0, rgba(var(--jy-danger-rgb), .09), transparent 15rem),
        linear-gradient(135deg, var(--jy-surface), var(--jy-surface-soft)) !important;
}
.jy-modal--danger .modal-title {
    color: var(--jy-danger);
}
.jy-modal--danger input.form-control {
    min-height: 44px;
}

/* 修改密码字段较少，保持紧凑宽度，避免沿用业务录入弹窗的大尺寸。 */
#changePWDModal .jy-change-password-dialog {
    width: min(520px, calc(100vw - 32px));
    max-width: 520px;
}

#changePWDModal .modal-content {
    border-radius: 18px !important;
}

#changePWDModal .modal-body {
    padding: 20px 22px 6px;
}

#changePWDModal #pwdForm > .col {
    margin-bottom: 14px !important;
}

#changePWDModal .modal-footer {
    padding: 13px 22px 17px;
}

@media (max-width: 575.98px) {
    #changePWDModal .jy-change-password-dialog {
        width: calc(100vw - 20px);
        margin: 10px;
    }

    #changePWDModal .modal-body {
        padding-right: 16px;
        padding-left: 16px;
    }
}

/* ---------- 录入模态框：全部字段可见，以视觉层级强调重点 ---------- */
#myModal .modal-dialog {
    max-width: min(1040px, calc(100vw - 32px));
}
#myModal .modal-content {
    max-height: calc(100vh - 3.5rem);
    max-height: calc(100dvh - 3.5rem);
    overflow: hidden;
    border: 1px solid var(--jy-border-strong);
    border-radius: 16px;
    background: var(--jy-surface);
    color: var(--jy-text);
    box-shadow: 0 24px 70px rgba(52, 68, 62, .16);
}
#myModal #myForm {
    display: flex;
    width: 100%;
    max-width: none;
    min-height: 0;
    flex: 1 1 auto;
    flex-direction: column;
    overflow: hidden;
}
#myModal .modal-header {
    min-height: 64px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--jy-border);
    background:
        radial-gradient(circle at 94% 0, rgba(var(--jy-gold-rgb), .08), transparent 13rem),
        linear-gradient(135deg, var(--jy-surface), var(--jy-surface-soft));
}
.jy-modal-title {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    gap: 12px;
    min-width: 0;
}
.jy-modal-header-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    min-width: 0;
}
.jy-modal-title__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border: 1px solid var(--jy-border-strong);
    border-radius: 12px;
    background: rgba(var(--jy-primary-rgb), .08);
    color: var(--jy-primary);
}
.jy-modal-title h4 {
    margin: 0;
    color: var(--jy-text);
    font-size: 18px;
    font-weight: 650;
    white-space: nowrap;
}
#myModal .modal-body {
    min-height: 0;
    flex: 1 1 auto;
    padding: 16px 20px;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    background: var(--jy-bg);
}
#myModal .modal-footer {
    position: sticky;
    z-index: 2;
    bottom: 0;
    flex: 0 0 auto;
    gap: 8px;
    padding: 14px 20px;
    border-top: 1px solid var(--jy-border);
    background: var(--jy-surface);
}
#myModal .modal-footer .btn {
    min-width: 124px;
}
.jy-form-section {
    margin-top: 10px;
    padding: 13px 14px;
    border: 1px solid var(--jy-border);
    border-radius: 12px;
    background: var(--jy-surface);
}
.jy-form-section--priority {
    border-left: 4px solid var(--jy-primary);
    background:
        linear-gradient(rgba(var(--jy-primary-rgb), .035), rgba(var(--jy-primary-rgb), .035)),
        var(--jy-surface);
}
.jy-form-section--secondary {
    background: var(--jy-surface-soft);
}
.jy-form-field {
    flex: 0 0 auto;
    width: 50%;
}
.jy-form-field .form-label {
    display: flex;
    align-items: center;
    min-height: 22px;
    margin-bottom: 6px;
    gap: 5px;
    color: var(--jy-text-muted);
    font-weight: 500;
}
.jy-form-field--priority .form-label {
    color: var(--jy-text);
    font-weight: 650;
}
.jy-form-field .form-control,
.jy-form-field .form-select,
.jy-form-field .select2-container .select2-selection {
    min-height: 42px;
}
.jy-form-field textarea.form-control {
    min-height: 84px;
}
.jy-required {
    color: var(--bs-danger);
    font-weight: 700;
}
.jy-featured-fields {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 10px;
}
.jy-featured-fields--multiple {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.jy-featured-check {
    padding: 9px 12px;
    border: 1px solid var(--jy-border-strong);
    border-left: 4px solid var(--jy-gold);
    border-radius: 12px;
    background:
        linear-gradient(100deg, rgba(var(--jy-primary-rgb), .11), rgba(var(--jy-gold-rgb), .035)),
        var(--jy-surface);
}
.jy-featured-check .form-check {
    display: flex;
    align-items: center;
    min-height: 28px;
    margin: 0;
    gap: 10px;
}
.jy-featured-check .form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    margin: 0;
    float: none;
}
.jy-featured-check .form-check-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--jy-text);
    font-size: 15px;
    font-weight: 650;
}
.jy-order-unit-input > .form-control {
    min-width: 0;
}
.jy-order-unit-input > .form-select {
    width: 7rem;
    max-width: 7rem;
    flex: 0 0 7rem;
}
.jy-form-field .invalid-feedback,
.jy-featured-check .invalid-feedback {
    margin-top: 5px;
}
.jy-hour-datetime {
    flex-wrap: nowrap;
}
.jy-hour-datetime .jy-hour-datetime__date {
    min-width: 0;
}
.jy-hour-datetime .jy-hour-datetime__hour {
    flex: 0 0 6.75rem;
    max-width: 6.75rem;
}
.jy-hour-datetime .jy-hour-datetime__clear {
    width: var(--jy-control-height);
    min-width: var(--jy-control-height);
    flex: 0 0 var(--jy-control-height);
    padding-inline: 0;
}
.select2-selection.is-invalid {
    border-color: var(--bs-form-invalid-border-color, #dc3545) !important;
}
.select2-selection.is-invalid:focus,
.select2-container--focus .select2-selection.is-invalid {
    box-shadow: 0 0 0 .2rem rgba(220, 53, 69, .18) !important;
}

[data-bs-theme="dark"] .navbar.bg-body-tertiary,
[data-bs-theme="dark"] .card,
[data-bs-theme="dark"] .dropdown-menu,
[data-bs-theme="dark"] .offcanvas,
[data-bs-theme="dark"] .modal-content {
    color: var(--jy-text);
    background-color: var(--jy-surface) !important;
}
[data-bs-theme="dark"] .navbar.bg-body-tertiary {
    box-shadow: 0 1px 0 rgba(var(--jy-gold-rgb), .12);
}
[data-bs-theme="dark"] .modal-backdrop.show {
    opacity: .72;
}
[data-bs-theme="dark"] .modal-content {
    box-shadow: 0 28px 80px rgba(0, 0, 0, .62);
}
[data-bs-theme="dark"] .modal .btn-close {
    filter: invert(1) grayscale(100%) brightness(145%);
}
[data-bs-theme="dark"] .btn-primary {
    color: #17130a;
}
[data-bs-theme="dark"] .btn-danger {
    color: #190b09;
}
[data-bs-theme="dark"] .btn-outline-primary {
    color: var(--jy-primary);
}
[data-bs-theme="dark"] .btn-outline-primary:hover {
    color: #17130a;
}
[data-bs-theme="dark"] .card.text-bg-dark,
[data-bs-theme="dark"] .bg-dark.card {
    border: 1px solid var(--jy-border-strong) !important;
    background: linear-gradient(135deg, #1b1913, #0f1010) !important;
    color: var(--jy-text) !important;
}
[data-bs-theme="dark"] #myModal .modal-content {
    box-shadow: 0 28px 80px rgba(0, 0, 0, .62);
}

/* Responsive 展开行：字段名和值两列展示，保留行内按钮和表单控件。 */
#myTable td.dtr-control {
    cursor: pointer;
}
#myTable > tbody > tr.child > td {
    padding: 0 !important;
    background: var(--jy-surface) !important;
}
#myTable ul.dtr-details {
    display: grid;
    width: 100%;
    margin: 0;
    padding: 8px 12px;
    gap: 0;
}
#myTable ul.dtr-details > li {
    display: grid;
    grid-template-columns: minmax(88px, 34%) 1fr;
    align-items: start;
    width: 100%;
    padding: 9px 0;
    border-bottom: 1px solid var(--jy-border);
    text-align: left;
}
#myTable ul.dtr-details > li:last-child {
    border-bottom: 0;
}
#myTable .dtr-title {
    color: var(--jy-text-muted);
    font-weight: 600;
}
#myTable .dtr-data {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--jy-text);
}
#myTable .dtr-data .form-control,
#myTable .dtr-data .form-select,
#myTable .dtr-data .btn-group {
    width: 100%;
}

/* ---------- 查询与报价：02 青瓷雾面 / 08 黑曜石堆叠玻璃 ---------- */
.jy-quote-offcanvas {
    --bs-offcanvas-width: min(420px, calc(100vw - 24px));
    isolation: isolate;
    overflow: hidden;
    color: var(--jy-text);
    border-inline: 1px solid var(--jy-border-strong) !important;
    background:
        radial-gradient(circle at 88% 8%, rgba(var(--jy-primary-rgb), .1), transparent 30%),
        radial-gradient(circle at 10% 92%, rgba(var(--jy-gold-rgb), .055), transparent 31%),
        var(--jy-quote-shell) !important;
    box-shadow: var(--jy-quote-shadow);
    backdrop-filter: blur(24px) saturate(116%);
    -webkit-backdrop-filter: blur(24px) saturate(116%);
}

.jy-quote-offcanvas::before {
    position: absolute;
    z-index: -1;
    inset: -48px -54px auto auto;
    width: 230px;
    height: 230px;
    border-radius: 50%;
    background-image:
        radial-gradient(circle, transparent 0 5px, var(--jy-quote-lace) 5.5px 6.5px, transparent 7px),
        radial-gradient(circle, transparent 0 10px, var(--jy-quote-lace) 10.5px 11.5px, transparent 12px);
    background-position: 0 0, 13px 13px;
    background-size: 26px 26px;
    content: "";
    opacity: .72;
    pointer-events: none;
    transform: rotate(18deg);
    -webkit-mask-image: radial-gradient(circle, #000 0 34%, transparent 73%);
    mask-image: radial-gradient(circle, #000 0 34%, transparent 73%);
}

.jy-quote-offcanvas::after {
    position: absolute;
    z-index: -1;
    inset: auto auto -70px -78px;
    width: 260px;
    height: 260px;
    border: 1px solid var(--jy-quote-lace);
    border-radius: 46% 54% 48% 52%;
    background:
        repeating-radial-gradient(circle at 50% 50%, transparent 0 12px, var(--jy-quote-lace) 13px, transparent 14px 24px);
    content: "";
    opacity: .5;
    pointer-events: none;
    transform: rotate(-14deg);
}

.jy-quote-header,
.jy-quote-body {
    position: relative;
    z-index: 1;
}

.jy-quote-header {
    min-height: 70px;
    padding: 13px 16px;
    border-bottom: 1px solid var(--jy-border);
    background: var(--jy-quote-glass-strong);
    box-shadow: inset 0 -1px 0 var(--jy-quote-highlight);
    backdrop-filter: blur(20px) saturate(112%);
    -webkit-backdrop-filter: blur(20px) saturate(112%);
}

.jy-quote-title {
    position: absolute;
    left: 50%;
    margin: 0;
    transform: translateX(-50%);
}

.jy-quote-title a {
    color: var(--jy-text);
    font-size: 18px;
    font-weight: 720;
    letter-spacing: .14em;
    text-decoration: none;
}

.jy-quote-title a[href]:hover,
.jy-quote-title a[href]:focus-visible {
    color: var(--jy-primary);
}

.jy-quote-side-toggle,
.jy-quote-header .btn-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    margin: 0;
    padding: 0;
    border: 1px solid var(--jy-border) !important;
    border-radius: 12px;
    background-color: var(--jy-quote-control) !important;
    box-shadow: inset 0 1px 0 var(--jy-quote-highlight);
    opacity: 1;
}

.jy-quote-header .btn-close {
    position: relative;
    color: var(--jy-text-muted);
    background-image: none;
    filter: none;
}

.jy-quote-header .btn-close::before,
.jy-quote-header .btn-close::after {
    position: absolute;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    content: "";
}

.jy-quote-header .btn-close::before {
    transform: rotate(45deg);
}

.jy-quote-header .btn-close::after {
    transform: rotate(-45deg);
}

.jy-quote-side-toggle {
    color: var(--jy-text-muted);
}

.jy-quote-side-toggle:hover,
.jy-quote-side-toggle:focus-visible,
.jy-quote-header .btn-close:hover,
.jy-quote-header .btn-close:focus-visible {
    color: var(--jy-primary);
    border-color: var(--jy-border-strong) !important;
    box-shadow: 0 0 0 3px rgba(var(--jy-primary-rgb), .12), inset 0 1px 0 var(--jy-quote-highlight);
}

.jy-quote-header .btn-close:focus {
    box-shadow: 0 0 0 3px rgba(var(--jy-primary-rgb), .12), inset 0 1px 0 var(--jy-quote-highlight);
}

.jy-quote-body {
    padding: 14px 14px calc(22px + env(safe-area-inset-bottom));
    scrollbar-color: var(--jy-border-strong) transparent;
}

.jy-quote-search-card.card {
    position: relative;
    z-index: 3;
    overflow: visible;
    margin: 0 0 14px;
    border-color: var(--jy-border-strong) !important;
    border-radius: 16px !important;
    background: var(--jy-quote-glass) !important;
    box-shadow: 0 12px 32px rgba(52, 68, 62, .08), inset 0 1px 0 var(--jy-quote-highlight) !important;
    backdrop-filter: blur(18px) saturate(112%);
    -webkit-backdrop-filter: blur(18px) saturate(112%);
}

.jy-quote-search {
    padding: 12px;
    border: 0;
    background: transparent;
}

.jy-quote-search-card > .jy-quote-model-card {
    padding: 13px 12px 12px;
    border-top: 1px solid var(--jy-border);
    background: rgba(var(--jy-primary-rgb), .035);
}

.jy-quote-model-card #canvasInForm {
    --bs-gutter-x: 10px;
}

.jy-quote-model-card .btn-group {
    margin-top: 7px;
}

.jy-quote-sections {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    padding: 0 6px 8px 0;
    gap: 8px;
}

.jy-quote-sections::before,
.jy-quote-sections::after {
    position: absolute;
    z-index: 0;
    inset: 8px 0 0 7px;
    border: 1px solid var(--jy-border);
    border-radius: 15px;
    background: var(--jy-quote-glass);
    box-shadow: inset 0 1px 0 var(--jy-quote-highlight);
    content: "";
    opacity: .34;
    pointer-events: none;
    transform: translate(3px, 3px);
}

.jy-quote-sections::after {
    opacity: .18;
    transform: translate(6px, 6px);
}

.jy-quote-section.accordion-item {
    position: relative;
    z-index: 1;
    overflow: hidden;
    margin: 0;
    border: 1px solid var(--jy-border) !important;
    border-radius: 13px !important;
    background: var(--jy-quote-glass) !important;
    box-shadow: 0 7px 22px rgba(52, 68, 62, .055), inset 0 1px 0 var(--jy-quote-highlight);
    backdrop-filter: blur(18px) saturate(110%);
    -webkit-backdrop-filter: blur(18px) saturate(110%);
}

.jy-quote-section .accordion-button {
    min-height: 54px;
    padding: 13px 15px;
    color: var(--jy-text);
    border: 0;
    background: transparent !important;
    box-shadow: none !important;
    font-size: 15px;
    font-weight: 650;
    letter-spacing: .025em;
}

.jy-quote-section .accordion-button::after {
    width: 8px;
    height: 8px;
    margin-right: 3px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    background-image: none !important;
    transform: rotate(45deg);
}

.jy-quote-section .accordion-button:not(.collapsed) {
    color: var(--jy-primary);
    border-bottom: 1px solid var(--jy-border);
    background:
        linear-gradient(90deg, rgba(var(--jy-primary-rgb), .1), transparent 66%) !important;
}

.jy-quote-section .accordion-button:not(.collapsed)::after {
    transform: rotate(225deg);
}

.jy-quote-section--quotation .accordion-button:not(.collapsed) {
    box-shadow: inset 3px 0 0 var(--jy-gold) !important;
}

.jy-quote-section .accordion-body {
    position: relative;
    padding: 15px;
    background: rgba(var(--jy-primary-rgb), .018);
}

.jy-quote-section .accordion-body::after {
    position: absolute;
    right: -22px;
    bottom: -24px;
    width: 116px;
    height: 116px;
    border-radius: 50%;
    background-image:
        radial-gradient(circle, transparent 0 4px, var(--jy-quote-lace) 4.5px 5.5px, transparent 6px);
    background-size: 20px 20px;
    content: "";
    opacity: .44;
    pointer-events: none;
    -webkit-mask-image: radial-gradient(circle, #000, transparent 70%);
    mask-image: radial-gradient(circle, #000, transparent 70%);
}

.jy-quote-offcanvas .form-label,
.jy-quote-offcanvas .form-check-label,
.jy-quote-quick-form label {
    position: relative;
    z-index: 1;
    color: var(--jy-text-muted);
    font-size: 13px;
    font-weight: 620;
}

.jy-quote-offcanvas .select2-container.jy-quote-select2-container {
    display: block;
    width: 100% !important;
    max-width: 100%;
}

.jy-quote-offcanvas .form-control,
.jy-quote-offcanvas .form-select,
.jy-quote-select2-container .select2-selection {
    min-height: 42px;
    color: var(--jy-text) !important;
    border-color: var(--jy-border-strong) !important;
    border-radius: 10px !important;
    background: var(--jy-quote-control) !important;
    box-shadow: inset 0 1px 0 var(--jy-quote-highlight);
    backdrop-filter: blur(12px) saturate(108%);
    -webkit-backdrop-filter: blur(12px) saturate(108%);
}

.jy-quote-offcanvas .form-control:focus,
.jy-quote-offcanvas .form-select:focus,
.jy-quote-select2-container.select2-container--focus .select2-selection,
.jy-quote-select2-container.select2-container--open .select2-selection {
    border-color: var(--jy-primary) !important;
    background: var(--jy-quote-glass-strong) !important;
    box-shadow: 0 0 0 3px rgba(var(--jy-primary-rgb), .13), inset 0 1px 0 var(--jy-quote-highlight) !important;
}

.jy-quote-offcanvas .form-control:disabled,
.jy-quote-offcanvas .form-control[readonly],
.jy-quote-offcanvas .form-select:disabled {
    color: var(--jy-text-muted);
    border-color: var(--jy-border) !important;
    background: rgba(var(--jy-primary-rgb), .045) !important;
    opacity: .84;
}

.jy-quote-offcanvas .form-check-input {
    border-color: var(--jy-border-strong);
    background-color: var(--jy-quote-control);
    box-shadow: inset 0 1px 0 var(--jy-quote-highlight);
}

.jy-quote-offcanvas .form-check-input:checked {
    border-color: var(--jy-primary);
    background-color: var(--jy-primary);
}

.jy-quote-select2-dropdown.select2-dropdown {
    overflow: hidden;
    border-color: var(--jy-border-strong) !important;
    border-radius: 12px !important;
    background: var(--jy-quote-glass-strong) !important;
    box-shadow: var(--jy-quote-shadow);
    backdrop-filter: blur(22px) saturate(116%);
    -webkit-backdrop-filter: blur(22px) saturate(116%);
}

.jy-quote-select2-dropdown .select2-search,
.jy-quote-select2-dropdown .select2-results {
    background: transparent !important;
}

.jy-quote-select2-dropdown .select2-search__field {
    border-color: var(--jy-border-strong) !important;
    background: var(--jy-quote-control) !important;
    color: var(--jy-text) !important;
}

.jy-quote-select2-dropdown .select2-results__option--highlighted {
    background: rgba(var(--jy-primary-rgb), .14) !important;
}

.jy-quote-result-heading > .col {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.jy-quote-copy.btn {
    min-width: 64px;
    color: var(--jy-primary);
    border-color: var(--jy-border-strong);
    background: var(--jy-quote-control);
    box-shadow: inset 0 1px 0 var(--jy-quote-highlight);
}

.jy-quote-copy.btn:hover,
.jy-quote-copy.btn:focus-visible {
    color: #fff;
    border-color: var(--jy-primary);
    background: var(--jy-primary);
}

.jy-quote-result.form-control {
    width: 100%;
    min-height: 126px;
    resize: vertical;
    text-align: left;
    line-height: 1.65;
}

.jy-quote-note {
    position: relative;
    z-index: 2;
    display: block;
    margin-top: 5px;
    padding: 10px 11px;
    color: var(--jy-text-muted);
    border: 1px solid var(--jy-border);
    border-radius: 10px;
    background: var(--jy-quote-glass);
    font-size: 11px;
    line-height: 1.55;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

[data-bs-theme="dark"] .jy-quote-offcanvas {
    background:
        radial-gradient(circle at 88% 7%, rgba(var(--jy-gold-rgb), .075), transparent 27%),
        radial-gradient(circle at 7% 94%, rgba(var(--jy-gold-rgb), .04), transparent 28%),
        var(--jy-quote-shell) !important;
}

[data-bs-theme="dark"] .jy-quote-offcanvas::before {
    opacity: .55;
}

[data-bs-theme="dark"] .jy-quote-header,
[data-bs-theme="dark"] .jy-quote-search-card.card,
[data-bs-theme="dark"] .jy-quote-section.accordion-item {
    box-shadow: 0 14px 38px rgba(0, 0, 0, .35), inset 0 1px 0 var(--jy-quote-highlight) !important;
}

[data-bs-theme="dark"] .jy-quote-sections {
    padding-right: 10px;
    padding-bottom: 12px;
}

[data-bs-theme="dark"] .jy-quote-sections::before {
    opacity: .66;
    transform: translate(5px, 5px);
}

[data-bs-theme="dark"] .jy-quote-sections::after {
    opacity: .42;
    transform: translate(9px, 9px);
}

[data-bs-theme="dark"] .jy-quote-section .accordion-button:not(.collapsed) {
    color: var(--jy-gold);
    background:
        linear-gradient(90deg, rgba(var(--jy-gold-rgb), .1), transparent 68%) !important;
}

[data-bs-theme="dark"] .jy-quote-copy.btn {
    color: #17130a;
    border-color: var(--jy-gold);
    background: var(--jy-gold);
}

[data-bs-theme="dark"] .jy-quote-copy.btn:hover,
[data-bs-theme="dark"] .jy-quote-copy.btn:focus-visible {
    color: #17130a;
    background: var(--jy-primary-dark);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .jy-quote-offcanvas,
    .jy-quote-header,
    .jy-quote-search-card.card,
    .jy-quote-section.accordion-item,
    .jy-quote-offcanvas .form-control,
    .jy-quote-offcanvas .form-select,
    .jy-quote-select2-container .select2-selection,
    .jy-quote-select2-dropdown.select2-dropdown,
    .jy-quote-note {
        background: var(--jy-surface) !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .jy-quote-offcanvas *,
    .jy-quote-offcanvas *::before,
    .jy-quote-offcanvas *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}

/* ==========================================================================
   业务表格：统一 Scroller、分类工具栏与移动工具抽屉
   ========================================================================== */
.service-table-card {
    min-height: 0;
    margin: 12px;
    overflow: visible;
}

.service-panel-navbar {
    padding: 8px 10px;
    border-bottom: 1px solid var(--jy-border);
    background: var(--jy-surface-soft);
}

.service-toolbar-groups {
    display: flex;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 7px;
}

.jy-tool-group {
    display: flex;
    align-items: stretch;
    min-width: 0;
    border: 1px solid var(--jy-border);
    border-radius: 10px;
    background: var(--jy-surface);
    box-shadow: 0 1px 2px rgba(20, 38, 31, .04);
}

.jy-tool-group:has(.service-context-actions:empty):not(:has(.service-crud-actions)) {
    display: none;
}

.jy-tool-group.is-empty {
    display: none !important;
}

.jy-tool-group--search {
    min-width: 210px;
    flex: 1 1 280px;
}

.jy-tool-group--filter {
    flex: 0 0 auto;
}

.jy-tool-group--record {
    flex: 0 1 auto;
}

.jy-tool-group--business,
.jy-tool-group--data {
    flex: 0 0 auto;
}

.jy-tool-group__body,
.service-context-actions {
    display: flex;
    align-items: center;
    min-width: 0;
    flex-wrap: wrap;
    gap: 6px;
    padding: 5px 7px;
}

.service-filters {
    display: flex;
    align-items: center;
    min-width: 0;
    flex: 1 1 auto;
    flex-wrap: wrap;
    gap: 5px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.service-filters > .nav-item {
    margin: 0 !important;
}

.jy-table-search-slot,
.jy-table-search-filter,
.jy-table-search-control {
    width: 100%;
    min-width: 0;
}

.jy-table-search-filter label {
    margin: 0;
}

.jy-table-search-control {
    flex-wrap: nowrap;
}

.jy-table-search-input {
    min-width: 120px;
}

.jy-table-search-actions {
    display: inline-flex;
    flex: 0 0 auto;
}

.jy-table-search-clear[hidden] {
    display: none !important;
}

.jy-table-search-submit,
.jy-table-search-clear {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 5px;
    white-space: nowrap;
}

.jy-more-filter-toggle {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
}

.jy-more-filter-menu {
    z-index: 1250;
    width: min(760px, calc(100vw - 28px));
    max-width: calc(100vw - 28px);
    padding: 9px;
    color: var(--jy-text);
    border-color: var(--jy-border);
    background: var(--jy-surface);
    box-shadow: 0 12px 30px rgba(16, 30, 24, .16);
}

.jy-more-filter-menu .service-filters {
    align-items: stretch;
}

.jy-more-filter-menu .select2-container,
.jy-more-filter-menu .selection,
.jy-more-filter-menu .select2-selection,
.jy-more-filter-menu .select2-selection__rendered,
.jy-more-filter-menu .select2-search,
.jy-more-filter-menu .select2-search__field {
    box-sizing: border-box;
    min-width: 0 !important;
    max-width: 100% !important;
}

.jy-table-mobile-search-slot:empty {
    display: none;
}

.service-generated-filter-slot {
    min-width: 170px;
    flex: 1 1 190px;
}

.service-generated-filter-slot .dataTables_filter,
.service-generated-filter-slot .dataTables_filter label,
.account-generated-filter-slot .dataTables_filter,
.account-generated-filter-slot .dataTables_filter label {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 6px;
    margin: 0;
}

.service-generated-filter-slot .dataTables_filter input,
.account-generated-filter-slot .dataTables_filter input {
    width: 100%;
    min-width: 120px;
    min-height: 36px;
    margin: 0 !important;
}

.service-crud-actions,
.service-context-actions .btn-group {
    display: inline-flex;
}

.jy-data-actions-direct {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

@media (min-width: 768px) {
    .jy-data-actions-menu [data-jy-core-data-action] {
        display: none;
    }

    .jy-data-actions-menu:not(:has([data-jy-page-data-action])) {
        display: none;
    }
}

.jy-selection-feedback {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    min-height: 32px;
    gap: 7px;
    padding: 4px 8px;
    color: var(--jy-text-muted);
    border: 1px solid var(--jy-border);
    border-radius: 8px;
    background: var(--jy-surface-soft);
    box-shadow: inset 0 1px 0 color-mix(in srgb, var(--jy-surface) 72%, transparent);
    transition: color .18s ease, border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
    white-space: nowrap;
}

.jy-selection-feedback.has-selection {
    color: var(--jy-text);
    border-color: color-mix(in srgb, var(--jy-gold) 52%, var(--jy-border));
    background: color-mix(in srgb, var(--jy-priority-bg) 88%, var(--jy-gold) 12%);
    box-shadow: inset 3px 0 0 var(--jy-primary), 0 2px 8px rgba(var(--jy-primary-rgb), .1);
}

.jy-selection-status,
.jy-selection-summary {
    color: inherit;
    font-size: 12px;
    white-space: nowrap;
}

.jy-selection-status strong {
    display: inline-grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    margin-inline: 2px;
    padding-inline: 5px;
    color: var(--jy-primary);
    border-radius: 999px;
    background: color-mix(in srgb, var(--jy-primary) 10%, var(--jy-surface));
    font-size: 11px;
    line-height: 1;
}

.jy-selection-feedback.has-selection .jy-selection-status strong {
    color: var(--jy-surface);
    background: var(--jy-primary);
}

[data-bs-theme="dark"] .jy-selection-feedback.has-selection {
    border-color: color-mix(in srgb, var(--jy-gold) 62%, var(--jy-border));
    background: color-mix(in srgb, var(--jy-surface-soft) 84%, var(--jy-gold) 16%);
    box-shadow: inset 3px 0 0 var(--jy-gold), 0 3px 12px rgba(0, 0, 0, .28);
}

[data-bs-theme="dark"] .jy-selection-feedback.has-selection .jy-selection-status strong {
    color: var(--jy-bg);
    background: var(--jy-gold);
}

.service-table-card > .card-body {
    position: relative;
    min-height: 0;
    padding: 0;
}

/* Scroller 运行状态固定悬浮在表体底部，不占用虚拟滚动的高度计算。 */
.jy-table-runtime-status {
    position: absolute;
    right: 10px;
    bottom: 8px;
    z-index: 12;
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    gap: 7px;
    padding: 4px 8px;
    color: var(--jy-text-muted);
    border: 1px solid color-mix(in srgb, var(--jy-border) 82%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--jy-surface) 92%, transparent);
    box-shadow: 0 3px 12px rgba(20, 38, 31, .08);
    font-size: 11px;
    line-height: 1.2;
    pointer-events: none;
    backdrop-filter: blur(8px);
}

.jy-table-runtime-status.is-loading::before {
    width: 12px;
    height: 12px;
    flex: 0 0 12px;
    content: "";
    border: 2px solid color-mix(in srgb, var(--jy-primary) 24%, transparent);
    border-top-color: var(--jy-primary);
    border-radius: 50%;
    animation: jy-table-status-spin .7s linear infinite;
}

.jy-table-runtime-status.is-error {
    color: var(--bs-danger-text-emphasis);
    border-color: color-mix(in srgb, var(--bs-danger) 34%, var(--jy-border));
    background: color-mix(in srgb, var(--bs-danger-bg-subtle) 88%, var(--jy-surface));
    pointer-events: auto;
}

.jy-table-runtime-status .jy-table-retry {
    min-height: 24px;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 11px;
    pointer-events: auto;
}

@keyframes jy-table-status-spin {
    to { transform: rotate(360deg); }
}

.jy-table-scroll-hint {
    position: absolute;
    left: 50%;
    bottom: 48px;
    z-index: 14;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    color: var(--jy-surface);
    border-radius: 999px;
    background: color-mix(in srgb, var(--jy-text) 88%, transparent);
    box-shadow: 0 5px 16px rgba(0, 0, 0, .18);
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    transform: translate(-50%, 6px);
    transition: opacity .2s ease, transform .2s ease;
    pointer-events: none;
}

.jy-table-scroll-hint.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* 票据、库存共用的常驻分段标签。 */
.jy-table-tabs {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px;
    border: 1px solid var(--jy-border);
    border-radius: 9px;
    background: var(--jy-surface-soft);
}

.jy-table-tabs .btn,
.jy-table-tabs [role="tab"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 32px;
    padding: 4px 10px;
    color: var(--jy-text-muted);
    border: 0 !important;
    border-radius: 7px !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: 12px;
    white-space: nowrap;
}

.jy-table-tabs .btn.active,
.jy-table-tabs [role="tab"].active,
.jy-table-tabs [role="tab"][aria-selected="true"] {
    color: var(--jy-surface) !important;
    background: var(--jy-primary) !important;
}

.jy-table-tabs .btn:not(.active):hover,
.jy-table-tabs [role="tab"][aria-selected="false"]:hover {
    color: var(--jy-primary) !important;
    background: var(--jy-row-hover) !important;
}

.jy-table-tabs .jy-tab-count {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    min-height: 20px;
    padding: 2px 6px;
    color: var(--jy-text) !important;
    background: var(--jy-surface) !important;
    border: 1px solid var(--jy-border);
    font-size: 10px;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.jy-table-tabs .btn.active .jy-tab-count,
.jy-table-tabs [role="tab"][aria-selected="true"] .jy-tab-count {
    color: var(--jy-text) !important;
    background: var(--jy-surface) !important;
    border-color: color-mix(in srgb, var(--jy-primary) 46%, var(--jy-border));
}

[data-bs-theme="dark"] .jy-table-tabs .btn:not(.active):hover,
[data-bs-theme="dark"] .jy-table-tabs [role="tab"][aria-selected="false"]:hover {
    color: var(--jy-primary) !important;
    background: var(--jy-row-hover) !important;
}

.service-table-card .dataTables_wrapper,
.service-table-card .dataTables_scroll,
.service-table-card .dataTables_scrollBody {
    min-width: 0;
    min-height: 0;
}

.service-table-card .dataTables_paginate,
.service-table-card .dataTables_length,
.service-table-card .dataTables_info,
.service-table-card .data-table-footer,
.service-table-card .jy-native-table-tools {
    display: none !important;
}

.service-table-card .dataTables_scrollHead {
    position: sticky;
    top: 0;
    z-index: 4;
    border-bottom: 1px solid var(--jy-border) !important;
    background: var(--jy-th-bg);
}

.service-table-card .dataTables_scrollBody {
    overflow: auto !important;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.service-table-card .dataTables_scrollHead table,
.service-table-card .dataTables_scrollBody table {
    width: max-content !important;
    min-width: 100% !important;
    table-layout: fixed;
}

.service-table-card .dataTables_scrollHead thead th,
.service-table-card #myTable tbody > tr:not(.child) > td {
    height: 42px;
    max-height: 42px;
    padding: 7px 9px !important;
    overflow: hidden;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap !important;
}

.service-table-card #myTable tbody > tr:not(.child) > td {
    max-width: 260px;
    cursor: default;
}

.service-table-card .jy-table-cell--number {
    text-align: right !important;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
}

.service-table-card .jy-table-cell--date {
    text-align: center !important;
    font-variant-numeric: tabular-nums;
}

.service-table-card table.dataTable .jy-table-cell--text {
    text-align: left !important;
}

/* 所有业务表、统计表的表头和数据单元格统一居中。 */
.service-table-card .dataTables_scrollHead table.dataTable thead th,
.service-table-card #myTable thead th,
.jy-overview-table thead th {
    text-align: center !important;
}

.service-table-card #myTable tbody td,
.jy-overview-table tbody td,
.jy-document-table tbody td {
    text-align: center !important;
}

/* Scroller 为测量列宽复制到表体内的表头必须保持零高。 */
.service-table-card .dataTables_scrollBody #myTable > thead,
.service-table-card .dataTables_scrollBody #myTable > thead > tr,
.service-table-card .dataTables_scrollBody #myTable > thead > tr > th,
.service-table-card .dataTables_scrollBody #myTable > thead > tr > td {
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    border-top: 0 !important;
    border-bottom: 0 !important;
    font-size: 0 !important;
    line-height: 0 !important;
    overflow: hidden !important;
}

.service-table-card .dataTables_scrollBody #myTable > thead .dataTables_sizing {
    height: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

.service-table-card #myTable tbody > tr.selected > * {
    color: var(--jy-text);
    box-shadow: inset 3px 0 0 var(--jy-primary);
    background: var(--jy-row-hover) !important;
}

/* 单条保存只更新当前 DataTables 行：淡出离开筛选的记录，并轻提示原位更新。 */
.service-table-card #myTable tbody > tr:not(.child) > td {
    transition: opacity .14s ease, filter .14s ease;
}

.service-table-card #myTable tbody > tr.jy-row-mutation-leaving > td {
    opacity: 0;
    filter: saturate(.7);
}

.service-table-card #myTable tbody > tr.jy-row-mutation-saved > td {
    animation: jy-row-mutation-saved .9s ease;
}

@keyframes jy-row-mutation-saved {
    0%, 100% { background-color: transparent; }
    20% { background-color: rgba(var(--jy-primary-rgb), .14); }
}

@media (prefers-reduced-motion: reduce) {
    .service-table-card #myTable tbody > tr:not(.child) > td {
        transition: none;
    }

    .service-table-card #myTable tbody > tr.jy-row-mutation-saved > td {
        animation: none;
    }
}

.jy-table-cell-popover {
    --bs-popover-max-width: min(420px, calc(100vw - 24px));
    --bs-popover-bg: var(--jy-surface);
    --bs-popover-border-color: var(--jy-border);
    --bs-popover-body-color: var(--jy-text);
}

.jy-table-cell-popover .popover-body {
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.jy-order-flow-tabs {
    max-width: min(100%, 780px);
    overflow-x: auto;
}

.jy-order-stacked-cell,
.jy-model-preview-stack {
    display: inline-flex;
    min-width: 0;
    max-width: 100%;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    line-height: 1.15;
    vertical-align: middle;
}

.jy-order-stacked-cell__primary {
    max-width: 100%;
    color: var(--jy-text);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.jy-order-stacked-cell__secondary,
.jy-model-preview-secondary {
    display: block;
    max-width: 100%;
    overflow: hidden;
    color: var(--jy-text-muted);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jy-order-stacked-cell__extra-fee {
    color: var(--jy-gold);
    font-weight: 650;
    font-variant-numeric: tabular-nums;
}

.jy-order-stacked-cell__remark {
    color: var(--jy-gold);
    font-weight: 650;
}

.jy-order-identity {
    gap: 4px;
}

.jy-order-flow-anchor {
    color: var(--jy-primary);
    font-weight: 700;
    cursor: context-menu;
}

.jy-order-flow-pending {
    color: var(--jy-gold);
    font-size: 11px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1.15;
    white-space: nowrap;
}

.jy-order-payment-badge {
    display: inline-flex;
    max-width: 100%;
    align-items: center;
    justify-content: center;
    gap: 4px;
    overflow: hidden;
    color: var(--bs-white) !important;
    border: 1px solid color-mix(in srgb, var(--bs-danger) 78%, var(--jy-text));
    background: var(--bs-danger) !important;
    font-size: 10px;
    font-weight: 650;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jy-order-payment-badge__warning-dot {
    width: 5px;
    height: 5px;
    flex: 0 0 5px;
    border-radius: 50%;
    background: var(--bs-warning);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--bs-warning) 48%, transparent);
}

.jy-finished-quantity-stack {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    max-width: 100%;
}

.jy-finished-quantity-editor {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
    max-width: 100%;
    color: var(--jy-text-muted);
    white-space: nowrap;
}

.jy-finished-quantity-readonly {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
    max-width: 100%;
    color: var(--jy-text-muted);
    white-space: nowrap;
}

.jy-finished-quantity-metric {
    color: var(--jy-text-muted);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
}

.jy-finished-quantity-display {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 92px;
    min-height: 30px;
    padding: 3px 7px;
    color: var(--jy-text);
    border: 1px solid transparent;
    border-radius: var(--bs-border-radius-sm);
    cursor: text;
    touch-action: manipulation;
}

.jy-finished-quantity-display:hover,
.jy-finished-quantity-display:focus-visible {
    border-color: var(--jy-border);
    background: var(--jy-control-bg, var(--jy-surface));
    outline: 0;
}

.jy-finished-quantity-editor__control {
    display: none;
    align-items: center;
    gap: 5px;
    min-width: 0;
}

.jy-finished-quantity-editor.is-editing .jy-finished-quantity-display {
    display: none;
}

.jy-finished-quantity-editor.is-editing .jy-finished-quantity-editor__control {
    display: inline-flex;
}

.jy-finished-quantity-editor .finished-quantity-input {
    width: 124px;
    max-width: 100%;
    min-height: 30px;
    color: var(--jy-text);
    border-color: var(--jy-border);
    background: var(--jy-control-bg, var(--jy-surface));
    text-align: right;
}

.jy-finished-quantity-result,
.jy-finished-quantity-unit {
    color: var(--jy-text-muted);
    font-size: 11px;
}

.jy-finished-quantity-editor .finished-quantity-input:focus {
    border-color: var(--jy-primary);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--jy-primary) 18%, transparent);
}

.jy-finished-balance-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 22px;
    padding: 2px 6px;
    color: var(--jy-primary-dark);
    border: 1px solid color-mix(in srgb, var(--jy-gold) 54%, var(--jy-border));
    border-radius: 999px;
    background: color-mix(in srgb, var(--jy-priority-bg) 84%, var(--jy-gold) 16%);
    font-size: 10px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.jy-order-progress-badge,
.jy-order-void-only-badge {
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
}

.jy-order-progress-badge {
    border: 1px solid transparent;
}

.jy-order-progress-filter-trigger {
    appearance: none;
    font-family: inherit;
    line-height: 1;
    cursor: pointer;
    transition: filter .16s ease, box-shadow .16s ease;
}

.jy-order-progress-filter-trigger:hover {
    filter: brightness(.94);
}

.jy-order-progress-filter-trigger:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 2px var(--jy-surface), 0 0 0 4px var(--jy-primary);
}

.jy-order-progress-filter-control {
    width: 156px;
    min-width: 156px;
    flex-wrap: nowrap;
}

.jy-order-progress-filter-control .form-select {
    white-space: nowrap;
}

.jy-order-progress-filter-control .form-select {
    min-width: 0;
}

.jy-order-progress-badge--awaiting-inbound {
    color: var(--bs-danger-text-emphasis) !important;
    border-color: var(--bs-danger-border-subtle);
    background: var(--bs-danger-bg-subtle) !important;
}

.jy-order-progress-badge--partial-inbound {
    color: var(--bs-warning-text-emphasis) !important;
    border-color: var(--bs-warning-border-subtle);
    background: var(--bs-warning-bg-subtle) !important;
}

.jy-order-progress-badge--dyed-waiting {
    color: var(--bs-info-text-emphasis) !important;
    border-color: var(--bs-info-border-subtle);
    background: var(--bs-info-bg-subtle) !important;
}

.jy-order-progress-badge--greige-waiting {
    color: color-mix(in srgb, var(--bs-purple) 78%, var(--jy-text)) !important;
    border-color: color-mix(in srgb, var(--bs-purple) 52%, var(--jy-border));
    background: color-mix(in srgb, var(--bs-purple) 16%, var(--jy-surface)) !important;
}

.jy-order-progress-badge--completion-review {
    color: var(--bs-secondary-text-emphasis) !important;
    border-color: var(--bs-secondary-border-subtle);
    background: var(--bs-secondary-bg-subtle) !important;
}

.jy-order-progress-badge--completed {
    color: var(--bs-success-text-emphasis) !important;
    border-color: var(--bs-success-border-subtle);
    background: var(--bs-success-bg-subtle) !important;
}

@media (max-width: 991.98px) {
    .jy-order-progress-filter-control {
        width: 100%;
        min-width: 0;
    }
}

.jy-order-flow-popover {
    --bs-popover-max-width: min(780px, calc(100vw - 16px));
    --bs-popover-bg: var(--jy-surface);
    --bs-popover-border-color: var(--jy-border);
    --bs-popover-body-color: var(--jy-text);
    max-width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
    overflow: hidden;
}

.jy-order-flow-popover .popover-body {
    max-height: calc(100vh - 28px);
    max-height: calc(100dvh - 28px);
    overflow: hidden;
}

.jy-order-flow-details {
    width: min(730px, calc(100vw - 48px));
    max-width: 100%;
    max-height: min(620px, calc(100vh - 56px));
    max-height: min(620px, calc(100dvh - 56px));
    overscroll-behavior: contain;
    overflow-x: hidden;
    overflow-y: auto;
}

.jy-order-flow-section + .jy-order-flow-section {
    margin-top: 12px;
}

.jy-order-flow-section__title {
    position: sticky;
    z-index: 1;
    top: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 6px 2px;
    border-bottom: 1px solid var(--jy-border);
    background: var(--jy-surface);
}

.jy-order-flow-section__heading {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.jy-order-flow-section__summary {
    margin-left: auto;
    color: var(--jy-text-muted);
    font-size: .875rem;
    font-weight: 600;
    text-align: right;
}

@media (max-width: 575.98px) {
    .jy-order-flow-section__summary {
        width: 100%;
        margin-left: 0;
        text-align: left;
    }
}

.jy-order-flow-detail-item {
    padding: 9px 2px;
    border-bottom: 1px solid var(--jy-border);
}

.jy-order-flow-detail-item:last-child {
    border-bottom: 0;
}

.jy-order-flow-detail-item.is-void,
.jy-order-flow-detail-item.is-void strong {
    color: var(--jy-text-muted);
}

.jy-order-flow-detail-heading,
.jy-order-flow-detail-badges,
.jy-order-flow-detail-values {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.jy-order-flow-detail-heading {
    margin-bottom: 6px;
}

.jy-order-flow-detail-badges {
    margin-left: auto;
}

.jy-order-flow-detail-values {
    display: grid;
    grid-template-columns: repeat(4, minmax(95px, 1fr));
    gap: 6px 12px;
}

.jy-order-flow-detail-value {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 1px;
}

.jy-order-flow-detail-value small,
.jy-order-flow-detail-note {
    color: var(--jy-text-muted);
    font-size: 11px;
}

.jy-order-flow-detail-note {
    margin-top: 6px;
    overflow-wrap: anywhere;
}

@media (max-width: 575.98px) {
    .jy-order-flow-detail-values {
        grid-template-columns: repeat(2, minmax(88px, 1fr));
    }
}

.jy-mobile-filter-toggle {
    display: none;
}

@media (max-width: 767.98px) {
    .jy-app-topbar,
    .service-table-card > form > .service-panel-navbar {
        transition: transform .2s ease, margin .2s ease, padding .2s ease,
                    max-height .2s ease, opacity .16s ease, border-color .16s ease;
    }

    .jy-table-topbar-hidden .jy-app-topbar {
        margin-bottom: calc(-1 * var(--jy-app-topbar-height));
        transform: translateY(-100%);
    }

    .service-table-card > form > .service-panel-navbar {
        max-height: 520px;
        opacity: 1;
        overflow: hidden;
    }

    .jy-table-topbar-hidden .service-table-card > form > .service-panel-navbar {
        max-height: 0;
        margin-block: 0;
        padding-block: 0;
        opacity: 0;
        border-color: transparent;
        transform: translateY(-100%);
        pointer-events: none;
    }

    .service-table-card {
        margin: 0;
        border-inline: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    .service-table-card .dataTables_scrollHead thead th,
    .service-table-card #myTable tbody > tr:not(.child) > td {
        height: 40px;
        max-height: 40px;
        padding: 6px 8px !important;
        font-size: 12.5px !important;
        white-space: nowrap !important;
    }

    .service-table-card .dataTables_scrollHead table,
    .service-table-card .dataTables_scrollBody table,
    .jy-production-service #myTable {
        width: max-content !important;
        min-width: 100% !important;
        table-layout: fixed;
    }

}

/* ==========================================================================
   全站默认单行控件尺寸契约
   多行输入、复选框/开关、明确的大小按钮及首页/导航大按钮不受此规则影响。
   ========================================================================== */
.form-control:not(textarea):not([type="file"]):not([type="checkbox"]):not([type="radio"]),
.form-select:not([multiple]):not([size]),
.input-group > .input-group-text {
    height: var(--jy-control-height);
    min-height: var(--jy-control-height);
}

.form-control:not(textarea):not([type="file"]):not([type="checkbox"]):not([type="radio"]),
.form-select:not([multiple]):not([size]) {
    padding-block: 6px;
    line-height: 1.5;
}

.select2-container--bootstrap-5 .select2-selection--single,
.select2-container--default .select2-selection--single {
    height: var(--jy-control-height) !important;
    min-height: var(--jy-control-height) !important;
    padding-block: 6px !important;
}

.select2-container--bootstrap-5 .select2-selection--multiple,
.select2-container--default .select2-selection--multiple {
    height: auto;
    min-height: var(--jy-control-height) !important;
}

.btn:not(.btn-sm):not(.btn-lg):not(.btn-link):not(.btn-close):not(.accordion-button):not(.navbar-toggler):not(.jy-rail-action):not(.jy-quote-side-toggle):not(.jy-inventory-mode-toggle):not(.jy-topbar-quote):not(.jy-home-login):not(.tag_link) {
    height: var(--jy-control-height);
    min-height: var(--jy-control-height);
    padding-block: 6px;
    line-height: 1.5;
}

.btn-group-sm > .btn,
.btn-group-lg > .btn {
    height: auto;
    min-height: 0;
}

.jy-auth-fields .form-control,
.jy-auth-fields .captcha,
.jy-quote-offcanvas .form-control:not(textarea),
.jy-quote-offcanvas .form-select:not([multiple]),
.jy-quote-select2-container .select2-selection--single {
    height: var(--jy-control-height) !important;
    min-height: var(--jy-control-height) !important;
}

.service-panel-navbar .input-group-text label,
.service-panel-navbar label:has(> .form-check-input) {
    display: inline-flex;
    align-items: center;
    min-height: 0;
    gap: 5px;
    margin: 0;
    line-height: 1.25;
}

.service-panel-navbar label > .form-check-input,
#myTable tbody td > .form-check-input {
    float: none;
    margin: 0 !important;
}

#myTable tbody td > .form-check-input {
    display: block;
    margin-inline: auto !important;
    vertical-align: middle;
}

@media (max-width: 767.98px) {
    :root,
    [data-bs-theme="light"],
    [data-bs-theme="dark"] {
        --jy-control-height: 38px;
    }

    .jy-mobile-filter-collapse .form-control,
    .jy-mobile-filter-collapse .form-select,
    .jy-mobile-filter-collapse .btn,
    .jy-mobile-filter-collapse .input-group-text,
    .jy-mobile-filter-collapse .select2-selection--single,
    .jy-tool-group--record .service-crud-actions > .btn,
    .jy-tool-group--business .btn,
    .jy-tool-group--data .jy-data-actions-menu > .btn,
    .jy-data-actions-direct > .btn {
        height: var(--jy-control-height) !important;
        min-height: var(--jy-control-height) !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .jy-app-topbar,
    .service-table-card > form > .service-panel-navbar,
    .jy-selection-feedback {
        transition: none;
    }
}

/* ---------- 业务表格：型号图片悬停 / 点按预览 ---------- */
.jy-model-preview-trigger {
    color: var(--jy-primary-dark);
    text-decoration: underline dotted color-mix(in srgb, var(--jy-primary) 62%, transparent);
    text-underline-offset: 3px;
    cursor: zoom-in;
    outline: none;
}

.jy-model-preview-trigger:hover,
.jy-model-preview-trigger:focus-visible {
    color: var(--jy-primary);
    text-decoration-style: solid;
}

.jy-model-preview-trigger:focus-visible {
    border-radius: 4px;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--jy-primary) 18%, transparent);
}

.jy-model-preview-trigger.is-image-missing {
    color: var(--jy-text-muted);
    text-decoration: none;
    cursor: not-allowed;
    opacity: .72;
}

.jy-quote-title .jy-model-preview-trigger {
    text-decoration: none;
}

.jy-model-image-popover {
    --bs-popover-max-width: 280px;
    --bs-popover-border-color: var(--jy-border-strong);
    --bs-popover-bg: var(--jy-surface);
    --bs-popover-body-padding-x: 0;
    --bs-popover-body-padding-y: 0;
    z-index: 1090;
    width: min(280px, calc(100vw - 24px));
    border-radius: calc(var(--jy-radius) + 2px);
    box-shadow: var(--jy-shadow);
}

.jy-model-image-popover .popover-body {
    overflow: hidden;
    border-radius: calc(var(--jy-radius) + 1px);
}

.jy-model-image-preview {
    position: relative;
    width: 100%;
    min-height: 120px;
    margin: 0;
    overflow: hidden;
    background: var(--jy-surface-soft);
}

.jy-model-image-preview__image {
    display: block;
    width: 100%;
    max-height: 360px;
    object-fit: contain;
}

.jy-model-image-preview__watermark {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    min-height: 34px;
    padding: 8px 10px;
    overflow: hidden;
    color: var(--jy-surface);
    background: color-mix(in srgb, var(--jy-text) 80%, transparent);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    font-size: 12px;
    font-weight: 650;
    line-height: 1.2;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

[data-bs-theme="dark"] .jy-model-image-preview__watermark {
    color: var(--jy-text);
    background: color-mix(in srgb, var(--jy-bg) 82%, transparent);
}

@media (max-width: 767.98px) {
    .jy-model-image-popover {
        --bs-popover-max-width: min(280px, calc(100vw - 20px));
        width: min(280px, calc(100vw - 20px));
    }

    .jy-model-preview-trigger {
        cursor: pointer;
    }
}

@media (max-width: 991.98px) {
    body > .navbar > .container-fluid {
        row-gap: 8px;
    }
    body > .navbar .navbar-collapse {
        flex-basis: 100%;
        order: 4;
    }
    body > .navbar .quote-nav-action {
        margin-left: auto;
        margin-right: 6px;
    }
    body > .navbar .quote-nav-action .btn {
        min-height: 40px;
    }
}

.jy-order-color-stack {
    display: inline-flex;
    min-width: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.2;
}

.jy-order-color-code {
    margin-top: 2px;
    color: var(--jy-text-muted);
    font-size: inherit;
    line-height: inherit;
    overflow-wrap: anywhere;
}

@media (max-width: 767.98px) {
    .service-panel-navbar {
        padding: 8px;
    }
    .service-panel-navbar > .container-fluid {
        padding: 0;
        gap: 8px;
    }
    .service-filter-toggler {
        order: 2;
        min-height: 42px;
        padding: 8px 12px;
    }
    .service-panel-navbar .navbar-collapse {
        flex-basis: 100%;
        order: 4;
        width: 100%;
    }
    .service-filters {
        width: 100%;
        margin: 0 !important;
        padding-top: 4px;
    }
    .service-filters .nav-item,
    .service-filters .input-group,
    .service-filters .input-group-text {
        width: 100%;
    }
    .service-filters .nav-item {
        margin: 4px 0 !important;
    }
    .service-filters .form-control,
    .service-filters .form-select {
        max-width: none !important;
        min-height: 44px;
    }
    .service-filters .input-group-text {
        min-height: 44px;
        justify-content: center;
    }
    .service-actions {
        order: 3;
        width: 100%;
    }
    .service-actions > .nav-item,
    .service-actions .btn-group {
        display: flex;
        width: 100%;
        margin: 0 !important;
    }
    .service-actions .btn-group > .btn {
        flex: 1 1 0;
        min-height: 44px;
    }

    .card > .card-body {
        padding: 0;
    }
    .card > .card-body .dataTables_wrapper > .data-table-footer {
        gap: 8px;
        padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    }
    .data-table-footer .dataTables_info,
    .data-table-footer #sum {
        flex: 1 1 100%;
        padding: 0 !important;
        text-align: center;
    }
    .data-table-footer .dataTables_paginate {
        flex: 1 1 auto;
        margin: 0 !important;
        text-align: left;
    }
    .data-table-footer .dt-buttons {
        flex: 0 0 auto;
    }

    #myTable {
        width: 100% !important;
        table-layout: fixed;
    }
    #myTable thead th {
        padding: 8px 4px !important;
        overflow: hidden;
        font-size: 12px !important;
        line-height: 1.25;
        text-overflow: ellipsis;
        white-space: normal;
    }
    #myTable tbody > tr:not(.child) > td {
        padding: 9px 4px !important;
        overflow: hidden;
        font-size: 13px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .jy-date-filter__toggle {
        flex: 1 1 auto;
        max-width: none;
        min-height: 44px;
        text-align: left;
    }
    .jy-date-filter > #date_clear {
        flex: 0 0 44px;
        min-height: 44px;
    }
    .daterangepicker {
        position: fixed !important;
        top: max(8px, env(safe-area-inset-top)) !important;
        right: 8px !important;
        bottom: max(8px, env(safe-area-inset-bottom)) !important;
        left: 8px !important;
        width: auto !important;
        max-height: none;
        margin: 0;
        overflow-x: hidden;
        overflow-y: auto;
        border-radius: 16px;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }
    .daterangepicker::before,
    .daterangepicker::after {
        display: none;
    }
    .daterangepicker .ranges {
        margin: 0;
        padding: 8px;
    }
    .daterangepicker .ranges ul {
        display: grid;
        width: 100%;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
    }
    .daterangepicker .ranges li {
        display: grid;
        min-height: 38px;
        place-items: center;
        padding: 6px 4px;
        border: 1px solid var(--jy-border);
        border-radius: 8px;
        text-align: center;
    }
    .daterangepicker .drp-calendar,
    .daterangepicker .drp-calendar.left,
    .daterangepicker .drp-calendar.right {
        width: 100%;
        max-width: none;
        float: none;
        clear: both;
        padding: 8px;
    }
    .daterangepicker .drp-calendar.left .calendar-table,
    .daterangepicker .drp-calendar.right .calendar-table {
        padding: 0;
        border: 1px solid var(--jy-border);
        border-radius: 10px;
    }
    .daterangepicker .calendar-table td,
    .daterangepicker .calendar-table th {
        height: 32px;
        line-height: 32px;
    }
    .daterangepicker .drp-buttons {
        position: sticky;
        bottom: 0;
        z-index: 1;
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 6px;
        padding: 8px calc(8px + env(safe-area-inset-right))
                 calc(8px + env(safe-area-inset-bottom))
                 calc(8px + env(safe-area-inset-left));
    }
    .daterangepicker .drp-selected {
        width: 100%;
        padding: 0 0 4px;
        line-height: 1.35;
    }
    .daterangepicker .drp-buttons .btn {
        min-height: 38px;
        flex: 1 1 0;
        margin: 0;
    }

    #myModal .modal-dialog {
        width: 100vw;
        max-width: none;
        height: 100%;
        height: 100dvh;
        max-height: 100dvh;
        margin: 0;
    }
    #myModal .modal-content {
        height: 100%;
        min-height: 0;
        max-height: 100dvh;
    }
    #myModal .modal-body {
        padding: 14px;
    }
    #myModal .modal-header {
        min-height: 68px;
        padding: 12px 14px;
    }
    .jy-modal-title__icon {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
    }
    .jy-modal-title h4 {
        font-size: 16px;
    }
    .jy-form-section {
        padding: 12px;
    }
    .jy-featured-fields--multiple {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }
    .jy-featured-fields--multiple .jy-featured-check {
        padding: 11px 12px;
    }
    .jy-featured-fields--multiple .jy-featured-check .form-check-label {
        gap: 5px;
        font-size: 14px;
    }
    .jy-form-field {
        width: 100%;
    }
    .jy-form-field .form-control,
    .jy-form-field .form-select,
    .jy-form-field .select2-container .select2-selection {
        min-height: 44px;
    }
    #myModal .modal-footer {
        flex-wrap: nowrap;
        padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
        background: var(--jy-surface);
        box-shadow: 0 -4px 14px rgba(15, 23, 42, .08);
    }
    #myModal .modal-footer .btn {
        min-height: 44px;
        min-width: 0;
        flex: 1 1 0;
    }

    .jy-quote-offcanvas {
        --bs-offcanvas-width: 100vw;
        height: 100dvh;
        max-height: 100dvh;
        border-inline: 0 !important;
        border-radius: 0;
    }
    .jy-quote-offcanvas .jy-quote-header {
        min-height: calc(64px + env(safe-area-inset-top));
        padding: calc(10px + env(safe-area-inset-top)) 12px 10px;
    }
    .jy-quote-offcanvas .offcanvas-body {
        padding: 10px 9px calc(18px + env(safe-area-inset-bottom));
    }
    .jy-quote-offcanvas .jy-quote-search-card {
        margin-bottom: 10px;
    }
    .jy-quote-offcanvas .accordion-button,
    .jy-quote-offcanvas .form-control,
    .jy-quote-offcanvas .form-select,
    .jy-quote-offcanvas .btn,
    .jy-quote-offcanvas .select2-selection {
        min-height: 44px;
    }
    .jy-quote-offcanvas .container {
        max-width: none;
        padding-right: 8px;
        padding-left: 8px;
    }
    .select2-container {
        width: 100% !important;
    }
}

@media (max-width: 767.98px) {
    .jy-document-page {
        padding: 8px 0;
    }
    .jy-document-shell {
        width: calc(100% - 16px);
        padding: 18px 14px 24px;
        border-radius: 12px;
    }
    .jy-document-company {
        font-size: 16px;
        letter-spacing: .04em;
    }
    .jy-document-page .document-title {
        padding-right: 10px;
        padding-left: 10px;
        font-size: 16px;
        letter-spacing: .08em;
    }
    .jy-document-actions {
        display: flex;
        justify-content: center;
        gap: 10px;
    }
    .jy-document-actions .btn {
        min-width: 104px;
    }
    .jy-document-actions #print {
        margin-left: 0 !important;
    }
}

@media (max-width: 575.98px) {
    .jy-toast-region {
        padding: 8px !important;
    }
    .jy-toast {
        width: calc(100vw - 16px);
    }
    .jy-toast--confirm .toast-body {
        grid-template-columns: 1fr;
    }
    .jy-toast__actions {
        width: 100%;
    }
    .jy-toast__actions .btn {
        flex: 1 1 0;
        min-height: 40px;
    }
    .modal:not(#myModal) .modal-dialog {
        margin: 8px;
    }
    .modal:not(#myModal) .modal-header {
        min-height: 60px;
        padding: 14px 16px;
    }
    .modal:not(#myModal) .modal-body {
        padding: 16px;
    }
    .modal:not(#myModal) .modal-footer {
        flex-wrap: nowrap;
        padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    }
    .modal:not(#myModal) .modal-footer .btn {
        min-height: 42px;
        min-width: 0;
        flex: 1 1 0;
    }
}

/* ==========================================================================
   业务表移动端统一工具栏（总览及生产看板不使用 service-table-card）
   ========================================================================== */
.jy-action-icon {
    margin-right: .3rem;
}

.inventory-mobile-control-slot {
    display: none;
}

.inventory-mobile-create-slot {
    display: none;
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .jy-production-service .service-panel-navbar > .container-fluid {
        gap: 6px 8px;
    }

    .jy-production-service .service-filter-toggler {
        order: 3;
    }

    .jy-production-service .service-actions {
        order: 4;
    }

    .jy-production-service .inventory-mobile-control-slot {
        display: flex;
        min-width: 0;
    }

    .jy-production-service #inventory_mobile_mode_slot {
        order: 1;
        flex: 0 0 auto;
    }

    .jy-production-service #inventory_mobile_stage_slot {
        order: 10;
        flex: 1 1 100%;
        width: 100%;
    }

    .jy-production-service .inventory-mobile-control-slot > .nav-item {
        width: 100%;
        margin: 0 !important;
        list-style: none;
    }

    .jy-production-service .jy-cut-stage {
        display: flex;
        width: 100%;
    }

    .jy-production-service .service-panel-navbar .navbar-collapse {
        flex-basis: 100%;
        order: 20;
        width: 100%;
    }
}

@media (max-width: 767.98px) {
    .service-table-card {
        margin-right: 0;
        margin-left: 0;
        overflow: hidden;
        border-right: 0 !important;
        border-left: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    .service-panel-navbar {
        padding: 5px 6px;
    }

    .service-panel-navbar > .container-fluid {
        align-items: center;
        padding: 0;
        gap: 4px 6px;
    }

    .service-filter-toggler {
        min-width: 36px;
        min-height: 36px;
        padding: 5px 8px;
    }

    .service-filter-label,
    .jy-action-label {
        display: none;
    }

    .jy-action-icon {
        margin: 0;
    }

    .service-actions {
        width: auto;
        margin: 0;
    }

    .service-actions > .nav-item {
        display: flex;
        flex-wrap: wrap;
        width: auto;
        margin: 0 !important;
        gap: 4px;
    }

    .service-actions .service-crud-actions {
        display: inline-flex;
        width: auto;
        margin: 0 !important;
    }

    .service-actions .service-crud-actions > .btn {
        flex: 0 0 36px;
        width: 36px;
        min-width: 36px;
        min-height: 36px;
        padding: 5px;
    }

    .service-context-actions:has(.btn-group) {
        display: flex;
        flex: 1 1 100%;
        order: 10;
        width: 100%;
    }

    .service-actions:has(.service-context-actions .btn-group) {
        flex: 1 1 100%;
        order: 10;
        width: 100%;
    }

    .service-actions:has(.service-context-actions .btn-group) > .nav-item {
        width: 100%;
    }

    .service-actions:has(.service-context-actions .btn-group) .service-context-actions {
        flex: 1 1 auto;
        width: auto;
    }

    .service-context-actions .btn-group {
        display: flex;
        width: 100%;
        margin: 0 !important;
    }

    .service-context-actions .btn {
        flex: 1 1 0;
        min-height: 36px;
        padding: 5px 7px;
        font-size: 12px;
    }

    .service-panel-navbar .navbar-collapse {
        flex-basis: 100%;
        order: 20;
        width: 100%;
    }

    .service-filters {
        width: 100%;
        margin: 0 !important;
        padding-top: 2px;
    }

    .service-filters .nav-item {
        width: 100%;
        margin: 2px 0 !important;
    }

    .service-filters .input-group,
    .service-filters .input-group-text,
    .service-filters .dataTables_filter {
        width: 100%;
    }

    .service-filters .form-control,
    .service-filters .form-select,
    .service-filters .input-group-text,
    .service-filters .select2-selection {
        max-width: none !important;
        min-height: 40px;
    }

    .mobile-generated-filter-slot .dataTables_filter label {
        display: flex;
        align-items: center;
        width: 100%;
        gap: 8px;
    }

    .mobile-generated-filter-slot .dataTables_filter input {
        flex: 1 1 auto;
        width: auto;
        min-width: 0;
        min-height: 40px;
        margin: 0 !important;
    }

    .service-table-card > .card-body {
        padding: 0;
    }

    .service-table-card .data-table-footer {
        justify-content: center !important;
        gap: 4px;
        min-height: 42px;
        padding: 6px 8px calc(6px + env(safe-area-inset-bottom)) !important;
    }

    .service-table-card .data-table-footer .dataTables_info,
    .service-table-card .data-table-footer .dataTables_length,
    .service-table-card .data-table-footer .dt-buttons {
        display: none !important;
    }

    .service-table-card .data-table-footer #sum {
        flex: 1 1 100%;
        padding: 0 !important;
        font-size: 12px;
        line-height: 1.35;
        text-align: center;
    }

    .service-table-card .data-table-footer .dataTables_paginate {
        flex: 1 1 100%;
        width: 100%;
        min-width: 0;
        overflow: hidden;
        margin: 0 !important;
        text-align: center;
    }

    .service-table-card .dataTables_paginate .page-item:not(.previous):not(.next):not(.active) {
        display: none !important;
    }

    .service-table-card .dataTables_paginate .paginate_button {
        min-width: 32px;
        min-height: 32px;
        margin: 1px;
        padding: 5px 8px !important;
    }

    .service-table-card #myTable {
        width: 100% !important;
        table-layout: fixed;
    }

    .service-table-card .dataTables_scrollHead thead th,
    .service-table-card #myTable thead th {
        padding: 6px 3px !important;
        overflow: hidden;
        font-size: 12px !important;
        line-height: 1.2;
        text-overflow: ellipsis;
        white-space: normal;
    }

    .service-table-card #myTable tbody > tr:not(.child) > td {
        padding: 6px 3px !important;
        overflow: hidden;
        font-size: 13px;
        line-height: 1.3;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .service-table-card #myTable ul.dtr-details {
        padding: 5px 9px;
    }

    .service-table-card #myTable ul.dtr-details > li {
        padding: 7px 0;
    }

    /* 库存移动端固定两行：模式/操作在首行，处理阶段独占第二行。 */
    .jy-production-service .service-filter-toggler {
        order: 3;
    }

    .jy-production-service .service-actions {
        order: 4;
        margin-left: auto;
    }

    .jy-production-service .inventory-mobile-control-slot {
        display: flex;
        min-width: 0;
    }

    #inventory_mobile_mode_slot {
        order: 1;
        flex: 0 0 auto;
    }

    #inventory_mobile_stage_slot {
        order: 10;
        flex: 1 1 100%;
        width: 100%;
    }

    .inventory-mobile-control-slot > .nav-item {
        width: 100%;
        margin: 0 !important;
        list-style: none;
    }

    .jy-production-service .jy-inventory-mode-toggle {
        min-width: 94px;
        min-height: 36px;
        padding: 5px 8px;
        gap: 6px;
        font-size: 13px;
    }

    .jy-production-service .jy-cut-stage {
        display: flex;
        width: 100%;
    }

    .jy-production-service .service-panel-navbar .navbar-collapse {
        order: 20;
    }

    .jy-production-service #myTable {
        table-layout: auto;
    }

    .jy-production-service #myTable thead th,
    .jy-production-service #myTable tbody > tr:not(.child) > td {
        min-width: 52px;
    }

    .jy-production-service #myTable thead th:first-child,
    .jy-production-service #myTable tbody > tr:not(.child) > td:first-child {
        min-width: 78px;
    }

}

/* 库存录入：剪线 / 不剪线单按钮开关 */
.jy-inventory-mode-toggle {
    align-items: center;
    border-color: var(--jy-primary);
    display: inline-flex;
    gap: .5rem;
    min-width: 6.5rem;
}

.jy-inventory-mode-toggle__track {
    background: var(--jy-surface-soft);
    border: 1px solid var(--jy-primary);
    border-radius: 999px;
    display: inline-flex;
    height: 1.25rem;
    padding: 2px;
    width: 2.35rem;
}

.jy-inventory-mode-toggle__thumb {
    background: var(--jy-primary);
    border-radius: 50%;
    display: block;
    height: .9rem;
    transform: translateX(0);
    transition: transform .18s ease;
    width: .9rem;
}

.jy-inventory-mode-toggle[data-mode="plain"] .jy-inventory-mode-toggle__thumb {
    transform: translateX(1.05rem);
}

/* ==========================================================================
   生产交付总览
   ========================================================================== */
.jy-overview-dashboard {
    max-width: 1880px;
    padding: 16px 18px 28px;
    color: var(--jy-text);
}

.jy-overview-heading {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 88px;
    margin-bottom: 12px;
    padding: 14px 18px;
    overflow: hidden;
    border: 1px solid var(--jy-border);
    border-left: 3px solid var(--jy-gold);
    border-radius: var(--jy-radius);
    background:
        linear-gradient(100deg, rgba(var(--jy-primary-rgb), .09), transparent 45%),
        var(--jy-surface);
    box-shadow: var(--jy-shadow);
}

.jy-overview-heading::after {
    position: absolute;
    top: 0;
    right: 0;
    width: 34%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--jy-chart-1), var(--jy-chart-4));
    content: "";
    opacity: .75;
}

.jy-overview-eyebrow {
    margin-bottom: 3px;
    color: var(--jy-gold);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .2em;
}

.jy-overview-heading h1 {
    margin: 0;
    color: var(--jy-text);
    font-size: clamp(1.2rem, 2vw, 1.55rem);
    font-weight: 750;
    letter-spacing: .02em;
}

.jy-overview-heading p,
.jy-overview-panel__head p {
    margin: 4px 0 0;
    color: var(--jy-text-muted);
    font-size: 12px;
}

.jy-overview-heading__actions,
.jy-overview-filters,
.jy-sales-totals {
    display: flex;
    align-items: center;
    gap: 10px;
}

.jy-overview-updated {
    color: var(--jy-text-muted);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
}

.jy-overview-summary {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.jy-overview-kpi {
    position: relative;
    display: grid;
    grid-template-columns: 36px 1fr;
    grid-template-rows: auto auto auto;
    min-width: 0;
    min-height: 118px;
    padding: 14px;
    overflow: hidden;
    border: 1px solid var(--jy-border);
    border-radius: var(--jy-radius);
    background: var(--jy-surface);
    box-shadow: var(--jy-shadow);
    color: var(--jy-text);
    text-decoration: none;
    transition: border-color .18s ease, transform .18s ease;
}

.jy-overview-kpi::before {
    position: absolute;
    top: 0;
    left: 14px;
    width: 32px;
    height: 2px;
    background: var(--jy-gold);
    content: "";
}

.jy-overview-kpi:hover {
    border-color: var(--jy-border-strong);
    color: var(--jy-text);
    transform: translateY(-1px);
}

.jy-overview-kpi__icon {
    grid-row: 1 / 4;
    align-self: start;
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border: 1px solid var(--jy-border-strong);
    border-radius: 7px;
    background: var(--jy-priority-bg);
    color: var(--jy-gold);
    font-size: 15px;
}

.jy-overview-kpi__label {
    align-self: center;
    overflow: hidden;
    color: var(--jy-text);
    font-size: 12px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jy-overview-kpi strong {
    align-self: end;
    margin-top: 7px;
    color: var(--jy-text);
    font-size: clamp(1.55rem, 2.35vw, 2.1rem);
    font-variant-numeric: tabular-nums;
    font-weight: 720;
    letter-spacing: -.035em;
    line-height: 1;
}

.jy-overview-kpi small {
    align-self: end;
    margin-top: 7px;
    overflow: hidden;
    color: var(--jy-text-muted);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jy-overview-row {
    margin-bottom: 0;
}

.jy-overview-panel {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--jy-border);
    border-radius: var(--jy-radius);
    background: var(--jy-surface);
    box-shadow: var(--jy-shadow);
}

.jy-overview-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 58px;
    padding: 11px 14px;
    border-bottom: 1px solid var(--jy-border);
    background: var(--jy-surface-soft);
}

.jy-overview-panel__head h2 {
    margin: 0;
    color: var(--jy-text);
    font-size: 14px;
    font-weight: 750;
}

.jy-overview-panel__head a {
    flex: 0 0 auto;
    color: var(--jy-primary);
    font-size: 11px;
    text-decoration: none;
}

.jy-overview-filters .form-select {
    width: 94px;
}

.jy-sales-panel-head {
    display: block;
}

.jy-sales-heading-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.jy-sales-finance-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--jy-border);
}

.jy-sales-finance-summary > div {
    min-width: 0;
    padding-left: 8px;
    border-left: 2px solid var(--jy-border-strong);
}

.jy-sales-finance-summary span,
.jy-sales-finance-summary strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jy-sales-finance-summary span {
    color: var(--jy-text-muted);
    font-size: 11px;
}

.jy-sales-finance-summary strong {
    margin-top: 3px;
    color: var(--jy-text);
    font-size: clamp(12px, 1.15vw, 16px);
    font-variant-numeric: tabular-nums;
    letter-spacing: -.02em;
}

.jy-overview-chart {
    width: 100%;
    height: 300px;
    padding: 0 6px 6px;
}

.jy-overview-tabs {
    gap: 5px;
    padding: 9px 12px 3px;
}

.jy-overview-tabs .nav-link {
    padding: 4px 10px;
    border: 1px solid transparent;
    border-radius: 6px;
    color: var(--jy-text-muted);
    font-size: 11px;
}

.jy-overview-tabs .nav-link:hover {
    border-color: var(--jy-border);
    color: var(--jy-text);
}

.jy-overview-tabs .nav-link.active {
    border-color: var(--jy-border-strong);
    background: var(--jy-priority-bg);
    color: var(--jy-primary);
}

.jy-overview-table-wrap {
    min-height: 258px;
    padding: 4px 12px 10px;
}

.jy-overview-table {
    min-width: 540px;
    margin: 0;
    color: var(--jy-text);
    font-size: 13px;
}

.jy-overview-table > :not(caption) > * > * {
    padding: 7px 7px;
    border-bottom-color: var(--jy-border);
    background: transparent;
    color: inherit;
    vertical-align: middle;
}

.jy-overview-table thead th {
    border-bottom-width: 1px;
    background: var(--jy-th-bg);
    color: var(--jy-text-muted);
    font-size: 12px !important;
    font-weight: 650;
    letter-spacing: .03em;
    white-space: nowrap;
}

.jy-overview-table tbody tr:hover > * {
    background: var(--jy-row-hover);
}

.jy-overview-table td strong {
    display: block;
    max-width: 190px;
    overflow: hidden;
    color: var(--jy-text);
    font-size: 13px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jy-overview-table td small {
    display: block;
    max-width: 190px;
    margin-top: 2px;
    overflow: hidden;
    color: var(--jy-text-muted);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jy-overview-table .jy-number {
    font-variant-numeric: tabular-nums;
    font-weight: 650;
    white-space: nowrap;
}

.jy-risk-badge {
    display: inline-flex;
    align-items: center;
    min-height: 21px;
    padding: 2px 7px;
    border: 1px solid var(--jy-border);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 650;
    white-space: nowrap;
}

.jy-risk-badge--danger {
    border-color: rgba(var(--jy-danger-rgb), .38);
    background: rgba(var(--jy-danger-rgb), .1);
    color: var(--jy-danger);
}

.jy-risk-badge--warning {
    border-color: rgba(var(--jy-gold-rgb), .42);
    background: rgba(var(--jy-gold-rgb), .11);
    color: var(--jy-gold);
}

.jy-risk-badge--neutral {
    border-color: rgba(var(--jy-primary-rgb), .28);
    background: rgba(var(--jy-primary-rgb), .09);
    color: var(--jy-primary);
}

.jy-overview-empty {
    height: 170px;
    color: var(--jy-text-muted) !important;
    text-align: center;
}

.jy-overview-error {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 1080;
    max-width: 420px;
    box-shadow: var(--jy-shadow);
}

@media (max-width: 1399.98px) {
    .jy-overview-summary {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1199.98px) {
    .jy-overview-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .jy-overview-dashboard {
        padding: 10px 9px 20px;
    }

    .jy-overview-heading,
    .jy-overview-panel__head {
        align-items: flex-start;
        flex-direction: column;
    }

    .jy-overview-heading__actions,
    .jy-overview-filters {
        width: 100%;
    }

    .jy-overview-heading__actions {
        justify-content: space-between;
    }

    .jy-overview-summary {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .jy-overview-kpi {
        min-height: 98px;
    }

    .jy-overview-panel__head a {
        align-self: flex-end;
    }

    .jy-overview-filters .btn-group {
        flex: 1 1 auto;
    }

    .jy-overview-filters .btn {
        flex: 1 1 0;
    }

    .jy-sales-heading-row {
        flex-direction: column;
    }

    .jy-sales-finance-summary {
        grid-template-columns: 1fr;
    }

    .jy-sales-finance-summary > div {
        padding: 5px 0 5px 9px;
    }

    .jy-sales-finance-summary strong {
        font-size: 14px;
    }

    .jy-overview-chart {
        height: 290px;
    }
}

@media print {
    @page {
        size: 210mm 140mm;
        margin: 5mm;
    }
    .jy-table-runtime-status,
    .jy-table-scroll-hint,
    .jy-table-tabs {
        display: none !important;
    }
    html,
    body.jy-document-page {
        width: 200mm !important;
        min-width: 200mm !important;
        max-width: 200mm !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
        background: #fff !important;
        color: #111 !important;
    }
    body.jy-document-page {
        min-height: auto;
        padding: 0;
    }
    .jy-document-shell {
        width: 200mm !important;
        min-width: 200mm !important;
        max-width: 200mm !important;
        min-height: 0 !important;
        max-height: 130mm;
        margin: 0 !important;
        padding: 0;
        overflow: visible;
        border: 0;
        border-radius: 0;
        background: #fff !important;
        color: #111 !important;
        box-shadow: none !important;
        break-inside: avoid-page;
        page-break-inside: avoid;
    }
    .jy-document-heading {
        margin-bottom: 1mm !important;
        padding-bottom: 1mm !important;
        color: #333 !important;
        border-bottom-color: #999;
    }
    .jy-document-company {
        font-size: 14pt !important;
        letter-spacing: .08em;
    }
    .jy-document-page .document-title {
        padding: 0 3mm 1mm !important;
        font-size: 11pt !important;
    }
    .jy-document-company,
    .jy-document-page .document-title,
    .jy-document-page .row,
    .jy-document-page .footer_s {
        color: #111 !important;
    }
    .jy-document-page #myTable.jy-document-table {
        width: calc(100% - 2px) !important;
        max-width: calc(100% - 2px) !important;
        min-width: 0;
        overflow: visible !important;
        border: 1px solid #666 !important;
        border-collapse: collapse !important;
        border-spacing: 0 !important;
        background: #fff !important;
        box-sizing: border-box !important;
        table-layout: fixed !important;
        margin-top: 2mm !important;
        margin-bottom: 1.5mm !important;
        break-inside: avoid-page;
        page-break-inside: avoid;
    }
    .jy-document-page #myTable .jy-document-col-id { width: 0; }
    .jy-document-page #myTable .jy-document-col-product { width: 14%; }
    .jy-document-page #myTable .jy-document-col-color { width: 13%; }
    .jy-document-page #myTable .jy-document-col-unit { width: 7%; }
    .jy-document-page #myTable .jy-document-col-quantity { width: 11%; }
    .jy-document-page #myTable .jy-document-col-price { width: 10%; }
    .jy-document-page #myTable .jy-document-col-extra-fee { width: 11%; }
    .jy-document-page #myTable .jy-document-col-total { width: 12%; }
    .jy-document-page #myTable .jy-document-col-remark { width: 22%; }
    .jy-document-page #myTable.jy-document-table > :not(caption) > * > *,
    .jy-document-page #myTable .jy-document-table-head > *,
    .jy-document-page #myTable .jy-document-total > *,
    .jy-document-page #myTable tbody td[contenteditable="true"] {
        border: 1px solid #666 !important;
        background: #fff !important;
        color: #111 !important;
        outline: 0 !important;
        box-shadow: none !important;
        padding: 1.35mm 1mm !important;
        font-size: 9pt !important;
        line-height: 1.15 !important;
    }
    .jy-document-page #myTable .remark,
    .jy-document-page #myTable .remark small {
        white-space: normal !important;
        overflow-wrap: anywhere;
        word-break: break-word;
        font-size: 8pt !important;
        line-height: 1.12 !important;
    }
    .jy-document-page #myTable.jy-document-table tr,
    .jy-document-page .footer_s {
        break-inside: avoid-page;
        page-break-inside: avoid;
    }
    .jy-document-page #myTable.jy-document-table tr > *:last-child {
        border-right: 1px solid #666 !important;
    }
    .jy-document-page #myTable .jy-document-table-head > * {
        background: #f2f2f2 !important;
    }
    .jy-document-actions {
        display: none !important;
    }
    .jy-document-action-row,
    .jy-document-page .no-print {
        display: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    .jy-document-page .footer_s {
        padding-top: 0 !important;
        font-size: 8.5pt !important;
    }
    .jy-toast-region {
        display: none !important;
    }
}

/* ==========================================================================
   生产看板
   ========================================================================== */
.jy-production-dashboard {
    max-width: 1680px;
}

.jy-dashboard-heading,
.jy-dashboard-panel-header,
.jy-output-filters,
.jy-machine-legend,
.jy-chart-title,
.jy-total-output-card,
.jy-zero-output {
    display: flex;
    align-items: center;
}

.jy-dashboard-heading {
    justify-content: space-between;
    gap: 16px;
    padding: 4px 2px;
}

.jy-dashboard-heading h1 {
    margin: 2px 0 4px;
    color: var(--jy-text);
    font-size: clamp(1.35rem, 2.1vw, 1.8rem);
    font-weight: 700;
    letter-spacing: -.02em;
}

.jy-dashboard-heading p,
.jy-dashboard-panel-header p {
    color: var(--jy-text-muted);
    font-size: 13px;
}

.jy-dashboard-update {
    margin-left: 8px;
    padding-left: 10px;
    border-left: 1px solid var(--jy-border);
}

.jy-dashboard-eyebrow {
    color: var(--jy-gold);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .16em;
}

.jy-dashboard-panel {
    overflow: hidden;
}

.jy-dashboard-panel > .card-header {
    border-bottom: 1px solid var(--jy-border);
    background: var(--jy-surface-soft);
}

.jy-dashboard-panel > .card-body {
    padding: 16px;
}

.jy-dashboard-panel-header {
    justify-content: space-between;
    gap: 16px;
    min-height: 62px;
    padding: 12px 16px;
}

.jy-dashboard-panel-header h2 {
    margin: 0 0 2px;
    color: var(--jy-text);
    font-size: 15px;
    font-weight: 700;
}

.jy-machine-legend {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 14px;
    color: var(--jy-text-muted);
    font-size: 12px;
}

.jy-machine-legend span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.jy-machine-legend strong {
    color: var(--jy-text);
    font-variant-numeric: tabular-nums;
}

.jy-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.jy-legend-dot--running {
    background: var(--bs-success);
    box-shadow: 0 0 0 3px rgba(var(--bs-success-rgb), .12);
}

.jy-legend-dot--stopped {
    background: var(--jy-text-muted);
    opacity: .65;
}

.jy-machine-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 12px;
}

.jy-machine-item,
.jy-machine-skeleton {
    position: relative;
    min-width: 0;
    min-height: 126px;
    padding: 11px 12px 9px;
    overflow: hidden;
    border: 1px solid var(--jy-border);
    background: var(--jy-surface-soft);
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
    text-align: left;
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.jy-machine-item:hover,
.jy-machine-item:focus-within {
    border-color: var(--jy-border-strong);
    box-shadow: 0 8px 20px rgba(var(--jy-primary-rgb), .12);
    transform: translateY(-1px);
}

.jy-machine-node {
    position: relative;
    display: flex;
    width: 100%;
    min-width: 0;
    min-height: 43px;
    margin: 0;
    padding: 0 0 8px 20px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    overflow: hidden;
    border: 0;
    border-bottom: 1px dashed var(--jy-border);
    border-radius: 0;
    background: transparent;
    color: var(--jy-text);
    box-shadow: none;
    text-align: left;
    transition: color .16s ease;
}

.jy-machine-node::before {
    position: absolute;
    top: 3px;
    left: 1px;
    width: 9px;
    height: 9px;
    border: 1px solid currentColor;
    border-radius: 50%;
    background: transparent;
    content: "";
}

.jy-machine-node:hover,
.jy-machine-node:focus-visible {
    outline: 0;
    color: var(--jy-primary-dark);
    box-shadow: none;
}

.jy-machine-node.is-running {
    color: var(--jy-text);
}

.jy-machine-node.is-running::before {
    border-color: var(--bs-success);
    background: var(--bs-success);
    box-shadow: 0 0 0 3px rgba(var(--bs-success-rgb), .11);
}

.jy-machine-node.is-stopped {
    color: var(--jy-text-muted);
}

.jy-machine-node.is-stopped::before {
    border-color: var(--jy-text-muted);
    background: var(--jy-text-muted);
    opacity: .72;
}

.jy-machine-item.has-clear-action .jy-machine-node {
    padding-right: 32px;
}

.jy-machine-clear-model {
    position: absolute;
    top: 7px;
    right: 7px;
    z-index: 2;
    display: inline-flex;
    width: 28px;
    height: 28px;
    padding: 0;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(var(--bs-danger-rgb), .32);
    border-radius: 7px;
    background: var(--jy-surface);
    color: var(--bs-danger);
    font-size: 13px;
    line-height: 1;
    box-shadow: 0 2px 7px rgba(var(--bs-danger-rgb), .08);
    transition: border-color .16s ease, background-color .16s ease, color .16s ease, transform .16s ease;
}

.jy-machine-clear-model:hover,
.jy-machine-clear-model:focus-visible {
    border-color: var(--bs-danger);
    outline: 0;
    background: var(--bs-danger);
    color: var(--bs-white);
    transform: translateY(-1px);
}

.jy-machine-clear-model:disabled {
    cursor: wait;
    opacity: .55;
    transform: none;
}

.jy-machine-number {
    overflow: hidden;
    max-width: 100%;
    font-size: 14px;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.jy-machine-model {
    display: block;
    width: 100%;
    margin-top: 4px;
    overflow: hidden;
    color: inherit;
    font-size: 12px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jy-machine-plan {
    display: -webkit-box;
    min-height: 32px;
    margin: 7px 0 1px;
    overflow: hidden;
    color: var(--jy-gold);
    font-size: 12px;
    line-height: 17px;
    word-break: break-all;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.jy-machine-plan.is-empty {
    color: var(--jy-text-muted);
    opacity: .65;
}

.jy-machine-balance {
    min-height: 18px;
    margin: 0;
    overflow: hidden;
    font-size: 12px;
    font-weight: 600;
    line-height: 18px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jy-machine-balance.is-shortage,
.jy-machine-balance.is-error {
    color: var(--bs-warning-text-emphasis);
}

.jy-machine-balance.is-excess {
    color: var(--jy-primary);
}

.jy-machine-skeleton span {
    display: block;
    width: 68%;
    height: 36px;
    margin: 0 0 10px;
    border-radius: 4px;
    background: var(--jy-row-hover);
}

.jy-machine-skeleton small {
    display: block;
    width: 82%;
    height: 9px;
    margin: 7px 0;
    border-radius: 5px;
    background: var(--jy-row-hover);
}

.jy-machine-skeleton span,
.jy-machine-skeleton small {
    animation: jy-dashboard-pulse 1.1s ease-in-out infinite alternate;
}

@keyframes jy-dashboard-pulse {
    from { opacity: .45; }
    to { opacity: .9; }
}

.jy-output-header {
    align-items: flex-end;
}

.jy-output-filters {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.jy-output-filters .form-select {
    width: 106px;
}

.jy-total-output-card {
    width: min(100%, 330px);
    min-height: 76px;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    border: 1px solid var(--jy-border-strong);
    border-left: 3px solid var(--jy-gold);
    border-radius: var(--jy-radius);
    background: var(--jy-priority-bg);
}

.jy-total-output-card > span {
    color: var(--jy-text-muted);
    font-size: 13px;
}

.jy-total-output-card strong {
    color: var(--jy-text);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-variant-numeric: tabular-nums;
    letter-spacing: -.025em;
}

.jy-total-output-card small {
    color: var(--jy-text-muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .05em;
}

.jy-chart-card {
    min-height: 405px;
    padding: 14px;
    border: 1px solid var(--jy-border);
    border-radius: var(--jy-radius);
    background: var(--jy-surface-soft);
}

.jy-chart-title {
    justify-content: space-between;
    gap: 10px;
    padding: 0 2px 8px;
}

.jy-chart-title h3 {
    margin: 0;
    color: var(--jy-text);
    font-size: 14px;
    font-weight: 700;
}

.jy-chart-title span {
    color: var(--jy-text-muted);
    font-size: 12px;
}

.jy-dashboard-chart {
    width: 100%;
    height: 350px;
}

.jy-zero-output {
    gap: 10px;
    min-height: 38px;
    padding: 9px 12px;
    border: 1px dashed var(--jy-border);
    border-radius: 8px;
    color: var(--jy-text-muted);
    font-size: 12px;
}

.jy-zero-output__label {
    flex: 0 0 auto;
    color: var(--jy-text);
    font-weight: 600;
}

.jy-dashboard-empty {
    grid-column: 1 / -1;
    margin: 28px 0;
    color: var(--jy-text-muted);
}

.jy-character-count {
    color: var(--jy-text-muted);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.jy-spin {
    animation: jy-dashboard-spin .8s linear infinite;
}

@keyframes jy-dashboard-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .jy-machine-node,
    .jy-machine-skeleton span,
    .jy-machine-skeleton small,
    .jy-inventory-mode-toggle__thumb,
    .jy-spin {
        animation: none;
        transition: none;
    }
}

@media (max-width: 1199.98px) {
    .jy-machine-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .jy-dashboard-heading,
    .jy-dashboard-panel-header,
    .jy-output-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .jy-dashboard-heading .btn {
        width: 100%;
    }

    .jy-dashboard-update {
        display: block;
        margin: 4px 0 0;
        padding: 0;
        border-left: 0;
    }

    .jy-machine-legend,
    .jy-output-filters {
        width: 100%;
        justify-content: flex-start;
    }

    .jy-machine-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px 8px;
    }

    .jy-machine-item,
    .jy-machine-skeleton {
        min-height: 122px;
        padding: 10px;
    }

    .jy-output-filters .btn-group {
        width: 100%;
    }

    .jy-output-filters .btn {
        flex: 1 1 0;
    }

    .jy-output-filters .form-select {
        width: calc(50% - 4px);
    }

    .jy-chart-card {
        min-height: 360px;
        padding: 10px;
    }

    .jy-dashboard-chart {
        height: 310px;
    }

    .jy-zero-output {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
    }
}

/* ---------- 全站昼夜图片式开关 ---------- */
.jy-theme-switch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    margin: 0;
    color: var(--jy-text-muted);
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.jy-theme-switch__control {
    min-height: 0;
    margin: 0;
    padding: 0;
    line-height: 1;
}

.jy-theme-switch .form-check-input {
    --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
    float: none;
    width: 54px;
    height: 30px;
    margin: 0 !important;
    background-color: var(--jy-primary);
    background-image: var(--bs-form-switch-bg), linear-gradient(135deg, #9bb8ad, var(--jy-primary)) !important;
    background-position: left center, center;
    background-repeat: no-repeat;
    background-size: contain, 100% 100%;
    border: 1px solid rgba(var(--jy-primary-rgb), .26);
    border-radius: 999px;
    box-shadow: inset 0 1px 2px rgba(52, 68, 62, .12), 0 2px 7px rgba(52, 68, 62, .1);
    cursor: pointer;
    transition: background-position .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.jy-theme-switch .form-check-input:focus {
    border-color: var(--jy-gold);
    box-shadow: 0 0 0 3px rgba(var(--jy-gold-rgb), .2);
}

.jy-theme-switch .form-check-input:checked,
[data-bs-theme="dark"] .jy-theme-switch .form-check-input {
    background-color: #111211;
    background-image: var(--bs-form-switch-bg), linear-gradient(135deg, #343532, #090a0b 70%) !important;
    background-position: right center, center;
    border-color: rgba(var(--jy-gold-rgb), .5);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, .7), 0 2px 8px rgba(0, 0, 0, .32);
}

.jy-theme-switch__icon {
    width: 20px;
    font-size: 19px;
    line-height: 1;
    text-align: center;
    transition: color .2s ease, opacity .2s ease, transform .2s ease;
}

.jy-theme-switch__icon--sun {
    color: var(--jy-gold);
    transform: scale(1.04);
}

.jy-theme-switch__icon--moon {
    color: var(--jy-text-muted);
    opacity: .72;
}

[data-bs-theme="dark"] .jy-theme-switch__icon--sun {
    color: var(--jy-text-muted);
    opacity: .58;
    transform: scale(.94);
}

[data-bs-theme="dark"] .jy-theme-switch__icon--moon {
    color: var(--jy-gold);
    opacity: 1;
    transform: scale(1.06);
}

.jy-mobile-navigation__theme {
    display: flex;
    grid-column: auto;
    min-width: 0;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 6px 10px;
    background: var(--jy-control-bg);
    border: 1px solid var(--jy-border);
    border-radius: 9px;
}

.jy-product-header__utilities {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ---------- 产品中心：分类筛选与无限滚动 ---------- */
.jy-product-page {
    min-height: 100dvh;
    background: var(--jy-bg);
    color: var(--jy-text);
}

.jy-product-filter {
    padding-top: 14px;
    padding-bottom: 12px;
}

.jy-product-filter__content {
    padding: 14px;
    background: var(--jy-surface-soft);
    border: 1px solid var(--jy-border);
    border-left: 3px solid var(--jy-gold);
    border-radius: 10px;
    box-shadow: var(--jy-shadow);
}

.jy-product-filter__header {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 12px;
}

.jy-product-filter__title {
    margin: 0;
    color: var(--jy-text);
    font-size: 16px;
    font-weight: 600;
}

.jy-product-filter__hint {
    margin: 3px 0 0;
    color: var(--jy-text-muted);
    font-size: 12px;
}

.jy-product-filter__actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.jy-product-filter__categories {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.jy-product-category {
    min-width: 0;
    margin: 0;
    padding: 10px 11px 11px;
    background: var(--jy-surface);
    border: 1px solid var(--jy-border);
    border-radius: 8px;
}

.jy-product-category__header {
    display: flex;
    float: none;
    gap: 7px;
    align-items: center;
    width: 100%;
    margin: 0 0 8px;
    padding: 0;
    color: var(--jy-text);
    font-size: 13px;
    line-height: 1.4;
}

.jy-product-category__name {
    font-weight: 600;
}

.jy-product-category__mode {
    padding: 1px 6px;
    color: var(--jy-text-muted);
    font-size: 11px;
    font-weight: 400;
    background: var(--jy-surface-soft);
    border: 1px solid var(--jy-border);
    border-radius: 999px;
}

.jy-product-category__clear {
    min-height: 28px;
    margin-left: auto;
    padding: 2px 0;
    color: var(--jy-text-muted);
    font-size: 11px;
    text-decoration: none;
}

.jy-product-category__clear:not(:disabled):hover,
.jy-product-category__clear:not(:disabled):focus {
    color: var(--jy-primary);
}

.jy-product-category__choices {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.jy-product-category__choices .btn {
    min-height: 32px;
    padding: 5px 10px;
    border-color: var(--jy-border);
    color: var(--jy-text);
    font-size: 12px;
    background: var(--jy-control-bg);
}

.jy-product-category__choices .btn:hover {
    color: var(--jy-primary);
    background: var(--jy-priority-bg);
    border-color: var(--jy-primary);
}

.jy-product-category__input:checked + .btn {
    color: var(--bs-btn-active-color);
    background: var(--jy-primary);
    border-color: var(--jy-primary);
    box-shadow: 0 0 0 2px rgba(var(--jy-primary-rgb), .12);
}

.jy-product-gallery {
    min-height: 32vh;
}

.jy-product-query-guide {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    justify-content: center;
    min-height: clamp(260px, 46vh, 520px);
    color: var(--jy-text-muted);
    text-align: center;
}

.jy-product-query-guide[hidden] {
    display: none;
}

.jy-product-query-guide .bi {
    color: var(--jy-primary);
    font-size: 34px;
    opacity: .72;
}

.jy-product-query-guide p {
    margin: 0;
    font-size: 14px;
}

.jy-product-load-sentinel {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    min-height: 76px;
    padding: 14px 0 calc(14px + env(safe-area-inset-bottom));
    color: var(--jy-text-muted);
}

.jy-product-load-sentinel__status {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    min-height: 30px;
    font-size: 13px;
}

.jy-product-load-sentinel__status .spinner-border {
    color: var(--jy-primary);
}

@media (max-width: 991.98px) {
    .jy-product-filter {
        padding-top: 10px;
    }

    .jy-product-filter__content {
        padding: 12px;
    }

    .jy-product-filter__categories {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .jy-product-filter__header {
        flex-direction: column;
    }

    .jy-product-filter__actions {
        width: 100%;
    }

    .jy-product-filter__actions .btn {
        flex: 1 1 0;
    }

    .jy-product-category {
        padding: 9px 10px 10px;
    }

    .jy-product-category__choices {
        gap: 6px;
    }

    .jy-product-category__choices .btn {
        min-height: 34px;
    }

    .jy-product-load-sentinel {
        min-height: 66px;
    }
}

/* ---------- 首页：月白蕾境 / 玄夜金线 ---------- */
body.jy-home-page {
    position: relative;
    min-height: 100dvh;
    overflow-x: hidden;
    background-color: #f5f6f4 !important;
    background-image:
        linear-gradient(90deg, rgba(250, 249, 245, .72) 0%, rgba(250, 249, 245, .45) 34%, rgba(250, 249, 245, .06) 66%),
        url("../images/home/home-bg-day-v2.png") !important;
    background-position: center center !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
    background-attachment: fixed !important;
}

[data-bs-theme="dark"] body.jy-home-page {
    background-color: #090a0b !important;
    background-image:
        linear-gradient(90deg, rgba(9, 10, 11, .68) 0%, rgba(9, 10, 11, .42) 34%, rgba(9, 10, 11, .04) 67%),
        url("../images/home/home-bg-night-v1.png") !important;
}

.jy-home-shell {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    min-height: 100dvh;
}

.jy-home-container {
    width: min(100%, 1480px);
    margin: 0 auto;
    padding-right: clamp(20px, 4vw, 72px);
    padding-left: clamp(20px, 4vw, 72px);
}

.jy-home-header {
    position: sticky;
    top: 12px;
    z-index: 1030;
    margin-top: 16px;
}

[data-bs-theme="dark"] .jy-home-header {
    background: transparent;
}

.jy-home-glass-nav {
    width: min(calc(100% - 40px), 1180px);
    min-height: 68px;
    margin: 0 auto;
    padding: 8px 18px;
    overflow: visible;
    border: 1px solid rgba(255, 255, 255, .56);
    border-radius: 999px;
    background:
        linear-gradient(110deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, .035) 48%, rgba(var(--jy-primary-rgb), .075)),
        linear-gradient(180deg, rgba(255, 255, 255, .1), rgba(241, 246, 243, .035));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .78),
        inset 0 -1px 0 rgba(var(--jy-primary-rgb), .13),
        0 14px 36px rgba(52, 68, 62, .12);
    backdrop-filter: blur(10px) saturate(128%) brightness(1.03);
    -webkit-backdrop-filter: blur(10px) saturate(128%) brightness(1.03);
}

[data-bs-theme="dark"] .jy-home-glass-nav {
    border-color: rgba(var(--jy-gold-rgb), .3);
    background:
        linear-gradient(110deg, rgba(var(--jy-gold-rgb), .04), rgba(20, 20, 20, .07) 44%, rgba(9, 10, 11, .15)),
        linear-gradient(180deg, rgba(20, 20, 20, .15), rgba(9, 10, 11, .06));
    box-shadow:
        inset 0 1px 0 rgba(var(--jy-gold-rgb), .24),
        inset 0 -1px 0 rgba(var(--jy-gold-rgb), .09),
        0 18px 44px rgba(0, 0, 0, .32);
}

.jy-home-glass-nav > .jy-home-container {
    width: 100%;
    max-width: none;
    padding-right: 0;
    padding-left: 0;
}

.jy-home-brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    margin-right: 22px;
    padding: 0;
    color: var(--jy-text);
}

.jy-home-brand img {
    border-radius: 11px;
    box-shadow: 0 3px 12px rgba(52, 68, 62, .12);
}

.jy-home-brand span {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.jy-home-brand strong {
    color: var(--jy-primary);
    font-size: 18px;
    font-weight: 750;
    letter-spacing: .08em;
}

.jy-home-brand small {
    margin-top: 3px;
    color: var(--jy-text-muted);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .16em;
}

.jy-home-header .navbar-nav {
    align-items: center;
    gap: 3px;
}

.jy-home-header .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 12px !important;
    color: var(--jy-text) !important;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 600;
}

.jy-home-header .nav-link:hover,
.jy-home-header .nav-link:focus-visible {
    color: var(--jy-primary) !important;
    background: rgba(var(--jy-primary-rgb), .09);
}

.jy-home-header__utilities {
    display: flex;
    align-items: center;
    gap: 10px;
}

.jy-home-login {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 38px;
    padding: 7px 12px;
    color: var(--jy-text);
    background: rgba(255, 255, 255, .66);
    border: 1px solid rgba(var(--jy-primary-rgb), .2);
    border-radius: 999px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .72);
    font-size: 14px;
}

[data-bs-theme="dark"] .jy-home-login {
    color: var(--jy-primary);
    background: rgba(var(--jy-gold-rgb), .09);
    border-color: rgba(var(--jy-gold-rgb), .3);
    box-shadow: inset 0 1px 0 rgba(var(--jy-gold-rgb), .1);
}

.jy-home-login:hover {
    color: var(--jy-primary);
    background: var(--jy-row-hover);
    border-color: rgba(var(--jy-primary-rgb), .35);
}

[data-bs-theme="dark"] .jy-home-login:hover,
[data-bs-theme="dark"] .jy-home-login:focus-visible {
    color: var(--jy-primary-dark);
    background: rgba(var(--jy-gold-rgb), .15);
    border-color: rgba(var(--jy-gold-rgb), .46);
}

.jy-home-header .navbar-toggler {
    width: 38px;
    height: 38px;
    padding: 6px;
    border-color: var(--jy-border);
    border-radius: 9px;
}

.jy-home-main {
    display: flex;
    align-items: center;
    min-height: 0;
}

.jy-home-hero {
    width: min(610px, 52vw);
    margin: clamp(38px, 6vh, 82px) 0;
    padding: clamp(24px, 3.2vw, 46px);
    border: 1px solid rgba(var(--jy-primary-rgb), .16);
    border-left: 3px solid var(--jy-gold);
    border-radius: 4px 18px 18px 4px;
    background: linear-gradient(
        180deg,
        rgba(var(--jy-primary-rgb), .18) 0%,
        color-mix(in srgb, var(--jy-priority-bg) 44%, transparent) 52%,
        color-mix(in srgb, var(--jy-surface) 38%, transparent) 100%
    );
    box-shadow: 0 24px 70px rgba(52, 68, 62, .09);
    backdrop-filter: blur(12px) saturate(108%);
    -webkit-backdrop-filter: blur(12px) saturate(108%);
}

[data-bs-theme="dark"] .jy-home-hero {
    border-color: rgba(var(--jy-gold-rgb), .2);
    border-left-color: var(--jy-gold);
    background: linear-gradient(
        180deg,
        rgba(20, 20, 20, .5) 0%,
        rgba(26, 26, 25, .4) 100%
    );
    box-shadow: 0 28px 80px rgba(0, 0, 0, .34);
}

.jy-home-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--jy-primary);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .16em;
}

.jy-home-hero__eyebrow::before {
    width: 24px;
    height: 1px;
    content: "";
    background: var(--jy-gold);
}

.jy-home-hero h1 {
    display: flex;
    width: fit-content;
    flex-direction: column;
    margin: 18px 0 20px;
    color: var(--jy-text);
    font-family: "FZJiangHuTi", "江湖体", "FZKai-Z03", "STKaiti", "KaiTi", cursive;
    font-size: clamp(32px, calc(4.5vw - 10px), 58px);
    font-weight: 700;
    line-height: 1.16;
    letter-spacing: .08em;
    -webkit-text-stroke: .3px currentColor;
    text-wrap: balance;
}

.jy-home-hero__title-line {
    display: block;
    white-space: nowrap;
}

.jy-home-hero__title-line--offset {
    padding-inline-start: 3.24em;
}

.jy-home-hero > p {
    max-width: 530px;
    margin: 0;
    color: var(--jy-text-muted);
    font-size: clamp(14px, 1.2vw, 17px);
    line-height: 1.9;
}

.jy-home-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 11px;
    margin-top: 28px;
}

.jy-home-hero__actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 9px 17px;
    border-radius: 9px;
    font-weight: 650;
}

.jy-home-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin: 27px 0 0;
    padding: 19px 0 0;
    color: var(--jy-text-muted);
    border-top: 1px solid var(--jy-border);
    list-style: none;
    font-size: 13px;
}

.jy-home-features li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.jy-home-features i {
    color: var(--jy-gold);
}

.jy-home-footer {
    position: relative;
    z-index: 4;
    padding: 14px 0 15px;
    color: var(--jy-text-muted);
    border-top: 1px solid rgba(var(--jy-primary-rgb), .16);
    background: rgba(255, 255, 255, .38);
    backdrop-filter: blur(12px) saturate(108%);
    -webkit-backdrop-filter: blur(12px) saturate(108%);
    font-size: 12px;
}

[data-bs-theme="dark"] .jy-home-footer {
    border-top-color: rgba(var(--jy-gold-rgb), .2);
    background: rgba(9, 10, 11, .52);
}

.jy-home-footer > .jy-home-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px 28px;
}

.jy-home-footer__contact,
.jy-home-footer__legal {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px 18px;
}

.jy-home-footer__contact span,
.jy-home-footer__legal a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.jy-home-footer__contact i {
    color: var(--jy-primary);
}

.jy-home-footer__legal {
    justify-content: flex-end;
}

.jy-home-footer a {
    color: var(--jy-text-muted);
    text-decoration: none;
}

.jy-home-footer a:hover,
.jy-home-footer a:focus-visible {
    color: var(--jy-primary);
    text-decoration: underline;
}

@media (max-width: 1199.98px) {
    .jy-home-hero {
        width: min(570px, 58vw);
    }

    .jy-home-footer > .jy-home-container {
        align-items: flex-start;
        flex-direction: column;
    }

    .jy-home-footer__legal {
        justify-content: flex-start;
    }
}

@media (max-width: 991.98px) {
    body.jy-home-page,
    [data-bs-theme="dark"] body.jy-home-page {
        background-position: 66% center !important;
        background-attachment: scroll !important;
    }

    .jy-home-header {
        top: 8px;
        margin-top: 10px;
    }

    .jy-home-glass-nav {
        width: calc(100% - 30px);
        min-height: 60px;
        padding: 8px 12px;
        border-radius: 22px;
    }

    .jy-home-glass-nav .navbar-collapse {
        flex-basis: 100%;
        margin-top: 9px;
        padding: 10px 0 3px;
        border-top: 1px solid var(--jy-border);
    }

    .jy-home-header .navbar-nav {
        align-items: stretch;
    }

    .jy-home-header .nav-link {
        justify-content: center;
    }

    .jy-home-main {
        align-items: flex-start;
    }

    .jy-home-hero {
        width: min(620px, 100%);
        margin: 34px 0;
        background: rgba(255, 255, 255, .48);
    }

    [data-bs-theme="dark"] .jy-home-hero {
        background: rgba(9, 10, 11, .54);
    }
}

@media (max-width: 575.98px) {
    .jy-home-container {
        padding-right: 15px;
        padding-left: 15px;
    }

    .jy-home-brand {
        gap: 8px;
        margin-right: 8px;
    }

    .jy-home-brand img {
        width: 32px;
        height: 32px;
    }

    .jy-home-brand strong {
        font-size: 15px;
        letter-spacing: .04em;
    }

    .jy-home-brand small,
    .jy-home-login span {
        display: none;
    }

    .jy-home-header__utilities .jy-topbar-user__name,
    .jy-product-header__utilities .jy-topbar-user__name {
        display: none;
    }

    .jy-home-header__utilities {
        gap: 7px;
    }

    .jy-home-header__utilities .jy-theme-switch {
        gap: 4px;
    }

    .jy-home-header__utilities .jy-theme-switch__icon {
        width: 16px;
        font-size: 15px;
    }

    .jy-home-header__utilities .jy-theme-switch .form-check-input {
        width: 46px;
        height: 26px;
    }

    .jy-home-login {
        min-width: 36px;
        min-height: 36px;
        padding: 7px;
        justify-content: center;
    }

    .jy-home-header__utilities .jy-topbar-user,
    .jy-product-header__utilities .jy-topbar-user {
        min-width: 38px;
        padding-right: 6px;
    }

    .jy-home-header .navbar-toggler {
        width: 36px;
        height: 36px;
    }

    .jy-home-hero {
        margin: 22px 0;
        padding: 24px 20px;
        border-radius: 3px 14px 14px 3px;
    }

    .jy-home-hero__eyebrow {
        font-size: 11px;
        letter-spacing: .1em;
    }

    .jy-home-hero h1 {
        margin-top: 14px;
        font-size: clamp(24px, calc(11vw - 10px), 38px);
    }

    .jy-home-hero > p {
        font-size: 14px;
        line-height: 1.75;
    }

    .jy-home-hero__actions {
        align-items: stretch;
        flex-direction: column;
        margin-top: 22px;
    }

    .jy-home-hero__actions .btn {
        width: 100%;
    }

    .jy-home-features {
        gap: 7px 12px;
        margin-top: 22px;
        padding-top: 15px;
        font-size: 12px;
    }

    .jy-home-footer {
        padding: 13px 0;
    }

    .jy-home-footer__contact,
    .jy-home-footer__legal {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .jy-theme-switch .form-check-input,
    .jy-theme-switch__icon {
        transition: none;
    }
}

/* ---------- 首页认证：08 织物磨砂 / 04 玄夜黑金 ---------- */
.jy-auth-modal .modal-dialog {
    width: min(560px, calc(100vw - 32px));
    max-width: 560px;
}

.jy-auth-modal .jy-auth-card {
    position: relative;
    isolation: isolate;
    max-height: calc(100dvh - 48px);
    overflow: hidden;
    border: 1px solid var(--jy-auth-border) !important;
    border-radius: 26px !important;
    background:
        linear-gradient(145deg, var(--jy-auth-highlight), transparent 28%),
        var(--jy-auth-glass) !important;
    box-shadow: var(--jy-auth-shadow) !important;
    backdrop-filter: blur(26px) saturate(122%);
    -webkit-backdrop-filter: blur(26px) saturate(122%);
}

.jy-auth-modal .jy-auth-card::before,
.jy-auth-modal .jy-auth-card::after {
    position: absolute;
    z-index: -1;
    border-radius: 999px;
    content: "";
    pointer-events: none;
}

.jy-auth-modal .jy-auth-card::before {
    top: -150px;
    right: -115px;
    width: 300px;
    height: 300px;
    border: 1px solid rgba(var(--jy-gold-rgb), .18);
    background: radial-gradient(circle, rgba(var(--jy-gold-rgb), .14), transparent 68%);
}

.jy-auth-modal .jy-auth-card::after {
    bottom: -190px;
    left: -120px;
    width: 340px;
    height: 340px;
    background: radial-gradient(circle, var(--jy-auth-thread), transparent 66%);
}

.jy-auth-modal .jy-auth-header {
    position: relative;
    z-index: 2;
    min-height: 92px;
    padding: 20px 24px 14px;
    border-bottom: 0 !important;
    background: transparent !important;
}

.jy-auth-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.jy-auth-brand img {
    width: 44px;
    height: 44px;
    border: 1px solid var(--jy-border-strong);
    border-radius: 13px;
    box-shadow: 0 8px 22px rgba(var(--jy-primary-rgb), .15);
}

.jy-auth-brand .modal-title {
    margin: 0;
    color: var(--jy-text);
    font-family: "Songti SC", "STSong", "Noto Serif CJK SC", serif;
    font-size: 21px;
    font-weight: 650;
    letter-spacing: .12em;
}

.jy-auth-brand p {
    margin: 3px 0 0;
    color: var(--jy-text-muted);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .2em;
}

.jy-auth-header__actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.jy-auth-header__actions .jy-theme-switch {
    min-height: 32px;
    gap: 5px;
}

.jy-auth-header__actions .jy-theme-switch__icon {
    width: 15px;
    font-size: 14px;
}

.jy-auth-header__actions .jy-theme-switch .form-check-input {
    width: 44px;
    height: 25px;
}

.jy-auth-modal .btn-close {
    width: 32px;
    height: 32px;
    margin: 0;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 10px;
    background-size: 12px;
}

.jy-auth-modal .btn-close:hover,
.jy-auth-modal .btn-close:focus-visible {
    border-color: var(--jy-border-strong);
    background-color: rgba(var(--jy-primary-rgb), .08);
}

.jy-auth-tabs {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0 24px;
    padding: 4px;
    border: 1px solid var(--jy-border) !important;
    border-radius: 13px;
    background: rgba(var(--jy-primary-rgb), .055);
}

.jy-auth-tabs .nav-link {
    min-height: 42px;
    margin: 0;
    padding: 8px 14px;
    color: var(--jy-text-muted);
    border: 0 !important;
    border-radius: 9px;
    font-size: 15px;
    font-weight: 650;
    letter-spacing: .08em;
}

.jy-auth-tabs .nav-link:hover,
.jy-auth-tabs .nav-link:focus-visible {
    color: var(--jy-primary);
    background: rgba(var(--jy-primary-rgb), .08);
}

.jy-auth-tabs .nav-link.active {
    color: var(--jy-primary);
    background: var(--jy-auth-glass-strong);
    box-shadow: 0 5px 16px rgba(var(--jy-primary-rgb), .11), inset 0 -2px 0 var(--jy-gold);
}

.jy-auth-modal .jy-auth-body {
    min-height: 0;
    padding: 20px 28px 24px;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: transparent !important;
    scrollbar-color: var(--jy-border-strong) transparent;
}

.jy-auth-fields > .col {
    width: 100%;
    margin-bottom: 14px !important;
    padding: 0;
}

.jy-auth-fields .form-label {
    margin-bottom: 6px;
    color: var(--jy-text-muted);
    font-size: 13px;
    font-weight: 650;
    letter-spacing: .035em;
}

.jy-auth-fields .form-control {
    min-height: 48px;
    padding: 10px 13px;
    color: var(--jy-text);
    border: 1px solid var(--jy-border-strong);
    border-radius: 11px;
    background: var(--jy-auth-control) !important;
    box-shadow: inset 0 1px 0 var(--jy-auth-highlight);
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.jy-auth-fields .form-control::placeholder {
    color: var(--jy-text-muted);
    opacity: .78;
}

.jy-auth-fields .form-control:hover {
    border-color: rgba(var(--jy-primary-rgb), .44);
}

.jy-auth-fields .form-control:focus {
    border-color: var(--jy-primary);
    background: var(--jy-auth-glass-strong) !important;
    box-shadow: 0 0 0 3px rgba(var(--jy-primary-rgb), .16), inset 0 1px 0 var(--jy-auth-highlight);
}

.jy-auth-fields > .col:last-child {
    display: grid;
    grid-template-columns: 126px minmax(0, 1fr);
    align-items: center;
    gap: 7px 10px;
}

.jy-auth-fields > .col:last-child .form-label,
.jy-auth-fields > .col:last-child .invalid-feedback {
    grid-column: 1 / -1;
}

.jy-auth-fields > .col:last-child .form-label {
    margin: 0;
}

.jy-auth-fields > .col:last-child input[type="hidden"] {
    display: none;
}

.jy-auth-fields .captcha {
    width: 126px;
    height: 48px;
    object-fit: cover;
    border: 1px solid var(--jy-border-strong);
    border-radius: 10px;
    background: var(--jy-surface-soft);
    box-shadow: 0 5px 14px rgba(52, 68, 62, .1);
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.jy-auth-fields .captcha:hover,
.jy-auth-fields .captcha:focus-visible {
    border-color: var(--jy-primary);
    box-shadow: 0 7px 18px rgba(var(--jy-primary-rgb), .18);
    transform: translateY(-1px);
}

.jy-auth-fields > .col:last-child .form-control {
    min-width: 0;
}

.jy-auth-fields .invalid-feedback {
    margin-top: 1px;
    font-size: 12px;
}

.jy-auth-captcha-hint {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    margin: -7px 0 4px;
    color: var(--jy-text-muted);
    font-size: 11px;
}

.jy-auth-captcha-hint i {
    color: var(--jy-gold);
}

.jy-auth-actions {
    position: sticky;
    z-index: 3;
    bottom: -24px;
    display: grid;
    gap: 6px;
    margin-top: 14px;
    padding: 13px 0 5px;
    background: linear-gradient(180deg, transparent, var(--jy-auth-glass-strong) 34%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.jy-auth-actions .btn-primary {
    min-height: 48px;
    border-color: var(--jy-primary);
    border-radius: 11px;
    box-shadow: 0 10px 22px rgba(var(--jy-primary-rgb), .2);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .12em;
}

.jy-auth-actions .btn-primary:hover,
.jy-auth-actions .btn-primary:focus-visible {
    border-color: var(--jy-primary-dark);
    background: var(--jy-primary-dark);
    box-shadow: 0 12px 26px rgba(var(--jy-primary-rgb), .28);
}

.jy-auth-switch {
    justify-self: center;
    padding: 5px 8px;
    color: var(--jy-text-muted);
    font-size: 13px;
    text-decoration: none;
}

.jy-auth-switch:hover,
.jy-auth-switch:focus-visible {
    color: var(--jy-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.jy-auth-loading {
    position: absolute;
    z-index: 8;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
    color: var(--jy-text-muted);
    background: var(--jy-auth-glass-strong);
    font-size: 13px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.jy-auth-modal.is-loading .jy-auth-loading {
    display: flex;
}

.jy-auth-loading .spinner-border {
    width: 2.25rem;
    height: 2.25rem;
    color: var(--jy-primary);
    border-width: .16rem;
}

[data-bs-theme="dark"] .jy-auth-tabs {
    background: rgba(var(--jy-gold-rgb), .045);
}

[data-bs-theme="dark"] .jy-auth-card {
    box-shadow:
        0 0 0 1px rgba(var(--jy-gold-rgb), .08),
        0 34px 100px rgba(0, 0, 0, .72),
        inset 0 1px 0 var(--jy-auth-highlight) !important;
}

[data-bs-theme="dark"] .jy-auth-fields .captcha {
    filter: brightness(.88) contrast(1.08);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .34);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .jy-auth-modal .jy-auth-card,
    .jy-auth-loading {
        background: var(--jy-auth-glass-strong) !important;
    }

    .jy-auth-actions {
        background: var(--jy-auth-glass-strong);
    }
}

@media (max-width: 575.98px) {
    .jy-auth-modal .modal-dialog {
        width: calc(100vw - 20px);
        max-width: none;
        min-height: calc(100dvh - 20px);
        margin: 10px;
    }

    .jy-auth-modal .jy-auth-card {
        max-height: calc(100dvh - 20px);
        border-radius: 21px !important;
    }

    .jy-auth-modal .jy-auth-header {
        min-height: 78px;
        padding: 15px 16px 10px;
    }

    .jy-auth-brand {
        gap: 9px;
    }

    .jy-auth-brand img {
        width: 38px;
        height: 38px;
        border-radius: 11px;
    }

    .jy-auth-brand .modal-title {
        font-size: 18px;
        letter-spacing: .08em;
    }

    .jy-auth-header__actions {
        gap: 7px;
    }

    .jy-auth-header__actions .jy-theme-switch__icon {
        display: none;
    }

    .jy-auth-header__actions .jy-theme-switch .form-check-input {
        width: 42px;
        height: 24px;
    }

    .jy-auth-tabs {
        margin: 0 16px;
    }

    .jy-auth-modal .jy-auth-body {
        padding: 16px 16px calc(18px + env(safe-area-inset-bottom));
    }

    .jy-auth-fields > .col {
        margin-bottom: 12px !important;
    }

    .jy-auth-fields .form-control {
        min-height: 46px;
    }

    .jy-auth-fields > .col:last-child {
        grid-template-columns: 116px minmax(0, 1fr);
        gap: 6px 8px;
    }

    .jy-auth-fields .captcha {
        width: 116px;
        height: 46px;
    }

    .jy-auth-actions {
        bottom: calc(-18px - env(safe-area-inset-bottom));
    }
}

@media (max-width: 374.98px) {
    .jy-auth-brand p {
        display: none;
    }

    .jy-auth-fields > .col:last-child {
        grid-template-columns: 1fr;
    }

    .jy-auth-fields > .col:last-child .form-label,
    .jy-auth-fields > .col:last-child .invalid-feedback,
    .jy-auth-fields > .col:last-child .form-control,
    .jy-auth-fields .captcha {
        grid-column: 1;
    }

    .jy-auth-fields .captcha {
        width: 126px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .jy-auth-modal .fade,
    .jy-auth-fields .form-control,
    .jy-auth-fields .captcha {
        transition: none;
    }
}

/* 最终移动端覆盖：恢复表格上方行内工具栏，同时保留统一横向滚动布局。 */
@media (max-width: 767.98px) {
    .jy-data-actions-direct {
        display: none;
    }

    .service-table-card > form > .service-panel-navbar {
        display: block !important;
    }

    .service-table-card {
        overflow: visible !important;
    }

    .service-table-card > .card-body .dataTables_scroll {
        margin-right: 0;
        margin-left: 0;
    }

    .service-panel-navbar {
        position: relative;
        z-index: 20;
        overflow: visible !important;
        padding: 5px 6px;
    }

    .service-table-card > form {
        position: relative;
        z-index: 20;
        overflow: visible;
    }

    .service-table-card > .card-body {
        position: relative;
        z-index: 0;
    }

    .jy-table-topbar-hidden .service-table-card > form > .service-panel-navbar {
        overflow: hidden !important;
    }

    .service-toolbar-groups {
        align-items: center;
        gap: 4px;
    }

    .jy-order-flow-tabs {
        order: 0;
        width: 100%;
        max-width: 100%;
        flex: 1 1 100%;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scrollbar-width: thin;
        -webkit-overflow-scrolling: touch;
    }

    .jy-order-flow-tabs .btn,
    .jy-order-flow-tabs [role="tab"] {
        min-height: 34px;
        flex: 0 0 auto;
    }

    .jy-mobile-filter-toggle {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        order: 1;
        width: 38px;
        min-width: 38px;
        height: 38px;
        padding: 5px;
    }

    .jy-tool-group--filter {
        display: contents;
    }

    .jy-mobile-filter-collapse {
        order: 20;
        width: 100%;
        flex: 1 1 100%;
        margin-top: 2px;
        padding: 7px;
        border: 1px solid var(--jy-border);
        border-radius: 9px;
        background: var(--jy-surface);
    }

    #serviceMobileFilters.show {
        display: flex;
    }

    .jy-mobile-filter-collapse .service-filters {
        width: 100%;
    }

    .jy-mobile-filter-collapse .service-filters {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 6px;
        padding: 0;
    }

    .jy-mobile-filter-collapse .service-filters > .nav-item,
    .jy-mobile-filter-collapse .service-filters .input-group,
    .jy-mobile-filter-collapse .select2-container,
    .jy-mobile-filter-collapse .jy-date-filter {
        width: 100% !important;
        max-width: none !important;
    }

    .jy-mobile-filter-collapse .form-control,
    .jy-mobile-filter-collapse .form-select,
    .jy-mobile-filter-collapse .btn,
    .jy-mobile-filter-collapse .input-group-text,
    .jy-mobile-filter-collapse .select2-selection {
        min-height: 44px;
        max-width: none !important;
    }

    .jy-tool-group--record {
        order: 2;
        flex: 0 1 auto;
    }

    .jy-tool-group--data {
        order: 3;
        flex: 0 0 auto;
        margin-left: auto;
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    .jy-tool-group--data .jy-tool-group__body {
        padding: 0;
        flex-wrap: nowrap;
    }

    .jy-tool-group--business {
        order: 10;
        width: 100%;
        flex: 1 1 100%;
    }

    .jy-tool-group--record .jy-action-label {
        display: none !important;
    }

    .jy-tool-group__body,
    .service-context-actions {
        gap: 4px;
        padding: 3px 4px;
    }

    .jy-tool-group--record .service-crud-actions > .btn {
        width: 36px;
        min-width: 36px;
        min-height: 38px;
        padding: 5px;
    }

    .jy-tool-group--record .jy-action-icon {
        margin: 0;
    }

    .jy-selection-feedback {
        max-width: min(220px, calc(100vw - 164px));
        min-height: 34px;
        gap: 5px;
        padding: 3px 6px;
        overflow: hidden;
        font-size: 11px;
    }

    .jy-selection-status {
        flex: 0 0 auto;
        font-size: 11px;
    }

    .jy-selection-summary {
        min-width: 0;
        overflow: hidden;
        font-size: 11px;
        text-overflow: ellipsis;
    }

    .jy-tool-group--business .service-context-actions,
    .jy-tool-group--business .btn-group {
        display: flex;
        width: 100%;
    }

    .jy-tool-group--business .btn {
        min-width: 0;
        min-height: 38px;
        flex: 1 1 0;
    }

    .jy-tool-group--data .jy-data-actions-menu > .btn {
        min-height: 38px;
        padding: 5px 8px;
    }

    .jy-data-actions-menu,
    .jy-data-actions-menu .dropdown-menu {
        z-index: 1200;
    }

    .jy-data-actions-direct > .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 38px;
        gap: 5px;
        padding: 5px 8px;
        white-space: nowrap;
    }

    .jy-data-actions-direct .jy-action-label {
        display: inline !important;
    }

    .jy-production-service #inventory_mobile_mode_slot {
        order: 1;
        flex: 0 0 auto;
    }

    .jy-production-service .jy-tool-group--data {
        order: 2;
    }

    .jy-production-service .jy-data-actions-menu {
        display: none;
    }

    .jy-production-service .jy-data-actions-direct {
        display: inline-flex;
        flex-wrap: nowrap;
        gap: 4px;
    }

    .jy-production-service .jy-tool-group--record {
        order: 3;
        width: auto;
        max-width: calc(100% - 78px);
        flex: 0 1 auto;
    }

    .jy-production-service .jy-mobile-filter-toggle {
        order: 2;
    }

    .jy-production-service #inventory_mobile_stage_slot {
        order: 10;
        width: 100%;
        flex: 1 1 100%;
    }

    @media (max-width: 359.98px) {
        .jy-production-service .jy-data-actions-direct > .btn {
            padding-inline: 4px;
        }
    }

    .service-table-card #myTable,
    .jy-production-service #myTable,
    .service-table-card .dataTables_scrollHead table,
    .service-table-card .dataTables_scrollBody table {
        width: max-content !important;
        min-width: 100% !important;
        table-layout: fixed !important;
    }

    .service-table-card .dataTables_scrollHead thead th,
    .service-table-card #myTable thead th,
    .service-table-card #myTable tbody > tr:not(.child) > td {
        box-sizing: border-box;
        height: 44px;
        min-height: 44px;
        max-height: 44px;
        padding: 4px 6px !important;
        font-size: 12px !important;
        line-height: 1.2;
        white-space: nowrap !important;
    }

    .service-table-card .dataTables_scroll {
        position: relative;
        isolation: isolate;
    }

    .service-table-card .dataTables_scrollBody {
        overscroll-behavior-x: contain;
        overscroll-behavior-y: auto;
        touch-action: pan-x pan-y;
        -webkit-overflow-scrolling: touch;
    }

    /* 手机列宽契约：390px 可完整容纳四个常用核心列，320px 至少容纳三个。 */
    .service-table-card .jy-table-col--short {
        width: 68px !important;
        min-width: 68px !important;
        max-width: 68px !important;
    }

    .service-table-card .jy-table-col--key {
        width: 84px !important;
        min-width: 84px !important;
        max-width: 84px !important;
    }

    /* 寄样表的样品内容较长，手机端使用独立列宽。 */
    .service-table-card .jy-table-col--sample {
        width: 150px !important;
        min-width: 150px !important;
        max-width: 150px !important;
    }

    .service-table-card .jy-table-col--date {
        width: 88px !important;
        min-width: 88px !important;
        max-width: 88px !important;
    }

    .service-table-card .jy-table-col--datetime {
        width: 112px !important;
        min-width: 112px !important;
        max-width: 112px !important;
    }

    .service-table-card .jy-table-col--number {
        width: 82px !important;
        min-width: 82px !important;
        max-width: 82px !important;
    }

    .service-table-card .jy-table-col--money {
        width: 92px !important;
        min-width: 92px !important;
        max-width: 92px !important;
    }

    .service-table-card .jy-table-col--text {
        width: 104px !important;
        min-width: 104px !important;
        max-width: 104px !important;
    }

    .service-table-card .jy-table-col--wide {
        width: 136px !important;
        min-width: 136px !important;
        max-width: 136px !important;
    }

    .service-table-card .jy-table-col--action {
        width: 104px !important;
        min-width: 104px !important;
        max-width: 104px !important;
    }

    /* 剪线后数量包含可编辑表达式，手机端在原 76px 基础上扩大约 2/3。 */
    .service-table-card .jy-table-col--cut-quantity {
        width: 127px !important;
        min-width: 127px !important;
        max-width: 127px !important;
    }

    .service-table-card .jy-mobile-sticky {
        position: sticky !important;
        left: 0;
        z-index: 6;
        background: var(--jy-surface) !important;
        box-shadow: 1px 0 0 var(--jy-border), 7px 0 10px -10px rgba(20, 38, 31, .55);
    }

    .service-table-card .dataTables_scrollHead .jy-mobile-sticky {
        z-index: 9;
        background: var(--jy-th-bg) !important;
    }

    .service-table-card #myTable tbody > tr:hover > .jy-mobile-sticky,
    .service-table-card #myTable tbody > tr.selected > .jy-mobile-sticky {
        background: var(--jy-row-hover) !important;
    }

    /* 横向边界渐隐仅在确实还有内容可滚动时出现。 */
    .service-table-card .dataTables_scroll::before,
    .service-table-card .dataTables_scroll::after {
        position: absolute;
        top: 44px;
        bottom: 0;
        z-index: 11;
        width: 18px;
        content: "";
        opacity: 0;
        transition: opacity .16s ease;
        pointer-events: none;
    }

    .service-table-card .dataTables_scroll::before {
        left: 0;
        background: linear-gradient(90deg, color-mix(in srgb, var(--jy-surface) 88%, transparent), transparent);
    }

    .service-table-card .dataTables_scroll::after {
        right: 0;
        background: linear-gradient(270deg, color-mix(in srgb, var(--jy-surface) 88%, transparent), transparent);
    }

    .service-table-card .dataTables_scroll.jy-can-scroll-left::before,
    .service-table-card .dataTables_scroll.jy-can-scroll-right::after {
        opacity: 1;
    }

    .jy-table-runtime-status {
        right: 6px;
        bottom: 6px;
        max-width: calc(100% - 12px);
    }

    .jy-table-scroll-hint {
        bottom: 46px;
    }

    .jy-invoice-tabs {
        width: 100%;
    }

    .jy-invoice-tabs .btn,
    .jy-invoice-tabs [role="tab"] {
        min-width: 0;
        min-height: 38px;
        flex: 1 1 0;
        padding-inline: 6px;
    }

    /* 覆盖上方通用 44px 表头规则，防止 Scroller 的表体复制表头形成空白带。 */
    .service-table-card .dataTables_scrollBody #myTable > thead,
    .service-table-card .dataTables_scrollBody #myTable > thead > tr,
    .service-table-card .dataTables_scrollBody #myTable > thead > tr > th,
    .service-table-card .dataTables_scrollBody #myTable > thead > tr > td {
        height: 0 !important;
        min-height: 0 !important;
        max-height: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        font-size: 0 !important;
        line-height: 0 !important;
        overflow: hidden !important;
    }

    .service-table-card .dataTables_scrollBody #myTable > thead .dataTables_sizing {
        height: 0 !important;
        min-height: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
    }
}

/* 工具栏断点覆盖放在文件末尾，避免旧移动表格规则重新覆盖新结构。 */
.service-toolbar-groups > .inventory-mobile-control-slot {
    display: flex;
    min-width: 0;
    align-items: center;
    flex: 0 0 auto;
}

/* 复选筛选与日期、下拉和工具按钮共用统一控件高度。 */
.service-panel-navbar .service-filters > .nav-item > .input-group-text {
    height: var(--jy-control-height);
    min-height: var(--jy-control-height);
    align-items: center;
    box-sizing: border-box;
    line-height: 1.5;
}

@media (min-width: 992px) {
    .service-toolbar-groups {
        width: 100%;
        min-width: 0;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        overscroll-behavior-x: contain;
        scrollbar-width: thin;
    }

    .jy-tool-group,
    .service-toolbar-groups > .jy-table-tabs,
    .service-toolbar-groups > [class*="mobile-control-slot"] {
        flex-shrink: 0;
    }

    .jy-tool-group--search {
        width: clamp(240px, 20vw, 300px);
        min-width: 240px;
        max-width: 300px;
        flex: 0 1 clamp(240px, 20vw, 300px);
    }

    .jy-tool-group--search:has([data-jy-search-field-count="2"]) {
        width: clamp(320px, 28vw, 420px);
        min-width: 320px;
        max-width: 420px;
        flex-basis: clamp(320px, 28vw, 420px);
    }

    .jy-tool-group--search:has([data-jy-search-field-count="3"]) {
        width: clamp(450px, 36vw, 520px);
        min-width: 450px;
        max-width: 520px;
        flex-basis: clamp(450px, 36vw, 520px);
    }

    .jy-table-search-control > .jy-table-search-input {
        margin-left: -1px;
        border-radius: 0 !important;
    }

    .jy-table-search-control > .jy-table-search-input:first-of-type {
        margin-left: 0;
        border-top-left-radius: var(--bs-border-radius) !important;
        border-bottom-left-radius: var(--bs-border-radius) !important;
    }

    .jy-table-search-actions {
        margin-left: -1px;
    }

    .jy-table-search-actions .btn {
        width: 38px;
        padding-inline: 0;
        border-radius: 0 !important;
    }

    .jy-table-search-actions .btn + .btn {
        margin-left: -1px;
    }

    .jy-table-search-actions .jy-table-search-clear,
    .jy-table-search-actions:has(.jy-table-search-clear[hidden]) .jy-table-search-submit {
        border-top-right-radius: var(--bs-border-radius) !important;
        border-bottom-right-radius: var(--bs-border-radius) !important;
    }

    .jy-tool-group--filter > .jy-more-filter-toggle {
        display: none !important;
    }

    .jy-tool-group--filter > .jy-more-filter-menu {
        position: static !important;
        z-index: auto;
        inset: auto !important;
        display: flex !important;
        width: auto;
        min-width: 0;
        max-width: none;
        max-height: none;
        align-items: center;
        gap: 6px;
        margin: 0 !important;
        padding: 5px 7px;
        overflow: visible;
        transform: none !important;
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    .jy-tool-group--filter .jy-table-mobile-search-slot {
        display: none !important;
    }

    .jy-tool-group--filter .service-filters {
        flex: 0 0 auto;
        flex-wrap: nowrap;
    }

    .jy-tool-group--filter .service-filters > .nav-item {
        flex: 0 0 auto;
    }

    .jy-more-filter-menu {
        overscroll-behavior: contain;
    }
}

@media (min-width: 992px) and (max-width: 1439.98px) {
    .service-toolbar-groups {
        gap: 4px;
    }

    .jy-tool-group__body,
    .service-context-actions {
        gap: 4px;
        padding: 4px 5px;
    }

    .jy-tool-group--filter > .jy-more-filter-menu {
        padding: 4px 5px;
    }

    .jy-more-filter-label,
    .service-crud-actions .jy-action-label {
        display: none;
    }

    .jy-more-filter-toggle,
    .service-crud-actions .btn {
        min-width: 36px;
        padding-inline: 8px;
    }

    .jy-data-actions-direct {
        display: none;
    }

    .jy-data-actions-menu,
    .jy-data-actions-menu [data-jy-core-data-action] {
        display: block !important;
    }
}

@media (min-width: 1440px) {
    .jy-more-filter-label,
    .service-crud-actions .jy-action-label {
        display: inline;
    }
}

@media (max-width: 991.98px) {
    .service-toolbar-groups {
        align-items: center;
        flex-wrap: wrap;
    }

    .jy-tool-group--search[hidden] {
        display: none !important;
    }

    .jy-tool-group--filter {
        display: contents;
    }

    .jy-mobile-filter-toggle {
        display: inline-flex !important;
        order: 1;
        width: auto;
        min-width: 38px;
        min-height: 38px;
        align-items: center;
        justify-content: center;
        padding: 5px 8px;
    }

    .jy-more-filter-label {
        display: none;
    }

    .jy-more-filter-menu {
        position: static !important;
        inset: auto !important;
        flex-direction: column;
        order: 20;
        width: 100%;
        max-width: 100%;
        max-height: min(62vh, 520px);
        flex: 1 1 100%;
        margin: 2px 0 0 !important;
        overflow-y: auto;
        transform: none !important;
        overscroll-behavior: contain;
    }

    .jy-more-filter-menu .service-filters {
        display: grid;
        width: 100%;
        grid-template-columns: minmax(0, 1fr);
        gap: 6px;
        padding: 0;
    }

    .jy-more-filter-menu .service-filters > .nav-item,
    .jy-more-filter-menu .input-group,
    .jy-more-filter-menu .input-group-text,
    .jy-more-filter-menu .jy-date-filter,
    .jy-more-filter-menu .select2-container,
    .jy-table-mobile-search-slot,
    .jy-table-mobile-search-slot .jy-table-search-filter {
        width: 100% !important;
        max-width: none !important;
    }

    .jy-table-mobile-search-slot .jy-table-search-control {
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    .jy-table-mobile-search-slot .jy-table-search-input {
        width: 100%;
        min-width: 0;
        border-radius: var(--bs-border-radius) !important;
    }

    .jy-table-mobile-search-slot .jy-table-search-actions {
        display: flex;
        justify-content: flex-end;
        gap: 6px;
        width: 100%;
    }

    .jy-table-mobile-search-slot .jy-table-search-actions .btn {
        width: 44px;
        border-radius: var(--bs-border-radius) !important;
    }

    .jy-more-filter-menu .form-control,
    .jy-more-filter-menu .form-select,
    .jy-more-filter-menu .btn,
    .jy-more-filter-menu .input-group-text,
    .jy-more-filter-menu .select2-selection {
        min-height: 44px;
        max-width: none !important;
    }

    .jy-table-mobile-search-slot:not(:empty) {
        display: block;
    }
}

/* 面料分类审核台 */
.jy-classification-page {
    display: flex;
    height: calc(100dvh - var(--jy-app-topbar-height));
    min-height: 0;
    flex-direction: column;
    gap: .85rem;
    overflow: hidden;
}

.jy-classification-summary {
    display: flex;
    align-items: stretch;
    gap: .65rem;
}

.jy-classification-summary > div:not(.jy-classification-summary__actions) {
    display: flex;
    min-width: 8.5rem;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: .65rem .85rem;
    border: 1px solid var(--jy-border, var(--bs-border-color));
    border-radius: .7rem;
    background: var(--jy-surface, var(--bs-body-bg));
}

.jy-classification-summary strong {
    color: var(--jy-primary, var(--bs-primary));
    font-size: 1.25rem;
}

.jy-classification-summary__label {
    color: var(--jy-text-muted, var(--bs-secondary-color));
    font-size: .78rem;
}

.jy-classification-summary__actions {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: flex-end;
}

.jy-classification-layout {
    display: grid;
    grid-template-columns: minmax(18rem, 22rem) minmax(24rem, 1fr) minmax(22rem, 26rem);
    gap: .85rem;
    height: 0;
    min-height: 0;
    flex: 1 1 0;
    align-items: stretch;
    overflow: hidden;
}

.jy-classification-panel {
    height: 100%;
    min-width: 0;
    min-height: 0;
    border: 1px solid var(--jy-border, var(--bs-border-color));
    border-radius: .8rem;
    background: var(--jy-surface, var(--bs-body-bg));
    box-shadow: var(--jy-shadow-sm, 0 .25rem .8rem rgba(0, 0, 0, .04));
}

.jy-classification-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .85rem 1rem;
    border-bottom: 1px solid var(--jy-border, var(--bs-border-color));
}

.jy-classification-panel__header h2 {
    margin: 0;
    color: var(--jy-text, var(--bs-body-color));
    font-size: 1rem;
}

.jy-classification-editor__model {
    display: none;
    margin-top: .25rem;
    padding: 0;
    border: 0;
    background: transparent;
    font-size: .82rem;
    font-weight: 650;
    line-height: 1.25;
    text-align: left;
}

.jy-classification-eyebrow {
    display: block;
    margin-bottom: .15rem;
    color: var(--jy-gold, var(--bs-warning));
    font-size: .63rem;
    font-weight: 700;
    letter-spacing: .13em;
}

.jy-classification-queue,
.jy-classification-viewer,
.jy-classification-editor {
    display: flex;
    height: 100%;
    min-height: 0;
    flex-direction: column;
    overflow: hidden;
}

.jy-classification-filters {
    padding: .75rem 1rem;
    border-bottom: 1px solid var(--jy-border, var(--bs-border-color));
    background: var(--jy-surface-soft, var(--bs-tertiary-bg));
}

.jy-classification-filters .form-label {
    margin: .45rem 0 .25rem;
    color: var(--jy-text-muted, var(--bs-secondary-color));
    font-size: .75rem;
}

.jy-classification-label-filter {
    position: relative;
}

.jy-classification-label-filter .select2-container {
    display: block;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100%;
}

.jy-classification-label-filter .select2-selection--multiple {
    width: 100%;
    min-height: var(--jy-control-height) !important;
    padding-top: 4px !important;
    padding-right: 2.25rem !important;
    padding-bottom: 4px !important;
}

.jy-classification-label-filter .select2-selection--multiple .select2-selection__rendered {
    min-height: calc(var(--jy-control-height) - 10px);
    align-items: center;
    flex-wrap: wrap;
    row-gap: .25rem;
    overflow: visible !important;
}

.jy-classification-label-filter .select2-selection--multiple .select2-selection__choice {
    margin-bottom: 0 !important;
}

.jy-classification-label-filter .select2-selection--multiple .select2-search--inline {
    display: flex;
    width: auto;
    min-width: 0;
    min-height: calc(var(--jy-control-height) - 10px);
    flex: 1 1 3rem;
    align-items: center;
}

.jy-classification-label-filter .select2-selection--multiple .select2-search--inline .select2-search__field {
    width: 100% !important;
    min-width: 0;
    margin: 0 !important;
    line-height: calc(var(--jy-control-height) - 10px);
}

.jy-classification-label-filter::after {
    position: absolute;
    top: 50%;
    right: 1rem;
    width: .55rem;
    height: .55rem;
    border-right: 2px solid var(--jy-text, var(--bs-body-color));
    border-bottom: 2px solid var(--jy-text, var(--bs-body-color));
    content: "";
    opacity: .9;
    pointer-events: none;
    transform: translateY(-65%) rotate(45deg);
}

.jy-classification-table-wrap {
    flex: 1;
    overflow-x: hidden;
    overflow-y: auto;
    padding: .5rem .65rem;
}

.jy-classification-table-wrap #classificationTable_wrapper {
    width: 100%;
    min-width: 0;
}

.jy-classification-table-wrap #classificationTable_wrapper > .row:first-child {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    align-items: center;
    gap: .55rem;
    margin: .3rem 0 .65rem;
}

.jy-classification-table-wrap #classificationTable_wrapper > .row:first-child > [class*="col-"] {
    width: auto;
    min-width: 0;
    max-width: none;
    padding: 0;
}

.jy-classification-table-wrap .dataTables_length label {
    display: flex;
    align-items: center;
    gap: .35rem;
    margin: 0;
    white-space: nowrap;
}

.jy-classification-table-wrap .dataTables_length select {
    width: auto;
    min-width: 4.25rem;
}

.jy-classification-table-wrap .dataTables_filter,
.jy-classification-table-wrap .dataTables_filter label {
    display: block;
    width: 100%;
    min-width: 0;
    margin: 0;
}

#classificationTable {
    margin: 0 !important;
    table-layout: fixed;
}

#classificationTable th:last-child,
#classificationTable td:last-child {
    width: 5.25rem;
}

#classificationTable tbody tr {
    cursor: pointer;
}

#classificationTable tbody tr.is-selected > * {
    background: var(--jy-priority-bg, var(--bs-primary-bg-subtle));
    box-shadow: inset 3px 0 0 var(--jy-primary, var(--bs-primary));
}

#classificationTable td:first-child strong,
#classificationTable td:first-child small {
    display: block;
}

#classificationTable td:first-child small {
    max-width: 14rem;
    margin-top: .15rem;
    overflow: hidden;
    color: var(--jy-text-muted, var(--bs-secondary-color));
    font-size: .68rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jy-classification-table-wrap .dt-layout-row {
    margin: .3rem 0;
}

.jy-classification-table-wrap .dt-search input {
    width: 100%;
    margin: 0 !important;
}

.jy-classification-table-wrap .dataTables_filter input {
    width: 100% !important;
    min-width: 0;
    margin: 0 !important;
}

.jy-classification-image-stage {
    display: flex;
    min-height: 0;
    flex: 1;
    align-items: flex-start;
    justify-content: flex-start;
    overflow: auto;
    padding: 1rem;
    background-color: var(--jy-surface-soft, var(--bs-tertiary-bg));
    background-image: linear-gradient(45deg, rgba(127, 127, 127, .045) 25%, transparent 25%),
                      linear-gradient(-45deg, rgba(127, 127, 127, .045) 25%, transparent 25%),
                      linear-gradient(45deg, transparent 75%, rgba(127, 127, 127, .045) 75%),
                      linear-gradient(-45deg, transparent 75%, rgba(127, 127, 127, .045) 75%);
    background-position: 0 0, 0 8px, 8px -8px, -8px 0;
    background-size: 16px 16px;
}

.jy-classification-image-stage img {
    display: block;
    max-width: none;
    max-height: none;
    flex: 0 0 auto;
    min-width: 0;
    margin: auto;
    border-radius: .35rem;
    box-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .16);
}

.jy-classification-empty {
    display: flex;
    min-height: 20rem;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: var(--jy-text-muted, var(--bs-secondary-color));
    text-align: center;
}

.jy-classification-empty i {
    margin-bottom: .7rem;
    font-size: 2.2rem;
    opacity: .45;
}

.jy-classification-empty--compact {
    min-height: 10rem;
}

.jy-classification-category-list {
    flex: 1;
    overflow: auto;
    padding: .75rem 1rem;
}

.jy-classification-category {
    margin: 0 0 .7rem;
    padding: .7rem;
    border: 1px solid var(--jy-border, var(--bs-border-color));
    border-radius: .65rem;
    background: var(--jy-surface-soft, var(--bs-tertiary-bg));
}

.jy-classification-category legend {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    float: none;
    width: 100%;
    margin-bottom: .55rem;
    color: var(--jy-text, var(--bs-body-color));
    font-size: .86rem;
    font-weight: 700;
}

.jy-classification-category legend span {
    color: var(--jy-text-muted, var(--bs-secondary-color));
    font-size: .65rem;
    font-weight: 400;
}

.jy-classification-choices {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}

.jy-classification-category.is-not-applicable {
    opacity: .62;
}

.jy-category-note {
    margin-top: .35rem;
    color: var(--jy-text-muted, var(--bs-secondary-color));
    font-size: .7rem;
}

.jy-classification-editor__footer {
    padding: .75rem 4.75rem .75rem 1rem;
    border-top: 1px solid var(--jy-border, var(--bs-border-color));
    background: var(--jy-surface, var(--bs-body-bg));
}

.jy-classification-editor__footer .d-flex {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.jy-taxonomy-new-category,
.jy-taxonomy-category {
    padding: 1rem;
    border: 1px solid var(--jy-border, var(--bs-border-color));
    border-radius: .7rem;
    background: var(--jy-surface-soft, var(--bs-tertiary-bg));
}

.jy-taxonomy-category + .jy-taxonomy-category {
    margin-top: 1rem;
}

.jy-taxonomy-category.is-dragging,
.jy-taxonomy-category tr.is-dragging {
    position: relative;
    z-index: 2;
    opacity: .72;
    outline: 2px solid color-mix(in srgb, var(--jy-primary) 55%, transparent);
    outline-offset: 2px;
}

.jy-taxonomy-category__header small {
    display: block;
    margin-top: .2rem;
    color: var(--jy-text-muted, var(--bs-secondary-color));
    font-size: .66rem;
}

.jy-taxonomy-drag-cell {
    width: 3.25rem;
    text-align: center;
}

.taxonomy-drag-handle {
    display: inline-flex;
    width: 2.5rem;
    height: calc(1.5em + .75rem + 2px);
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: grab;
    touch-action: none;
    user-select: none;
}

.taxonomy-label-drag-handle {
    width: 2rem;
    height: 2rem;
}

.taxonomy-drag-handle:active,
.jy-taxonomy-dragging .taxonomy-drag-handle {
    cursor: grabbing;
}

.jy-taxonomy-dragging {
    user-select: none;
}

.jy-taxonomy-footer {
    gap: .75rem;
    border-color: var(--jy-border, var(--bs-border-color));
    background: var(--jy-surface, var(--bs-body-bg));
}

.jy-taxonomy-footer #taxonomySaveState {
    min-width: 8rem;
}

@media (max-width: 1399.98px) {
    .jy-classification-layout {
        grid-template-columns: minmax(17rem, 19rem) minmax(20rem, 1fr) minmax(20rem, 23rem);
    }
}

@media (max-width: 991.98px) {
    .jy-classification-page {
        height: auto;
        min-height: calc(100dvh - var(--jy-app-topbar-height));
        overflow: visible;
    }

    .jy-classification-summary {
        flex-wrap: wrap;
    }

    .jy-classification-summary > div:not(.jy-classification-summary__actions) {
        min-width: calc(33.333% - .5rem);
        flex: 1;
    }

    .jy-classification-summary__actions {
        flex-basis: 100%;
    }

    .jy-classification-summary__actions .btn {
        width: 100%;
    }

    .jy-classification-layout {
        display: flex;
        height: auto;
        flex-direction: column;
        overflow: visible;
    }

    .jy-classification-panel,
    .jy-classification-queue,
    .jy-classification-viewer,
    .jy-classification-editor {
        height: auto;
    }

    .jy-classification-editor {
        order: 1;
        height: calc(100dvh - var(--jy-app-topbar-height) - .75rem);
        min-height: 30rem;
        max-height: 46rem;
        flex: 0 0 auto;
        scroll-margin-top: calc(var(--jy-app-topbar-height) + .5rem);
    }

    .jy-classification-editor .jy-classification-panel__header,
    .jy-classification-editor__footer {
        flex: 0 0 auto;
    }

    .jy-classification-editor .jy-classification-category-list {
        min-height: 0;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .jy-classification-editor__model:not([hidden]) {
        display: inline-flex;
        max-width: min(15rem, calc(100vw - 9rem));
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .jy-classification-viewer {
        order: 2;
        min-height: 34rem;
    }

    .jy-classification-queue {
        order: 3;
    }

    .jy-classification-table-wrap {
        max-height: 32rem;
    }
}

@media (max-width: 575.98px) {
    .jy-classification-summary {
        gap: .35rem;
    }

    .jy-classification-summary > div:not(.jy-classification-summary__actions) {
        min-width: 0;
        flex: 1 1 calc(33.333% - .25rem);
        flex-direction: column;
        align-items: center;
        gap: .1rem;
        padding: .42rem .25rem;
        text-align: center;
    }

    .jy-classification-summary strong {
        font-size: 1.05rem;
    }

    .jy-classification-summary__label {
        font-size: .68rem;
    }

    .jy-classification-viewer {
        min-height: 25rem;
    }

    .jy-classification-editor__footer {
        padding-right: 4.25rem;
    }
}

/* ==========================================================================
   业务表格上下文菜单：桌面右键、触屏“更多操作”共用同一动作源
   ========================================================================== */
.service-crud-actions,
.service-context-actions,
.jy-tool-group--business,
.jy-table-context-source-registry {
    display: none !important;
}

.jy-table-context-toggle {
    display: none;
    min-height: 36px;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.jy-table-context-menu {
    position: fixed !important;
    z-index: 1300;
    width: max-content;
    min-width: 168px;
    max-width: min(280px, calc(100vw - 16px));
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
    margin: 0 !important;
    overflow-x: hidden;
    overflow-y: auto;
    color: var(--jy-text);
    border-color: var(--jy-border);
    background: var(--jy-surface);
    box-shadow: 0 12px 30px rgba(16, 30, 24, .2);
}

.jy-table-context-menu__item {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 38px;
    color: var(--jy-text);
}

.jy-table-context-menu__item i {
    width: 1.1rem;
    margin: 0;
    flex: 0 0 1.1rem;
    color: var(--jy-primary);
    text-align: center;
}

.jy-table-context-menu__item:hover,
.jy-table-context-menu__item:focus {
    outline: 0;
    color: var(--jy-primary);
    background: var(--jy-row-hover);
    box-shadow: none;
}

.jy-table-context-menu__item:focus-visible {
    box-shadow: inset 3px 0 0 var(--jy-gold);
}

.jy-table-context-menu__item--danger,
.jy-table-context-menu__item--danger i {
    color: var(--bs-danger-text-emphasis);
}

.jy-table-context-menu__item:disabled {
    color: var(--jy-text-muted);
    opacity: .55;
}

@media (max-width: 991.98px) {
    .jy-production-service .inventory-mobile-create-slot {
        display: flex;
        min-width: 0;
        order: 2;
        flex: 0 0 auto;
    }

    .jy-production-service #inventory_mobile_create {
        display: inline-flex;
        min-height: 36px;
        align-items: center;
        justify-content: center;
        gap: 5px;
        padding-inline: 10px;
        white-space: nowrap;
    }

    .jy-table-context-toggle {
        display: inline-flex;
    }
}

/* ===== 客户表对账长图预览 ===== */
.jy-statement-start-filter {
    min-width: 250px;
    padding: .25rem .35rem;
    border-left: 3px solid var(--jy-primary);
    border-radius: var(--jy-radius-sm);
    background: var(--jy-surface-soft);
}

.jy-customer-balance {
    min-width: 7.5rem;
    padding: .25rem .5rem;
    border: 0;
    border-radius: 999px;
    background: var(--jy-priority-bg);
    color: var(--jy-primary-dark);
    font-weight: 750;
    font-variant-numeric: tabular-nums;
}

.jy-customer-balance:hover,
.jy-customer-balance:focus-visible {
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--jy-primary) 28%, transparent);
}

.jy-customer-balance.is-due {
    border: 1px solid color-mix(in srgb, var(--jy-gold) 52%, transparent);
}

.jy-customer-balance.is-overpaid {
    background: var(--bs-danger-bg-subtle);
    color: var(--bs-danger-text-emphasis);
}

.jy-customer-balance.is-settled {
    background: var(--jy-surface-soft);
    color: var(--jy-text-muted);
}

.jy-statement-preview-modal {
    border-color: var(--jy-border);
    background: var(--jy-surface);
}

.jy-statement-preview-modal__eyebrow {
    margin: 0 0 .15rem;
    color: var(--jy-primary);
    font-size: .7rem;
    font-weight: 750;
    letter-spacing: .08em;
}

.jy-statement-preview-modal__meta {
    margin: .2rem 0 0;
    color: var(--jy-text-muted);
    font-size: .78rem;
}

.jy-statement-preview-status,
.jy-statement-preview-error {
    min-height: 280px;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    text-align: center;
}

.jy-statement-preview-status {
    display: flex;
    flex-direction: column;
    color: var(--jy-text-muted);
}

.jy-statement-preview-error {
    flex-direction: column;
}

.jy-statement-preview-error:not([hidden]) {
    display: flex;
}

.jy-statement-preview-status[hidden],
.jy-statement-preview-error[hidden],
.jy-statement-preview-canvas[hidden] {
    display: none !important;
}

.jy-statement-preview-canvas {
    max-height: calc(100vh - 240px);
    padding: .75rem;
    overflow: auto;
    border: 1px solid var(--jy-border);
    border-radius: var(--jy-radius);
    background: var(--jy-bg);
}

.jy-statement-preview-canvas img {
    display: block;
    width: min(100%, 1600px);
    height: auto;
    margin-inline: auto;
    border: 1px solid var(--jy-border);
    background: var(--jy-bg);
}

.jy-statement-preview-actions {
    flex-wrap: nowrap;
    justify-content: center;
    gap: .6rem;
}

.modal#customerStatementModal .modal-footer.jy-statement-preview-actions .btn {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    text-align: center;
}

.jy-statement-copy-button {
    width: 42px;
    min-width: 42px !important;
    padding: 0;
}

.jy-statement-copy-button .bi {
    margin: 0;
    font-size: 1rem;
}

.jy-statement-export-button {
    min-width: 92px !important;
}

@media screen and (max-width: 767.98px) {
    .jy-statement-start-filter {
        width: 100%;
        min-width: 0;
    }

    .jy-statement-preview-canvas {
        max-height: none;
        padding: .35rem;
    }

    .modal#customerStatementModal .modal-footer.jy-statement-preview-actions {
        flex-wrap: nowrap;
        justify-content: center;
        gap: .5rem;
    }

    .modal#customerStatementModal .modal-footer.jy-statement-preview-actions .btn,
    .modal#customerStatementModal .modal-footer.jy-statement-preview-actions a {
        flex: 0 0 auto;
        min-width: 0;
    }
}
