.page-body {
    background-color: var(--jc-main-bg-color) !important;
    padding-top: 10px;
    margin-top: 0 !important;
}

/* 账簿联查：可钻取科目/凭证链接 */
.accountbook-drill-link {
    color: var(--tblr-primary);
    cursor: pointer;
    text-decoration: none;
}

.accountbook-drill-link:hover {
    text-decoration: underline;
}

.accountbook-drill-amount {
    display: inline-block;
    min-width: 1em;
}

.accountbook-drill-amount.is-drillable {
    color: var(--tblr-primary) !important;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.accountbook-drill-amount.is-drillable:hover {
    opacity: 0.85;
}

.accountbook-drill-popover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.search-suggestions {
    position: absolute;
    top: calc(100% + 10px);
    right: 0px;
    min-width: 350px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 9999;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.suggestion-item {
    padding: 8px 12px;
    line-height: 30px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background-color: #f5f5f5;
}

.days-grid {
    user-select: none;
}

.ts-dropdown {
    background-color: #fff;
    z-index: 99999;
}

.no-padding {
    padding: 0;
}

.gap-7 {
    gap: 5rem !important;
}

.ts-wrapper.disabled {
    background-color: var(--tblr-bg-surface-secondary);
}

.s-table__empty-container {
    border-bottom: none !important;
}

.s-table__body-contextmenu-container {
    overflow: unset !important;
}

.page-body {
    margin-bottom: 0 !important;
}

.modal-content {
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.s-table__cell-content .ts-control, .s-table__cell-content .ts-wrapper, .s-table__cell-content .form-control {
    border: none !important;
    background-color: unset !important;
    box-shadow: none !important;
}

.s-table__cell-content .focus .ts-control, .s-table__cell-content .form-control:focus {
    box-shadow: none !important;
}

.form-control {
    padding: .4175rem .75rem;
}

.s-table__cell-content .form-control, .s-table__cell-content .ts-control {
    padding: 0 !important;
}

.s-table__pagination {
    margin: 5px 0px !important;
}

.frame-body {
    height: calc(100vh - 45px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.page-header {
    min-height: unset !important;
}

.detail-card {
    border: none;
    border-radius: 0;
}

.detail-card-right {
    border: none;
    border-radius: 0;
    border-right: 1px solid #eee;
}

.detail-card-left {
    border: none;
    border-radius: 0;
    border-left: 1px solid #eee;
}

.col-form-label {
    text-align: right;
}

.card-header-tabs:not(.my-nav-tabs) {
    padding: 0 !important;
}

.card-header-tabs:not(.my-nav-tabs) .ms-auto .dropdown {
    height: 36px !important;
}

body[small] {
    --s-font-size-base: 12px !important;
    --tblr-body-font-size: 12px !important;

    --tblr-card-cap-padding-y: 0.5rem !important;
    --tblr-card-cap-padding-x: 0.5rem !important;
}

body[small] .dropdown-menu {
    --tblr-dropdown-font-size: 12px !important;
}

body[small] .btn {
    --tblr-btn-icon-size: 1rem !important;
    --tblr-btn-font-size: 12px !important;
    height: 28px !important;
}

body[small] .form-label {
    font-size: 12px !important;
}

body[small] .navbar-vertical.navbar-expand-lg,
body[small] #app-sidebar.navbar-vertical.navbar-expand-lg {
    width: 12rem;
}

body[small] .navbar-expand-lg.navbar-vertical~.navbar,
body[small] .navbar-expand-lg.navbar-vertical~.page-wrapper {
    margin-left: 12rem;
}

body[small] .nav-link {
    padding: 5px 10px 5px 10px;
}

body[small] .icon {
    --tblr-icon-size: 16px;
}

body[small] .card-header-tabs:not(.my-nav-tabs) .ms-auto .dropdown {
    height: 29px !important;
}

body[small] .main-header .navbar-nav .nav-item {
    height: 28px;
}

body[small] .avatar-sm {
    width: 22px;
    height: 22px;
}

body[small] .nav-item .nav-link {
    padding: 2px 10px 2px 10px !important;
    min-height: 30px !important;
}

body[small] .dropdown-item {
    padding-top: 5px !important;
    padding-bottom: 5px !important;
}

body[small] .form-control, body[small] .input-group-text, body[small] .col-form-label, body[small] .ts-control {
    padding: .2175rem .35rem !important;
    font-size: 12px !important;
}

body[small] .ts-wrapper, body[small] .ts-control, body[small] .ts-control .clear-button {
    height: 28px !important;
    line-height: 24px !important;
}

body[small] .ts-control {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}


body[small] .ts-control .clear-button {
    line-height: 18px !important;
    font-size: 24px !important;
}

.form-select {
    --tblr-form-select-bg-img: none !important;
}

.ts-control:not(.rtl) {
    padding-right: 0px !important;
}

.s-table__row.s-table__row-hover {
    background: #f5c056 !important;
}

.s-table {
    user-select: none;
}

.card-header:has(> *):not(:has(.card-title)) {
    padding: 0 !important;
}

.card-header-tabs {
    height: 45px !important;
}

.my-nav-tabs {
    height: 100% !important;
}

/* --- admin index (moved from index.html) --- */
:root {
    --tblr-dropdown-link-color: #000;
    --tblr-dropdown-link-hover-color: #000;
}

.nav-link:focus-visible {
    box-shadow: none;
    outline: none !important;
}

.my-nav-tabs .nav-link:focus,
.my-nav-tabs .nav-link:focus-visible,
.my-nav-tabs .nav-link:active {
    outline: none !important;
    box-shadow: none !important;
}

.navbar {
    overflow: hidden !important;
}

.navbar-collapse {
    height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    padding-bottom: 44px;
    min-height: 400px;
    background-color: var(--tblr-primary) !important;
    flex: 1;
    min-height: 0;
}

.navbar-collapse > c-left-menu {
    position: relative;
    z-index: 1;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

/* 左侧菜单内容区域，可滚动 */
.navbar-collapse > c-navbar {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

/* 左侧菜单底部固定区域 */
.navbar-collapse .department-switcher,
#app-sidebar .department-switcher {
    flex-shrink: 0;
    z-index: 10000 !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    padding: 0;
    margin: 0;
    background: transparent;
    overflow: visible;
    display: flex;
    flex-direction: row;
    gap: 0;
    align-items: stretch;
    border: none !important;
    border-top: none !important;
    box-shadow: none !important;
}

#app-sidebar .department-switcher::before,
#app-sidebar .department-switcher::after {
    display: none !important;
}

.skin-switcher-btn,
#app-sidebar .department-switcher .skin-switcher-btn {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    color: rgba(255, 255, 255, 0.88) !important;
    padding: 0 !important;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    border: none !important;
    border-width: 0 !important;
    box-shadow: none !important;
    outline: none;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.skin-switcher-btn:hover {
    background-color: rgba(255, 255, 255, 0.08) !important;
    border: none !important;
    box-shadow: none !important;
}

.skin-switcher-btn svg {
    width: 20px;
    height: 20px;
    margin: 0;
}

.department-switcher-btn,
#app-sidebar .department-switcher .department-switcher-btn {
    flex: 1;
    color: rgba(255, 255, 255, 0.88) !important;
    padding: 0 12px !important;
    min-height: 44px;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    background-color: transparent;
    border: none !important;
    border-width: 0 !important;
    box-shadow: none !important;
    outline: none;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 13px;
    font-weight: 400;
    transition: background-color 0.15s ease;
}

.department-switcher-btn:hover,
#app-sidebar .department-switcher .department-switcher-btn:hover {
    background-color: rgba(255, 255, 255, 0.08) !important;
    border: none !important;
    box-shadow: none !important;
}

/* 自定义弹出框样式 */
.department-popup {
    position: absolute;
    bottom: 0;
    left: 100%;
    z-index: 10001;
    margin-left: 8px;
    pointer-events: none;
}

.department-popup-content {
    background-color: var(--tblr-primary, #206bc4);
    border: none;
    border-radius: 0;
    max-height: 300px;
    overflow-y: auto;
    width: 240px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    animation: slideUp 0.2s ease-out;
    pointer-events: auto;
    margin-bottom: 8px;
}

@keyframes slideUp {
    from {
        transform: translateY(10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.department-popup-list {
    padding: 4px 0;
}

.department-popup-item {
    color: var(--tblr-primary-fg) !important;
    padding: 6px 12px;
    white-space: normal;
    cursor: pointer;
    display: block;
    transition: background-color 0.2s ease;
}

.department-popup-item:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

.department-popup-item.active {
    background-color: rgba(255, 255, 255, 0.15) !important;
}

.department-popup-item-title {
    font-weight: 500;
    font-size: 13px;
    margin-bottom: 1px;
}

.department-popup-item-desc {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
}

.nav-link {
    position: relative;
    transition: padding-right 0.3s ease;
    text-align: center;
}

.tab-close {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    display: none;
    width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    font-size: 14px;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.2s ease;
    color: var(--tblr-primary-fg);
}

.my-nav-tabs .nav-link:has(.tab-close):hover {
    padding-right: 25px;
    transition: padding-right 0.3s ease;
}

.my-nav-tabs .nav-link:hover .tab-close {
    display: block;
    background-color: rgba(255, 255, 255, 0.2);
}

.tab-close:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transition: background-color 0.3s ease;
}

/*
 * Tab 内容区：header 固定，仅 page-body 滚动。
 * 不用 sticky：page-wrapper 被 height:100% 限制时，sticky 滚过约一屏（父级高度）就会失效。
 */
.frame-body > .frame-page-host {
    flex: 1 1 auto;
    min-height: 0;
    height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.frame-body > .frame-page-host.frame-page-host--hidden {
    display: none !important;
}

.frame-body .frame-page-host > .page-wrapper {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.frame-body .page-wrapper > .page-header {
    position: relative !important;
    top: auto !important;
    flex-shrink: 0;
}

.frame-body .page-wrapper > .page-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.frame-body .page-wrapper.view-island-layout > .view-header-shell {
    flex-shrink: 0;
    position: relative;
}

.frame-body .page-wrapper.view-island-layout > .page-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* 隐藏 tab 滚动条 */
.card-header-tabs {
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
}

.card-header-tabs::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Opera */
}

/* 确保顶部区域对齐 */
.page {
    display: flex;
}

aside.navbar {
    position: relative;
    z-index: 1;
    background-color: var(--tblr-primary) !important;
    flex-shrink: 0;
    overflow: visible !important;
}

#app-sidebar.navbar-vertical.navbar-expand-lg {
    width: 14rem;
}

.navbar-expand-lg.navbar-vertical ~ .page-wrapper {
    margin-left: 14rem;
}

aside.navbar .container-fluid {
    padding: 0 !important;
    background-color: var(--tblr-primary) !important;
    overflow: visible !important;
}

aside.navbar {
    border-right: none !important;
}

.navbar-collapse::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    top: 0;
    background-image: url('/static/year.png');
    background-position: bottom center;
    background-repeat: no-repeat;
    background-size: 100% auto;
    opacity: 0.5;
    pointer-events: none;
    z-index: 0;
}

aside.navbar .navbar-collapse {
    background-color: var(--tblr-primary) !important;
}

aside.navbar .navbar-collapse::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    top: 0;
    background-image: url('/static/year.png');
    background-position: bottom center;
    background-repeat: no-repeat;
    background-size: 100% auto;
    opacity: 0.5;
    pointer-events: none;
    z-index: 0;
}

/* 确保菜单内容在背景图片之上 */
.navbar-collapse > c-navbar {
    position: relative;
    z-index: 1;
}

/* 左侧菜单文字和图标颜色 */
aside.navbar .nav-link {
    color: var(--tblr-primary-fg) !important;
}

aside.navbar .nav-link:hover,
aside.navbar .nav-link:focus,
aside.navbar .nav-link:active {
    color: var(--tblr-primary-fg) !important;
    background-color: var(--jc-menu-selected-color-hover) !important;
}

/* 子级菜单hover状态 */
aside.navbar .nav-item .nav-link:hover,
aside.navbar .nav-item .nav-link:focus,
aside.navbar .nav-item .nav-link:active {
    color: var(--tblr-primary-fg) !important;
    background-color: var(--jc-menu-selected-color-hover) !important;
}

aside.navbar .nav-link.active {
    color: var(--tblr-primary-fg) !important;
    background-color: var(--jc-menu-selected-color) !important;
}

/* 菜单项选中状态 - 父级菜单使用40%透明度 */
aside.navbar .nav-item.active .nav-link,
aside.navbar .nav-item.active {
    background-color: var(--jc-menu-selected-color-parent) !important;
}

/* 子级菜单所有项 - 使用15%透明度 */
aside.navbar .dropdown-menu .dropdown-item,
.navbar-vertical.navbar-expand-lg .navbar-collapse .dropdown-menu .dropdown-item {
    background-color: var(--jc-menu-selected-color-child) !important;
}

/* 子级菜单选中状态 - 使用90%透明度 */
aside.navbar .nav-item.active .nav-item.active .nav-link,
aside.navbar .nav-item.active .nav-item.active,
aside.navbar .nav-item .nav-item.active .nav-link,
aside.navbar .nav-item .nav-item.active {
    background-color: var(--jc-menu-selected-color) !important;
}

/* 下拉菜单子项样式 - hover状态 */
aside.navbar .dropdown-menu .dropdown-item:hover,
aside.navbar .dropdown-menu .dropdown-item:focus,
aside.navbar .dropdown-menu .dropdown-item:active,
.navbar-vertical.navbar-expand-lg .navbar-collapse .dropdown-menu .dropdown-item:hover,
.navbar-vertical.navbar-expand-lg .navbar-collapse .dropdown-menu .dropdown-item:focus,
.navbar-vertical.navbar-expand-lg .navbar-collapse .dropdown-menu .dropdown-item:active {
    color: var(--tblr-primary-fg) !important;
    background-color: var(--jc-menu-selected-color-hover) !important;
}

/* 下拉菜单子项样式 - 选中状态 */
aside.navbar .dropdown-menu .dropdown-item.active,
aside.navbar .dropdown-menu .dropdown-item.active:hover,
aside.navbar .dropdown-menu .dropdown-item.active:focus,
.navbar-vertical.navbar-expand-lg .navbar-collapse .dropdown-menu .dropdown-item.active,
.navbar-vertical.navbar-expand-lg .navbar-collapse .dropdown-menu .dropdown-item.active:hover,
.navbar-vertical.navbar-expand-lg .navbar-collapse .dropdown-menu .dropdown-item.active:focus,
.navbar-vertical.navbar-expand-lg .navbar-collapse .dropdown-menu .dropdown-item:active {
    color: var(--tblr-primary-fg) !important;
    background-color: var(--jc-menu-selected-color) !important;
}

/* 图标颜色设置为白色，移除边框 */
aside.navbar .nav-link svg,
aside.navbar .nav-link .icon {
    color: var(--tblr-primary-fg) !important;
    stroke: var(--tblr-primary-fg) !important;
    border: none !important;
    border-width: 0 !important;
    outline: none !important;
    stroke-width: 2 !important;
}

aside.navbar .nav-link svg path {
    stroke: var(--tblr-primary-fg) !important;
    stroke-width: 2 !important;
    fill: none !important;
}

/* 隐藏导致边框的SVG路径 */
aside.navbar .nav-link svg path[stroke="none"][d*="M0 0h24v24H0z"],
aside.navbar svg path[stroke="none"][d*="M0 0h24v24H0z"],
svg path[stroke="none"][d*="M0 0h24v24H0z"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

aside.navbar .nav-link svg * {
    stroke: var(--tblr-primary-fg) !important;
    stroke-width: 2 !important;
    fill: none !important;
}

/* 移除所有图标的边框 */
aside.navbar svg,
aside.navbar .icon,
aside.navbar img {
    border: none !important;
    border-width: 0 !important;
    outline: none !important;
    box-shadow: none !important;
}

/* 移除图标容器的边框 */
aside.navbar .nav-link,
aside.navbar .nav-item {
    border: none !important;
    border-width: 0 !important;
    outline: none !important;
}

aside.navbar .nav-item {
    color: var(--tblr-primary-fg) !important;
}

aside.navbar .nav-link .nav-link-title,
aside.navbar .nav-link-title {
    color: var(--tblr-primary-fg) !important;
}

/* 确保文字颜色为白色 */
aside.navbar .nav-link span,
aside.navbar .nav-link div,
aside.navbar .nav-link a {
    color: var(--tblr-primary-fg) !important;
}

.page-wrapper {
    flex: 1;
    position: relative;
    min-width: 0;
}

/* Tab 圆角四方形样式 */
.card-header.main-header {
    padding: 0 !important;
    border: none !important;
    align-items: center;
    min-height: 40px;
    height: 40px !important;
    background: var(--tblr-primary) !important;
    border-radius: 0 !important;
    margin: 0 !important;
}

.card-header.main-header > ul,
.card-header.main-header > li,
.card-header.main-header > div {
    background: transparent !important;
}

.navbar-brand {
    height: 40px !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 1;
    border-radius: 0 !important;
    border: none !important;
}

/* 确保左侧logo区域和右侧tabs区域在同一水平线，无缝连接 */
aside.navbar .navbar-brand,
.page-wrapper .card-header.main-header {
    vertical-align: top;
    box-shadow: none !important;
}

/* 移除可能导致断开的边框 */
aside.navbar .navbar-brand::after,
.card-header.main-header::before {
    display: none !important;
}

.navbar-brand-image {
    height: 28px !important;
    width: auto !important;
}

.ms-auto .nav-link svg,
.ms-auto .nav-link .icon {
    color: var(--tblr-primary-fg) !important;
    stroke: var(--tblr-primary-fg) !important;
    border: none !important;
    border-width: 0 !important;
    outline: none !important;
    stroke-width: 2 !important;
}

.ms-auto .nav-link svg path {
    stroke: var(--tblr-primary-fg) !important;
    stroke-width: 2 !important;
    fill: none !important;
}

/* 隐藏顶部区域导致边框的SVG路径 */
.ms-auto .nav-link svg path[stroke="none"][d*="M0 0h24v24H0z"],
.card-header.main-header svg path[stroke="none"][d*="M0 0h24v24H0z"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* 移除顶部区域图标的边框 */
.card-header.main-header svg,
.card-header.main-header .icon,
.card-header.main-header img {
    border: none !important;
    border-width: 0 !important;
    outline: none !important;
    box-shadow: none !important;
}

.card-header.main-header svg path,
.card-header.main-header svg * {
    stroke-width: 2 !important;
    fill: none !important;
}

/* 顶部滚动按钮图标颜色 */
.card-header.main-header .btn-icon {
    color: var(--tblr-primary-fg) !important;
}

.card-header.main-header .btn-icon svg {
    color: var(--tblr-primary-fg) !important;
}

.card-header.main-header .btn-icon svg path {
    stroke: var(--tblr-primary-fg) !important;
}

.card-header.main-header .btn-icon:disabled {
    color: #eee !important;
}

.card-header.main-header .btn-icon:disabled svg {
    color: #eee !important;
}

.card-header.main-header .btn-icon:disabled svg path {
    stroke: #eee !important;
}

/* 移除所有SVG的边框效果 */
svg {
    border: none !important;
    border-width: 0 !important;
    outline: none !important;
}

/* 隐藏所有导致边框的SVG路径 */
svg path[stroke="none"][d*="M0 0h24v24H0z"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

.card-header-tabs {
    margin: 0 !important;
    padding: 0 !important;
    border-bottom: none !important;
    align-items: center;
    height: 100%;
    background-color: transparent !important;
}

/* 通用 tab 样式 */
.my-nav-tabs .nav-item {
    margin-right: 3px !important;
    margin-left: 6px !important;
    display: flex;
    align-items: center;
    margin-bottom: 0;
    height: 30px;
}

.my-nav-tabs .nav-item:first-child {
    margin-left: 0;
}

.my-nav-tabs .nav-link {
    border-radius: 0;
    border: none !important;
    margin: 0;
    padding: 0.35rem 0.9rem;
    background-color: transparent;
    transition: none;
    display: flex;
    align-items: center;
    height: 30px;
    box-shadow: none !important;
    font-size: 0.875rem;
    outline: none !important;
}

.my-nav-tabs .nav-link:hover,
.my-nav-tabs .nav-link:focus,
.my-nav-tabs .nav-link:focus-visible,
.my-nav-tabs .nav-link:active {
    background-color: transparent !important;
    box-shadow: none !important;
    border: none !important;
    outline: none !important;
}

.my-nav-tabs .nav-link.active {
    background-color: transparent !important;
    border: none !important;
    border-bottom: 3px solid var(--jc-menu-selected-color) !important;
    font-weight: 500;
    position: relative;
    z-index: 1;
    box-shadow: none !important;
    outline: none !important;
}

.my-nav-tabs .nav-link.active:hover,
.my-nav-tabs .nav-link.active:focus,
.my-nav-tabs .nav-link.active:focus-visible,
.my-nav-tabs .nav-link.active:active {
    background-color: transparent !important;
    box-shadow: none !important;
    transform: none;
    border: none !important;
    border-bottom: 3px solid var(--jc-menu-selected-color) !important;
    outline: none !important;
}

/* main-header 的 tab 使用 CSS 变量 */
.card-header.main-header .my-nav-tabs .nav-link {
    color: var(--tblr-primary-fg) !important;
}

.card-header.main-header .my-nav-tabs .nav-link:hover,
.card-header.main-header .my-nav-tabs .nav-link:focus,
.card-header.main-header .my-nav-tabs .nav-link:focus-visible,
.card-header.main-header .my-nav-tabs .nav-link:active,
.card-header.main-header .my-nav-tabs .nav-link.active,
.card-header.main-header .my-nav-tabs .nav-link.active:hover,
.card-header.main-header .my-nav-tabs .nav-link.active:focus,
.card-header.main-header .my-nav-tabs .nav-link.active:focus-visible,
.card-header.main-header .my-nav-tabs .nav-link.active:active {
    color: var(--tblr-primary-fg) !important;
}

/* 顶部区域文字和图标颜色 - 覆盖内联样式 */
.card-header.main-header .navbar-nav .nav-item span {
    color: var(--tblr-primary-fg) !important;
}

.card-header.main-header .navbar-nav .nav-item div {
    color: var(--tblr-primary-fg) !important;
}

.card-header.main-header .navbar-nav .nav-link svg {
    stroke: var(--tblr-primary-fg) !important;
    fill: var(--tblr-primary-fg) !important;
}

.card-header.main-header .navbar-nav .nav-link svg path {
    stroke: var(--tblr-primary-fg) !important;
}

.card-header.main-header .navbar-nav .nav-link svg[stroke="#fff"],
.card-header.main-header .navbar-nav .nav-link svg[stroke="#ffffff"] {
    stroke: var(--tblr-primary-fg) !important;
}

.card-header.main-header .navbar-nav .nav-link svg path[stroke="#fff"],
.card-header.main-header .navbar-nav .nav-link svg path[stroke="#ffffff"] {
    stroke: var(--tblr-primary-fg) !important;
}

.card-header.main-header .my-nav-tabs .nav-link:has(.tab-close):hover {
    padding-right: 2rem;
}

.c-status-filter-tabs.card-header-tabs {
    height: auto !important;
    min-height: 0 !important;
}

.c-status-filter-tabs .nav-item {
    margin-right: 2px !important;
    margin-left: 6px !important;
    display: flex;
    align-items: center;
    margin-bottom: 0;
    height: 26px;
}

.c-status-filter-tabs .nav-item:first-child {
    margin-left: 0;
}

.c-status-filter-tabs .nav-link {
    border-radius: 9999px;
    border: none !important;
    border-bottom: none !important;
    margin: 0;
    padding: 0.125rem 0.65rem;
    background-color: transparent;
    color: var(--tblr-body-color, #1e293b);
    transition: color 0.15s ease, background-color 0.15s ease;
    display: flex;
    align-items: center;
    height: 26px;
    line-height: 1.2;
    box-shadow: none !important;
    font-size: 0.8125rem;
    font-weight: 500;
    outline: none !important;
}

.c-status-filter-tabs .nav-link:hover,
.c-status-filter-tabs .nav-link:focus,
.c-status-filter-tabs .nav-link:focus-visible,
.c-status-filter-tabs .nav-link:active {
    background-color: transparent !important;
    box-shadow: none !important;
    color: var(--tblr-primary, #206bc4);
    border: none !important;
    border-bottom: none !important;
    outline: none !important;
}

.c-status-filter-tabs .nav-link.active {
    background-color: var(--tblr-primary, var(--jc-menu-selected-color, #206bc4)) !important;
    border: none !important;
    border-bottom: none !important;
    color: var(--tblr-primary-fg, #fff) !important;
    font-weight: 600;
    position: relative;
    z-index: 1;
    box-shadow: none !important;
    outline: none !important;
}

.c-status-filter-tabs .nav-link.active:hover,
.c-status-filter-tabs .nav-link.active:focus,
.c-status-filter-tabs .nav-link.active:focus-visible,
.c-status-filter-tabs .nav-link.active:active {
    background-color: var(--tblr-primary, var(--jc-menu-selected-color, #206bc4)) !important;
    box-shadow: none !important;
    transform: none;
    color: var(--tblr-primary-fg, #fff) !important;
    border: none !important;
    border-bottom: none !important;
    outline: none !important;
}

/* view-island：详情页 / 资源管理等页头胶囊切换 */
.view-island-layout {
    --view-island-float-height: 2.75rem;
    background: var(--jc-main-bg-color, #f8fafc);
}

.view-header-shell {
    position: sticky;
    top: 0;
    z-index: 1020;
    flex-shrink: 0;
    background: transparent;
}

.view-island-bar {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    margin-top: -1px;
    z-index: 1;
    background: transparent;
    pointer-events: none;
}

.view-island-bar-inner,
.view-island,
.view-island-track {
    pointer-events: auto;
}

.view-island-bar-inner {
    display: flex;
    justify-content: flex-start;
}

.view-island-track {
    position: relative;
    display: inline-grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    padding: 0.18rem;
    background: var(--jc-main-bg-color, #f8fafc);
    border: 1px solid var(--tblr-border-color, #e9ecef);
    border-top: none;
    border-radius: 14px;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    box-shadow: none;
}

.view-island-thumb {
    position: absolute;
    top: 0.18rem;
    left: 0.18rem;
    width: calc(50% - 0.18rem);
    height: calc(100% - 0.36rem);
    background: var(--tblr-primary, #066fd1);
    border-radius: 999px;
    transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
    pointer-events: none;
}

.view-island-thumb--right {
    transform: translateX(100%);
}

.view-island-btn {
    position: relative;
    z-index: 1;
    border: none;
    background: transparent;
    padding: 0.28rem 0.9rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
    color: var(--tblr-primary, #066fd1);
    white-space: nowrap;
    cursor: pointer;
    border-radius: 999px;
    transition: color 0.28s ease;
}

.view-island-btn:hover:not(.active) {
    color: var(--tblr-primary, #066fd1);
    opacity: 0.82;
}

.view-island-btn.active {
    color: #fff;
    font-weight: 700;
}

.page-body--has-view-island {
    padding-top: var(--view-island-float-height, 2.75rem) !important;
}

/* 带 search-area 的 view-island 列表页：page-body 与其他列表页同为 10px，用 margin 让出胶囊 tab 空间 */
.view-island-layout--list .page-body--has-view-island {
    padding-top: 10px !important;
}

.view-island-layout--list .page-body--has-view-island > .container-xl > :first-child {
    margin-top: calc(var(--view-island-float-height, 2.75rem) - 10px);
}

/* 带 search-area 的 view-island 列表：表格区 flex 撑满，避免 page-body 与表格双滚动 */
.view-island-layout--list > .page-body.page-body--has-view-island {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.view-island-layout--list > .page-body.page-body--has-view-island > .container-xl {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.view-island-layout--list > .page-body.page-body--has-view-island > .container-xl > .row.mt-2 {
    flex: 1 1 auto;
    min-height: 0;
}

.view-island-layout--list > .page-body.page-body--has-view-island > .container-xl > .row.mt-2 > .col-12 {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
}

.view-island-layout--list > .page-body.page-body--has-view-island > .container-xl > .row.mt-2 > .col-12 > .card {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
}

.view-island-track--multi {
    grid-template-columns: repeat(var(--view-island-tab-count, 2), 1fr);
}

.view-island-track--multi .view-island-thumb {
    width: calc((100% - 0.36rem) / var(--view-island-tab-count, 2));
    transform: translateX(calc(var(--view-island-tab-index, 0) * 100%));
}

.view-island-layout .view-header-shell .page-header {
    background-color: var(--jc-main-bg-color, #f8fafc) !important;
    box-shadow: none !important;
    border-bottom: 1px solid var(--tblr-border-color, #e9ecef) !important;
    padding-bottom: 0.15rem;
}

.card > div > .s-table .s-table__content, .card > .card-body > div > .s-table .s-table__content {
    background-color: transparent !important;
}

.card > div > .s-table .s-table__header, .card > .card-body > div > .s-table .s-table__header {
    border-top-left-radius: var(--tblr-card-inner-border-radius, calc(var(--tblr-border-radius-lg, 8px) - 1px));
    border-top-right-radius: var(--tblr-card-inner-border-radius, calc(var(--tblr-border-radius-lg, 8px) - 1px));
}

/* c-status-filter 列表：去掉单元格竖线，保留表格外框 */
.c-table--status-list .s-table--bordered .s-table__content {
    border-right: var(--s-table-border);
}

.c-table--status-list .s-table--bordered .s-table__cell,
.c-table--status-list .s-table--bordered .s-table__empty-container,
.c-table--status-list .s-table--bordered .s-table__cell-group-title,
.c-table--status-list .s-table--bordered .s-table__header-scrollbar,
.c-table--status-list .s-table--bordered .s-table__summary-scrollbar,
.c-table--status-list .s-table--bordered .s-table__summary-fixed {
    border-right: none;
}

.c-table--status-list .s-table--bordered .s-table__cell-group-title {
    border-bottom: none;
}

/* 订单详情 INFO — 转运 / 装柜 / 增值服务 统一布局 */
.order-view-info-card {
    border-radius: 0.5rem;
    box-shadow: var(--tblr-box-shadow-card, 0 0.125rem 0.25rem rgba(0, 0, 0, 0.06));
}

.order-view-info-card .card-header {
    padding: 0.75rem 1.25rem;
}

.order-view-info-card .card-body:not(.p-0) {
    padding: 1rem 1.25rem 1.25rem;
}

.order-view-section-pad {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

.order-view-eyebrow {
    font-size: 0.7rem;
    letter-spacing: 0.04em;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--tblr-secondary, #6c757d);
    line-height: 1.2;
}

.order-view-leg {
    padding: 1rem 1.25rem;
}

.order-view-leg--warehouse {
    background: linear-gradient(180deg, rgba(5, 123, 255, 0.07) 0%, rgba(5, 123, 255, 0.02) 100%);
}

.order-view-leg-head {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.5rem;
}

.order-view-leg-head-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    color: var(--tblr-primary, #206bc4);
    flex-shrink: 0;
}

.order-view-leg-head-icon svg {
    width: 1.15rem;
    height: 1.15rem;
}

.order-view-leg-name {
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.3;
    color: var(--tblr-body-color, #1e293b);
}

.order-view-leg-meta {
    margin-top: 0.25rem;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: var(--tblr-secondary, #6c757d);
    word-break: break-word;
}

.order-view-customer {
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--tblr-border-color, #e9ecef);
    background: rgba(15, 23, 42, 0.025);
}

.order-view-customer-name {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.3;
    color: var(--tblr-body-color, #1e293b);
    word-break: break-word;
}

.order-view-meta-band {
    padding: 0.75rem 1.25rem;
    background: rgba(15, 23, 42, 0.02);
}

.order-view-meta-band + .order-view-meta-band {
    border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.order-view-meta-band--identity {
    background: rgba(var(--tblr-primary-rgb, 32, 107, 196), 0.04);
}

.order-view-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 1.25rem;
    row-gap: 0.75rem;
}

@media (min-width: 768px) {
    .order-view-meta-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1200px) {
    .order-view-meta-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.order-view-meta-tile {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.order-view-meta-label {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--tblr-secondary, #6c757d);
    line-height: 1.15;
}

.order-view-meta-value {
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.35;
    color: var(--tblr-body-color, #1e293b);
    word-break: break-word;
}

.order-view-meta-grid--stats .order-view-meta-value {
    font-size: 1rem;
    font-weight: 600;
}

.order-view-remark {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--tblr-border-color, #e9ecef);
}

.order-view-route-note {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 0.75rem;
    align-items: baseline;
    font-size: 0.875rem;
    line-height: 1.45;
}

.order-view-route-note-label {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--tblr-secondary, #6c757d);
    white-space: nowrap;
}

.order-view-route-note-text {
    color: var(--tblr-body-color, #1e293b);
    word-break: break-word;
}

.order-view-sub-card {
    box-shadow: var(--tblr-box-shadow-card, 0 0.125rem 0.25rem rgba(0, 0, 0, 0.06));
}

.order-view-cargo-name {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.35;
    word-break: break-word;
}

.order-view-prop-tag {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 500;
    line-height: 1.3;
    padding: 0.22rem 0.55rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.05);
    border: 1px solid rgba(15, 23, 42, 0.08);
    color: var(--tblr-body-color, #1e293b);
}

.order-view-prop-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.order-view-side-card {
    border-radius: 0.625rem;
    box-shadow: var(--tblr-box-shadow-card, 0 0.125rem 0.25rem rgba(0, 0, 0, 0.06));
    height: 100%;
    border: 1px solid var(--tblr-border-color, #e9ecef);
}

.order-view-side-card--accent {
    background: linear-gradient(180deg, rgba(var(--tblr-primary-rgb, 32, 107, 196), 0.04) 0%, var(--tblr-bg-surface, #fff) 48%);
}

.order-view-side-body {
    padding: 1rem 1.25rem 1.25rem;
}

.order-view-side-hero {
    font-size: 1.375rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.25;
    word-break: break-word;
    color: var(--tblr-body-color, #1e293b);
}

.order-view-side-subline {
    margin-top: 0.35rem;
    font-size: 0.8125rem;
    color: var(--tblr-secondary, #6c757d);
    line-height: 1.45;
    word-break: break-word;
}

.order-view-side-block {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--tblr-border-color, #e9ecef);
}

.order-view-side-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.8125rem;
    color: var(--tblr-secondary, #6c757d);
}

.order-view-side-meta + .order-view-side-meta {
    margin-top: 0.4rem;
}

.order-view-side-meta strong {
    color: var(--tblr-body-color, #1e293b);
    font-size: 0.875rem;
    font-weight: 600;
}

.order-view-tag {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
    background: rgba(var(--tblr-primary-rgb, 32, 107, 196), 0.08);
    color: var(--tblr-primary, #206bc4);
}

.order-view-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.85rem;
}

.order-view-detail-row {
    align-items: stretch;
}

.order-view-detail-main,
.order-view-detail-side {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 0;
}

@media (min-width: 992px) {
    .order-view-detail-side > .order-view-side-card,
    .order-view-detail-side > .order-view-barcode-panel {
        flex: 1 1 auto;
    }
}

/* 条码侧栏 */
.order-view-barcode-panel {
    height: 100%;
}

.order-view-barcode-intro {
    padding: 0.85rem 0.9rem;
    border-radius: 0.5rem;
    background: linear-gradient(180deg, rgba(5, 123, 255, 0.08) 0%, rgba(5, 123, 255, 0.02) 100%);
    border: 1px solid rgba(5, 123, 255, 0.12);
}

.order-view-barcode-intro-badge {
    display: inline-block;
    margin-bottom: 0.45rem;
    padding: 0.18rem 0.5rem;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: var(--tblr-primary, #206bc4);
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(5, 123, 255, 0.15);
}

.order-view-barcode-intro-title {
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--tblr-body-color, #1e293b);
}

.order-view-barcode-intro-desc {
    margin: 0.4rem 0 0;
    font-size: 0.8125rem;
    line-height: 1.55;
    color: var(--tblr-secondary, #6c757d);
}

.order-view-barcode-section {
    margin-top: 0.85rem;
}

.order-view-barcode-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.45rem;
    padding: 0 0.05rem;
}

.order-view-barcode-count {
    flex-shrink: 0;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: rgba(var(--tblr-primary-rgb, 32, 107, 196), 0.08);
    color: var(--tblr-primary, #206bc4);
}

.order-view-barcode-list {
    border: 1px solid var(--tblr-border-color, #e9ecef);
    border-radius: 0.5rem;
    overflow: hidden;
    background: var(--tblr-bg-surface, #fff);
    max-height: min(28rem, calc(100vh - 18rem));
    overflow-y: auto;
}

.order-view-barcode-item {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.62rem 0.85rem;
    border-top: 1px solid rgba(15, 23, 42, 0.06);
    transition: background-color 0.15s ease;
}

.order-view-barcode-item:first-child {
    border-top: 0;
}

.order-view-barcode-item:hover {
    background: rgba(var(--tblr-primary-rgb, 32, 107, 196), 0.025);
}

.order-view-barcode-index {
    flex-shrink: 0;
    width: 1.1rem;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--tblr-secondary, #6c757d);
    text-align: right;
    line-height: 1.45;
}

.order-view-barcode-text {
    flex: 1 1 auto;
    min-width: 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.8125rem;
    line-height: 1.45;
    word-break: break-all;
    color: var(--tblr-body-color, #1e293b);
}

.order-view-barcode-empty {
    margin-top: 0.85rem;
    padding: 1.25rem 0.9rem;
    text-align: center;
    border: 1px dashed rgba(15, 23, 42, 0.12);
    border-radius: 0.5rem;
    background: rgba(15, 23, 42, 0.02);
}

.order-view-barcode-empty-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--tblr-body-color, #1e293b);
}

.order-view-barcode-empty-desc {
    margin-top: 0.35rem;
    font-size: 0.8125rem;
    line-height: 1.55;
    color: var(--tblr-secondary, #6c757d);
}

/* 手机/平板端适配：侧边栏改为抽屉式，不占左侧空间 */
@media (max-width: 991.98px) {
    #app-sidebar {
        position: fixed !important;
        left: 0;
        top: 0;
        width: 220px !important;
        height: 100vh !important;
        z-index: 1050;
        transform: translateX(-100%);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        box-shadow: none;
        display: flex !important;
        flex-direction: column;
    }
    #app-sidebar.sidebar-open {
        transform: translateX(0);
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
    }
    #app-sidebar.sidebar-open .navbar-collapse {
        display: flex !important;
    }
    #app-sidebar .container-fluid {
        flex: 1;
        min-height: 0;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden;
    }
    #app-sidebar .navbar-collapse {
        flex: 1;
        min-height: 0;
        overflow: hidden;
    }
    #app-sidebar .navbar-collapse > c-left-menu {
        flex: 1;
        min-height: 0;
        overflow: hidden;
    }
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 1049;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }
    .sidebar-overlay.show {
        opacity: 1;
        pointer-events: auto;
    }
    .page-wrapper {
        width: 100% !important;
        margin-left: 0 !important;
    }
    .mobile-menu-btn:hover {
        background-color: rgba(255, 255, 255, 0.15) !important;
    }
    .sidebar-close-btn:hover {
        background-color: rgba(255, 255, 255, 0.15) !important;
    }
}

