html, body { height: 100%; }
body {
    margin: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: "Microsoft YaHei UI", "Segoe UI", sans-serif;
    background: #f3f3f3;
    color: #1f1f1f;
}

a { color: #0078d4; text-decoration: none; }

.topbar {
    position: relative;
    height: 48px;
    background: #dff6dd;
    border-bottom: 1px solid #e1e1e1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}
/* 正在向套餐添加项目时，顶栏正中高亮提示。 */
.package-add-banner {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    max-width: calc(100% - 520px);
    padding: 4px 14px;
    border: 1px solid #d4a000;
    border-radius: 2px;
    background: #fff4ce;
    color: #8a5a00;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
}

.brand { font-weight: 600; }

.account-bar {
    display: flex;
    align-items: center;
    gap: 12px;
}

.account-bar form { margin: 0; }
.account-bar button, .account-bar a.button { margin-top: 0; }
.account-info .info-mark {
    /* 彩色图标用 emoji 字体，避免图标字体里没有对应字形 */
    font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
    font-size: 15px;
    line-height: 1;
}
a.account-info:hover,
a.account-help:hover {
    background: #dff6dd;
    color: #1f1f1f;
    border-color: #8a8a8a;
}
button.account-logout:hover {
    background: #d13438;
    border-color: #a4262c;
    color: #fff;
}
.my-password {
    margin-top: 28px;
    padding-top: 8px;
    border-top: 1px solid #e1e1e1;
}
.my-password h3 { margin: 12px 0 0; font-size: 16px; font-weight: 600; }

label.remember {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
}

label.remember input { width: auto; height: auto; margin: 0; }

.shell { display: flex; flex: 1; min-height: 0; overflow: hidden; gap: 4px; }

/* 左侧栏：圆角面板，贴紧顶栏与右侧页面，用阴影代替右边框 */
.menu {
    width: 180px;
    background: #fff;
    border-radius: 10px;
    padding: 12px 0 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
    /* 菜单项可滚动，账号区固定在底部 */
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
}

/* ===== 左侧栏底部账号区 ===== */
.menu-account {
    position: sticky;
    bottom: 0;
    margin-top: auto;
    padding: 10px 12px 12px;
    border-top: 1px solid #ededed;
    background: #fff;
}
.menu-account-user {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 0;
}
.menu-avatar {
    flex: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0078d4, #107c10);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 26px;
    text-align: center;
}
.menu-account-name {
    font-size: 13px;
    font-weight: 600;
    color: #1f1f1f;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.menu-account-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    margin-top: 8px;
}
.menu-account-actions form { margin: 0; }
.menu-account-link {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: 100%;
    height: auto;
    margin: 0;
    padding: 6px 2px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #5c5c5c;
    font-family: inherit;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}
.menu-account-link:hover {
    background: #f3f3f3;
    color: #0078d4;
    box-shadow: none;
}
.menu-account-link.logout:hover { color: #d13438; }
.menu-account-icon {
    /* 彩色图标用 emoji 字体 */
    font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
    font-size: 15px;
    line-height: 1;
}
.menu-account-link.nav-locked,
.menu-account-link.nav-locked:hover {
    color: #8a8a8a;
    background: transparent;
    cursor: not-allowed;
}

/* 只让一级菜单块状排列，数量 span 保持同行内联（与购物车一致） */
.menu > a, .menu > span {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    color: #1f1f1f;
    white-space: nowrap;
}
/* 菜单前面的彩色图标：固定宽度，让文字左缘对齐 */
.menu-icon {
    flex: none;
    width: 20px;
    margin-right: 8px;
    font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
    font-size: 15px;
    line-height: 1;
    text-align: center;
}
.menu a .count-green,
.menu a .count-red {
    display: inline;
    padding: 0;
    margin: 0;
    font-weight: 700;
}
.log-tabs { display: flex; align-items: center; gap: 16px; margin: 8px 0 0; }
.log-purge { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 0 auto; }
.log-purge select { height: 32px; border: 1px solid #8a8a8a; background: #fff; padding: 0 8px; }
.log-purge button { margin: 0; }
table.log-list { font-size: 13px; }
table.log-list th, table.log-list td { padding: 4px 8px; }
table.log-list th:first-child, table.log-list td:first-child { white-space: nowrap; }
.log-tabs a { color: #1f1f1f; text-decoration: none; }
.log-tabs a.active { color: #0078d4; font-weight: 700; }
/* 日常报价 / 资质维护：查询栏固定，列表框内下拉。 */
.standard-page-head {
    position: sticky;
    top: 0;
    z-index: 2;
    padding-bottom: 4px;
    background: #fff;
}
/* 标题统一由下方「页面标题」规则定义字体，这里只保留间距。 */
.standard-page-head > h2 {
    margin: 0 0 4px;
}
.standard-listbox {
    height: 620px;
    margin-top: 8px;
    overflow: auto;
    border: 1px solid #8a8a8a;
    background: #fff;
}
/* 资质维护标准列表（不含日常报价 quote-hover-list） */
.standard-page .standard-listbox:not(.quote-hover-list) {
    height: 530px;
}
/* 行内按钮去掉默认上边距，行高与日常报价标准列表一致。 */
.standard-page .standard-listbox:not(.quote-hover-list) td {
    vertical-align: middle;
}
.standard-page .standard-listbox:not(.quote-hover-list) .row-action {
    height: 22px;
    margin: 0 6px 0 0;
    padding: 0 8px;
    font-size: 12px;
}
.standard-listbox table {
    width: 100%;
    margin: 0;
}
.standard-listbox table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f3f3f3;
}
/* 标准列表（日常报价 / 资质维护）：表头字号减 2px、数据行字号减 3px */
.standard-listbox table thead th {
    font-size: 14px;
}
.standard-listbox table tbody td {
    font-size: 13px;
}
/* 日志：页签与查询栏固定，列表框内下拉。 */
.log-page-head {
    position: sticky;
    top: 0;
    z-index: 2;
    padding-bottom: 4px;
    background: #fff;
}
.log-page .toolbar { margin-bottom: 8px; }
.log-listbox {
    height: 520px;
    margin-top: 8px;
    overflow: auto;
    border: 1px solid #8a8a8a;
    background: #fff;
}
.log-listbox table.log-list {
    width: 100%;
}
.log-listbox table.log-list thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f3f3f3;
}

.menu a:hover { background: #f3f3f3; }

/* 菜单项右上角红色数字徽标：购物车、套餐未分配列表有内容时显示。
   徽标定位在文字末端的右上角，因此文字外包一层 .menu-text。 */
.menu-text {
    position: relative;
    display: inline-block;
}
.menu-badge {
    position: absolute;
    /* 在文字行内整体上移（累计 6px：先 3px 再 3px） */
    top: -6px;
    left: 100%;
    margin-left: 2px;
    z-index: 1;
    box-sizing: border-box;
    display: block;
    min-width: 15.4px;
    height: 15.4px;
    padding: 0 4.4px;
    border-radius: 7.7px;
    background: #d13438;
    color: #fff;
    /* 徽标与数字都在上一版基础上放大 10%：7.8px × 1.1 */
    font-size: 8.58px;
    font-weight: 700;
    line-height: 15.4px;
    text-align: center;
    white-space: nowrap;
    pointer-events: none;
}
/* 套餐添加项目期间，不允许进入的菜单显示禁止光标。 */
.menu > a.nav-locked,
a.account-info.nav-locked,
a.account-help.nav-locked {
    color: #8a8a8a;
    cursor: not-allowed;
}
.menu > a.nav-locked:hover,
a.account-info.nav-locked:hover,
a.account-help.nav-locked:hover {
    background: transparent;
    color: #8a8a8a;
    border-color: #8a8a8a;
    cursor: not-allowed;
}
.menu a.active {
    /* 选中底色与悬停底色一致 */
    background: #f3f3f3;
    color: #004578;
    /* 选中文字加粗 */
    font-weight: 700;
    box-shadow: inset 3px 0 0 #0078d4;
}
.menu a.active:hover { background: #f3f3f3; }
.menu .muted { color: #8a8a8a; }
/* 微信待审核：顶栏黄条文字红字居中 + 登录弹窗 */
.wechat-pending-alert {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 40px;
    padding: 8px 20px;
    background: #ffe600;
    border-bottom: 2px solid #d4a000;
    color: #d13438;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
}
.wechat-pending-alert[hidden] { display: none; }
.wechat-pending-alert #wechat-pending-alert-text {
    color: #d13438;
    font-weight: 700;
    line-height: 1.4;
}
.wechat-pending-alert .wechat-pending-go,
.wechat-pending-alert .wechat-pending-later {
    margin: 0;
    height: 28px;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 600;
}
.wechat-pending-alert .wechat-pending-go {
    background: #d13438;
    border-color: #d13438;
}
.wechat-pending-alert .wechat-pending-later {
    background: #fff;
    color: #1f1f1f;
    border-color: #8a8a8a;
}
.wechat-pending-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
}
.wechat-pending-modal[hidden] { display: none; }
.wechat-pending-dialog {
    width: min(420px, calc(100vw - 32px));
    background: #fff;
    border: 2px solid #d4a000;
    border-radius: 4px;
    padding: 20px 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}
.wechat-pending-dialog h3 {
    margin: 0 0 12px;
    color: #1f1f1f;
}
.wechat-pending-dialog p {
    margin: 0 0 18px;
    font-size: 15px;
    line-height: 1.5;
}
.wechat-pending-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}
.wechat-pending-actions button { margin: 0; }
.standard-notice-dialog {
    width: 720px;
    max-width: calc(100vw - 48px);
    background: #fff;
    border: 1px solid #8a8a8a;
    padding: 20px 24px;
}
.standard-notice-dialog h3 { margin: 0 0 8px; font-size: 18px; }
.standard-notice-dialog p { margin: 0 0 12px; color: #5c5c5c; }
.standard-notice-list {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
    max-height: 360px;
    overflow: auto;
    border: 1px solid #e1e1e1;
}
.standard-notice-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-bottom: 1px solid #e1e1e1;
}
.standard-notice-list li:last-child { border-bottom: none; }
.standard-notice-list form { margin: 0; }
.standard-notice-list button { height: 28px; margin: 0; padding: 0 10px; }
.standard-notice-kind {
    flex: none;
    width: 40px;
    color: #0078d4;
    font-weight: 700;
}
.standard-notice-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.standard-notice-time { flex: none; color: #5c5c5c; font-size: 12px; }
.standard-notice-dialog .wechat-pending-actions form { margin: 0; }
.standard-notice-dialog .wechat-pending-actions button { margin: 0; }

.content {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* 去掉四周留白，页面面板贴紧顶栏和左侧栏 */
    padding: 0;
}

/* 页面卡片：圆角 + 阴影，不再用描边 */
.card {
    background: #fff;
    border-radius: 10px;
    padding: 8px 16px 16px;
    max-width: 880px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
}
/* ===== 页面标题统一：沿用标准列表标题的字体（微软雅黑 20px/600） ===== */
.content .card > h2:not(.hello),
.standard-page-head > h2,
.content .card .page-head h2,
.content .card .edit-head h2,
.content .card .cart-head h2,
.content .card .user-page-head .page-head h2,
.dialog-card h2,
.login-card h2 {
    margin: 0 0 4px;
    font-family: "Microsoft YaHei UI", "Segoe UI", sans-serif;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
}
.content .card .page-head,
.content .card .edit-head,
.content .card .user-page-head,
.content .card .cart-head:first-child {
    margin-top: 0;
}

/* ===== 登录页：渐变背景 + 光斑动画 + 卡片入场 ===== */
.login-page {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #eef6fd 0%, #e6f4ea 45%, #f3eefc 100%);
    background-size: 200% 200%;
    animation: login-bg-shift 18s ease-in-out infinite;
}
@keyframes login-bg-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}
/* 背景光斑：缓慢漂浮 */
.login-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(48px);
    opacity: .55;
    pointer-events: none;
}
.login-blob-a {
    width: 320px; height: 320px;
    left: -80px; top: -60px;
    background: #b8dcff;
    animation: login-float-a 14s ease-in-out infinite;
}
.login-blob-b {
    width: 260px; height: 260px;
    right: -60px; top: 12%;
    background: #c7efc4;
    animation: login-float-b 17s ease-in-out infinite;
}
.login-blob-c {
    width: 300px; height: 300px;
    right: 8%; bottom: -100px;
    background: #d9ccf5;
    animation: login-float-a 20s ease-in-out infinite reverse;
}
@keyframes login-float-a {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(40px, 30px) scale(1.08); }
}
@keyframes login-float-b {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-30px, 40px) scale(1.06); }
}

.login-wrap {
    position: relative;
    z-index: 1;
    min-height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 32px 16px;
}

.login-card {
    width: 380px;
    max-width: calc(100vw - 32px);
    background: rgba(255, 255, 255, .92);
    border: none;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 18px 50px rgba(0, 60, 120, .16), 0 2px 8px rgba(0, 0, 0, .06);
    backdrop-filter: blur(8px);
    animation: login-card-in .55s cubic-bezier(.22, .61, .36, 1) both;
}
@keyframes login-card-in {
    from { opacity: 0; transform: translateY(18px) scale(.98); }
    to { opacity: 1; transform: none; }
}

/* 卡片顶部品牌区 */
.login-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 22px;
    text-align: center;
}
.login-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px; height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, #0078d4, #107c10);
    color: #fff;
    font-family: "Segoe UI", "Microsoft YaHei UI", sans-serif;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: .04em;
    box-shadow: 0 8px 20px rgba(0, 120, 212, .35);
    animation: login-logo-in .7s cubic-bezier(.22, .61, .36, 1) .1s both;
}
@keyframes login-logo-in {
    from { opacity: 0; transform: scale(.6) rotate(-12deg); }
    to { opacity: 1; transform: none; }
}
.login-brand h2 {
    margin: 0;
    font-family: "Microsoft YaHei UI", "Segoe UI", sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: #1f1f1f;
}
.login-sub {
    margin: 0;
    font-size: 12px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #8a8a8a;
}

/* 字段逐条错峰淡入 */
.login-card form > * {
    animation: login-field-in .45s ease both;
}
.login-card form > *:nth-child(1) { animation-delay: .10s; }
.login-card form > *:nth-child(2) { animation-delay: .16s; }
.login-card form > *:nth-child(3) { animation-delay: .22s; }
.login-card form > *:nth-child(4) { animation-delay: .28s; }
.login-card form > *:nth-child(5) { animation-delay: .34s; }
.login-card form > *:nth-child(n+6) { animation-delay: .40s; }
@keyframes login-field-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}
.login-card label { margin-top: 12px; color: #5c5c5c; font-size: 13px; }
.login-card input[type=text],
.login-card input[type=password] {
    height: 38px;
    border-color: #d0d0d0;
    padding: 0 12px;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.login-card input[type=text]:focus,
.login-card input[type=password]:focus {
    border-color: #0078d4;
    box-shadow: 0 0 0 4px rgba(0, 120, 212, .14);
}
.login-card input.pwd-swept {
    background: #fff4e5;
}
.login-card button[type=submit] {
    width: 100%;
    height: 38px;
    margin-top: 22px;
    border-radius: 8px;
    font-weight: 600;
    letter-spacing: .06em;
    /* 按钮上一道缓慢扫过的高光 */
    position: relative;
    overflow: hidden;
}
.login-card button[type=submit]::after {
    content: "";
    position: absolute;
    top: 0; left: -60%;
    width: 40%; height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .45), transparent);
    transform: skewX(-18deg);
    animation: login-btn-shine 3.4s ease-in-out infinite;
}
@keyframes login-btn-shine {
    0%, 55% { left: -60%; }
    100% { left: 130%; }
}
.login-foot {
    position: relative;
    z-index: 1;
    margin: 0 0 18px;
    font-size: 12px;
    color: #8a8a8a;
    letter-spacing: .08em;
}

/* 登录框保持居中。橘猫贴在框左侧，脚底与登录框下沿对齐，不占位。 */
.login-cat {
    position: absolute;
    z-index: 4;
    width: 196px;
    height: 252px;
    right: calc(50% + 214px);
    bottom: 10px;
    cursor: pointer;
    user-select: none;
    /* 绕脚底跟着视线偏。位置由脚本逐帧写入，不用过渡，避免和缓动打架。 */
    transform-origin: 50% 96%;
}
.cat-photo {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center bottom;
    pointer-events: none;
}
.cat-head {
    transition: none;
}
.cat-photo[hidden] { display: none !important; }
.login-cat.is-angry .cat-photo { animation: cat-shake .4s linear; }
.login-cat.is-yes .cat-photo { animation: cat-yes-pop .45s ease; }
@keyframes cat-shake {
    0%, 100% { transform: rotate(0); }
    30% { transform: rotate(-5deg); }
    70% { transform: rotate(5deg); }
}
@keyframes cat-yes-pop {
    0% { transform: translateY(8px) scale(.96); }
    60% { transform: translateY(-6px) scale(1.03); }
    100% { transform: none; }
}
.cat-yes {
    display: none;
    position: absolute;
    right: -8px;
    top: 4px;
    z-index: 3;
    padding: 2px 8px;
    white-space: nowrap;
    border-radius: 10px;
    background: #fff;
    color: #c45c12;
    font-family: "Segoe UI", "Microsoft YaHei UI", sans-serif;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: .04em;
    box-shadow: 0 4px 12px rgba(180, 80, 10, .2);
}
.login-cat.is-yes .cat-yes { display: block; animation: cat-yes-pop .45s ease; }
@media (max-width: 980px) {
    .login-cat { width: 140px; height: 182px; right: calc(50% + 204px); bottom: 25px; }
}

/* 系统开启减少动效时，关闭登录页动画 */
@media (prefers-reduced-motion: reduce) {
    .login-page,
    .login-blob,
    .login-card,
    .login-logo,
    .login-card form > *,
    .login-card button[type=submit]::after,
    .login-cat.is-angry .cat-photo,
    .login-cat.is-yes .cat-photo,
    .login-cat.is-yes .cat-yes {
        animation: none !important;
    }
    .login-cat,
    .cat-head {
        transition: none !important;
    }
}

.login-or { margin: 22px 0 8px; text-align: center; color: #5c5c5c; }
.login-qr { display: block; width: 180px; height: 180px; margin: 8px auto; }
.login-qr[hidden], #login-qr-refresh[hidden] { display: none !important; }
.login-qr-status { margin: 8px 0 0; text-align: center; color: #5c5c5c; }
#login-qr-refresh { display: block; margin: 12px auto 0; }

label { display: block; margin: 14px 0 6px; }

input[type=text], input[type=password] {
    width: 100%;
    box-sizing: border-box;
    height: 32px;
    border: 1px solid #8a8a8a;
    padding: 0 8px;
}

button, a.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    height: 32px;
    margin-top: 18px;
    padding: 0 16px;
    border: 1px solid #0078d4;
    background: #0078d4;
    color: #fff;
    font-family: "Microsoft YaHei UI", "Segoe UI", sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    /* 所有按钮统一圆角，并给悬停变化加过渡 */
    border-radius: 6px;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}

/* display:inline-flex 会盖掉原生 hidden，需显式隐藏 */
button[hidden], a.button[hidden] {
    display: none !important;
}

/* 所有按钮的悬停变化：主色加深 + 轻微浮起阴影 */
button:hover, a.button:hover {
    background: #106ebe;
    border-color: #0b5cad;
    box-shadow: 0 3px 8px rgba(0, 120, 212, .28);
}
button:focus-visible, a.button:focus-visible {
    outline: 2px solid #0078d4;
    outline-offset: 1px;
}
/* 次要按钮悬停：淡蓝底 + 主色描边 */
button.secondary:hover, a.button.secondary:hover {
    background: #eef6fd;
    border-color: #0078d4;
    color: #004578;
    box-shadow: 0 3px 8px rgba(0, 0, 0, .12);
}
button.plain:hover, a.button.plain:hover {
    background: #f3f3f3;
    border-color: #8a8a8a;
    color: #1f1f1f;
    box-shadow: 0 3px 8px rgba(0, 0, 0, .12);
}

button.secondary, a.button.secondary {
    background: #fff;
    color: #1f1f1f;
    border-color: #8a8a8a;
}

button.plain, a.button.plain {
    background: transparent;
    color: #1f1f1f;
    border-color: #8a8a8a;
}

button.cart-add {
    background: transparent;
    color: #1f1f1f;
    border-color: #8a8a8a;
}

button.cart-add:hover {
    background: #dff6dd;
    border-color: #107c10;
    color: #0b5a0b;
}

/* 查看购物车：浅绿底 */
a.button.cart-view,
a.cart-view {
    background: #dff6dd;
    color: #0b5a0b;
    border-color: #107c10;
}
a.button.cart-view:hover,
a.cart-view:hover {
    background: #c6efc4;
    color: #0b5a0b;
    border-color: #107c10;
}

button.package-add {
    background: transparent;
    color: #1f1f1f;
    border-color: #8a8a8a;
}

button.package-add:hover {
    background: #fde7e9;
    border-color: #d13438;
    color: #a4262c;
}
/* 套餐管理：退出添加期间高亮闪动，提醒结束添加。 */
@keyframes package-exit-blink {
    0%, 100% { background: #fff4ce; border-color: #d4a000; color: #8a5a00; }
    50% { background: #ffb900; border-color: #8a5a00; color: #1f1f1f; }
}
button.package-exit-add {
    font-weight: 700;
    animation: package-exit-blink 1s ease-in-out infinite;
}

form.toolbar-cart[hidden] {
    display: none !important;
}

.message { color: #a4262c; margin-top: 12px; }

table { width: 100%; border-collapse: collapse; }
.page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.page-head h2 { margin: 0; }
.hello {
    margin: 20px 0 8px;
    font-size: 44px;
    font-weight: 600;
    font-style: italic;
    letter-spacing: 0.04em;
    animation: hello-in 3.4s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
.hello-name { font-weight: 700; color: #107c10; }
.hello-en { display: block; margin-top: 12px; font-size: 40px; }
.hello-bas {
    font-weight: 700;
    background-image: linear-gradient(90deg, #0078d4, #107c10, #ffb900, #d13438, #5c2d91, #0078d4);
    background-size: 220% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    animation: bas-shift 6s linear infinite;
}
@keyframes hello-in {
    0% {
        opacity: 0;
        transform: translateY(28px) scale(0.94);
        letter-spacing: 0.32em;
    }
    100% {
        opacity: 1;
        transform: none;
        letter-spacing: 0.04em;
    }
}
@keyframes bas-shift {
    from { background-position: 0% 50%; }
    to { background-position: 100% 50%; }
}
.page-head .actions { display: flex; align-items: flex-start; gap: 8px; flex-wrap: wrap; }
.page-head .actions button { margin-top: 0; }
.backup-pair { display: inline-flex; flex-direction: column; gap: 6px; }
.backup-pair button { margin: 0; width: 100%; }
.backup-purge { display: inline-flex; flex-direction: column; align-items: stretch; gap: 6px; margin: 0; }
.backup-purge select { height: 32px; border: 1px solid #8a8a8a; background: #fff; padding: 0 8px; }
.backup-purge button { margin: 0; }
.file-backup-lead { margin: 0 0 8px; }
.file-backup-last { margin: 0 0 4px; word-break: break-all; }
.file-backup-form { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.file-backup-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 6px 8px;
    border: 1px solid #d0d0d0;
    background: #fafafa;
}
.file-backup-item input { flex: none; }
.file-backup-item span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.file-backup-item .hint {
    color: #666;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.file-backup-actions { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.file-backup-actions button { margin: 0; }
.dialog-body.file-backup-dialog { overflow: auto; }
.dialog-body.file-backup-dialog .dialog-card { margin: 12px; padding: 14px 16px; }
.user-page-title {
    align-items: flex-end;
    margin-bottom: 0;
}
.user-page-title-left {
    min-width: 0;
    flex: 1 1 auto;
}
.user-counts {
    margin: 6px 0 0;
    color: #3d3d3d;
    font-size: 14px;
}
.user-counts strong { font-weight: 700; }
.user-page .user-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    padding-top: 8px;
}
.user-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
}
.user-search { display: flex; align-items: center; gap: 8px; margin: 0; }
.user-search input[type=text] { width: 220px; }
.user-search .only-active {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    margin: 0;
    white-space: nowrap;
}
.user-search .only-active input { width: 16px; height: 16px; margin: 0; }
select.dept-select {
    height: 32px;
    min-width: 220px;
    border: 1px solid #8a8a8a;
    background: #fff;
    padding: 0 8px;
}
.dept-add, .dept-row, .dept-actions { display: flex; align-items: center; gap: 8px; }
.dept-add { margin-top: 12px; }
.dept-add input[type=text] { width: 240px; }
.dept-row input[type=text] { width: 180px; }
.dept-add button, .dept-row button, .dept-actions button { margin-top: 0; }
.wechat-approve { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; margin: 0; }
.wechat-approve select, .wechat-approve button { margin-top: 0; }
.wechat-approve label { display: inline-flex; align-items: center; gap: 4px; margin: 0; white-space: nowrap; }
table.wechat-list { width: max-content; min-width: 100%; }
table.wechat-list th, table.wechat-list td { white-space: nowrap; vertical-align: middle; }
td.wechat-openid { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
button.wechat-review:hover { background: #dff6dd; color: #1f1f1f; border-color: #8a8a8a; }
.user-search button, .user-search a.button { margin-top: 0; }
.user-toolbar label { display: inline; margin: 0; }
.user-toolbar button, .user-toolbar a.button { margin-top: 0; }
.user-toolbar select {
    height: 32px;
    border: 1px solid #8a8a8a;
    background: #fff;
    padding: 0 8px;
}
.user-page-head {
    position: sticky;
    top: 0;
    z-index: 2;
    padding-bottom: 4px;
    background: #fff;
}
.user-listbox {
    height: 565px;
    margin-top: 12px;
    overflow: auto;
    border: 1px solid #8a8a8a;
    background: #fff;
}
.user-listbox table { margin: 0; width: 100%; }
.user-listbox table.user-list thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f3f3f3;
}
table.user-list { font-size: 13px; }
table.user-list th, table.user-list td { padding: 4px 8px; }
table.user-list tbody tr:hover td { background: #dff6dd; }
table.user-list button, table.user-list a.button { height: 26px; padding: 0 10px; }
body.dialog-body {
    display: block;
    height: auto;
    min-height: 100%;
    overflow: auto;
    margin: 0;
    background: #f3f3f3;
}
.dialog-card {
    background: #fff;
    border: 1px solid #e1e1e1;
    margin: 16px;
    padding: 20px;
}
.dialog-card h3 { margin: 16px 0 0; font-size: 16px; }
.dialog-card textarea {
    width: 100%;
    box-sizing: border-box;
    min-height: 64px;
    margin: 0;
    padding: 6px 8px;
    border: 1px solid #8a8a8a;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.4;
    resize: vertical;
}
.dialog-card select {
    height: 32px;
    min-width: 180px;
    border: 1px solid #8a8a8a;
    background: #fff;
    padding: 0 8px;
}

th, td { text-align: left; padding: 8px; border-bottom: 1px solid #e1e1e1; }

/* 资质维护多了操作列，标题不换行，避免表头被挤成两行。 */
.table-wrap table:not(.grid) th { white-space: nowrap; }
/* 只查询项目时，备注列收窄并允许多行。 */
td.remark-cell { vertical-align: top; }
td.remark-cell span {
    display: block;
    width: 160px;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.4;
}

.checks label { display: inline-block; margin-right: 16px; }
.dialog-card .checks label { white-space: nowrap; }
.role-box { margin-top: 16px; padding-top: 8px; border-top: 1px solid #e1e1e1; }
.role-box select { height: 32px; border: 1px solid #8a8a8a; background: #fff; padding: 0 8px; }

.card.wide {
    max-width: none;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
/* 标题和查询栏保持原高，列表框吃掉剩余高度，底边由内容区留白约 16px。 */
.card.wide > .standard-listbox,
.card.wide > .log-listbox,
.card.wide > .user-listbox,
.card.wide > .quote-listbox,
.card.wide > .package-listbox,
.card.wide > .ticket-columns,
.card.wide > .package-list,
.card.wide > #project-pick-form,
.card.wide > .edit-form {
    flex: 1 1 auto;
    min-height: 0;
}
.card.wide .standard-listbox,
.card.wide .log-listbox,
.card.wide .user-listbox,
.card.wide .quote-listbox,
.card.wide .package-listbox,
.card.wide .ticket-listbox {
    height: auto;
    min-height: 0;
}
#project-pick-form,
.edit-form {
    display: flex;
    flex-direction: column;
    min-height: 0;
}
#project-pick-form > .standard-listbox,
.edit-form > .standard-listbox {
    flex: 1 1 auto;
    min-height: 0;
}

.ok { color: #107c10; margin-top: 12px; }
.count-green { font-weight: 700; color: #107c10; }
.count-red { font-weight: 700; color: #d13438; }

.toolbar { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; margin: 16px 0; }
.toolbar,
.user-toolbar,
.package-search-row {
    padding-top: 16px;
    border-top: 3px solid #0078d4;
}
.toolbar-fields { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; margin: 0; }
.keyword-box { position: relative; width: 320px; }
.toolbar .keyword-box input[type=text] { width: 100%; }
.toolbar .only-projects {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    margin: 0;
    white-space: nowrap;
}
.toolbar .only-projects input { width: 16px; height: 16px; margin: 0; }
.quote-toolbar {
    flex-direction: row;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0 4px;
    padding-top: 10px;
}
.quote-toolbar .toolbar-fields {
    flex-direction: row;
    align-items: flex-end;
    flex: 0 1 auto;
}
.quote-toolbar .filter-row {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    flex-wrap: wrap;
}
.quote-toolbar .toolbar-cart:not([hidden]) {
    display: flex;
    align-items: center;
    gap: 8px;
}
.standard-page .quote-toolbar + p,
.standard-page-head + .standard-listbox,
.standard-page .standard-listbox {
    margin-top: 4px;
}
.toolbar-cart { margin: 0; }
.toolbar-cart button { margin: 0; }
.toolbar input[type=text] { width: 320px; }
.toolbar input[type=date] { height: 32px; box-sizing: border-box; border: 1px solid #8a8a8a; padding: 0 8px; }
.pager { display: flex; gap: 8px; margin-top: 12px; }
.toolbar .field { display: flex; flex-direction: column; gap: 4px; }
.toolbar .field span { font-size: 12px; line-height: 16px; color: #5c5c5c; }
.toolbar select {
    height: 32px;
    min-width: 120px;
    border: 1px solid #8a8a8a;
    background: #fff;
    padding: 0 8px;
}
.maintain-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 8px 0 4px;
}
.maintain-actions > a.button,
.maintain-actions button {
    margin: 0;
    height: 32px;
}
form.import-batch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    height: 32px;
}
form.import-batch input[type=file] {
    max-width: 220px;
    height: 32px;
    margin: 0;
}
form.import-batch button { margin: 0; }

.toolbar button,
.toolbar a.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    height: 32px;
    line-height: 1;
    margin: 0;
    padding: 0 16px;
    white-space: nowrap;
}

tr.link-row { cursor: pointer; }
/* 日常报价、资质维护的标准列表和项目列表：悬停、选中与左侧菜单一致。
   悬停浅灰；选中同底色，文字变蓝加粗，左侧一条蓝边。选中后再悬停不变色。 */
.standard-page .standard-listbox tr.link-row:hover td,
#project-detail-listbox tbody tr:hover td {
    background: #f3f3f3;
}
.standard-page .standard-listbox tr.link-row.current td,
.standard-page .standard-listbox tr.link-row.current:hover td,
.standard-page .standard-listbox tr.link-row:has(input[type="checkbox"]:checked) td,
.standard-page .standard-listbox tr.link-row:has(input[type="checkbox"]:checked):hover td,
#project-detail-listbox tbody tr:has(input[type="checkbox"]:checked) td,
#project-detail-listbox tbody tr:has(input[type="checkbox"]:checked):hover td {
    background: #f3f3f3;
    color: #004578;
    font-weight: 700;
}
.standard-page .standard-listbox tr.link-row.current td:first-child,
.standard-page .standard-listbox tr.link-row:has(input[type="checkbox"]:checked) td:first-child,
#project-detail-listbox tbody tr:has(input[type="checkbox"]:checked) td:first-child {
    box-shadow: inset 3px 0 0 #0078d4;
}
.standard-page .standard-listbox tr.link-row.current a:not(.button),
.standard-page .standard-listbox tr.link-row:has(input[type="checkbox"]:checked) a:not(.button),
#project-detail-listbox tbody tr:has(input[type="checkbox"]:checked) a {
    color: #004578;
    font-weight: 700;
}
/* 日常报价、资质维护的项目列表：短列单行，名称、备注、附件可换行，内容垂直居中。 */
#project-detail-listbox {
    font-size: 13px;
}
#project-detail-listbox table.grid {
    width: 100%;
    border: 1px solid #e1e1e1;
}
/* 日常报价、资质维护的项目表加细边框（覆盖全局无边框） */
#project-detail-listbox table.grid th,
#project-detail-listbox table.grid td {
    white-space: nowrap;
    vertical-align: middle;
    border: 1px solid #e6e6e6;
}
#project-detail-listbox .file-name {
    display: inline;
    max-width: none;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
}
/* 日常报价和资质维护的项目表：短列按内容一行，其余列由脚本按剩余宽度分配。 */
#project-detail-listbox .q-fit {
    white-space: nowrap;
}
#project-detail-listbox table.grid td.q-flex {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    overflow: hidden;
}
#project-detail-listbox table.grid th.q-fit,
#project-detail-listbox table.grid td.q-fit,
#project-detail-listbox table.grid th.q-flex,
#project-detail-listbox table.grid th.q-file {
    overflow: hidden;
}
#project-detail-listbox th.q-flex,
#project-detail-listbox th.q-file {
    white-space: nowrap;
}
#project-detail-listbox td.q-file {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#project-detail-listbox td.q-file .file-name {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.quote-project-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 8px 0 6px;
    min-height: 32px;
}
.quote-project-actions form,
.quote-project-actions button,
.quote-project-actions a.button,
.quote-project-actions .back-link {
    margin: 0;
}

h2.std-title {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 12px;
    color: #0078d4;
}
/* 日常报价标准页：名称后的标准文件，点击新窗口打开 */
h2.std-title .std-title-file {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
    color: #0078d4;
    text-decoration: underline;
}
.cart-actions { display: flex; align-items: center; gap: 16px; margin-top: 12px; }
.cart-actions button { margin: 0; }
.cart-actions .back-link { margin-left: 0; }
.draft-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.draft-actions[hidden] { display: none !important; }
.draft-actions input,
.draft-actions button { margin: 0; }
button.danger { background: #d13438; border-color: #a4262c; color: #fff; }
/* 危险按钮悬停保持红色，只加深 */
button.danger:hover { background: #a4262c; border-color: #8a1e23; color: #fff; box-shadow: 0 3px 8px rgba(209, 52, 56, .32); }
button.danger-hover:hover { background: #d13438; border-color: #a4262c; color: #fff; }
.cart-selected-total { font-weight: 700; }
.package-selected-summary { font-weight: 700; color: #d13438; }
.cart-pick { display: inline-flex; align-items: center; margin: 0; }
.cart-pick input { width: 16px; height: 16px; margin: 0; }
.cart-head { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.cart-head h2, .cart-head h3.cart-day { margin: 0; }
.cart-head form { margin: 0; display: flex; align-items: center; gap: 12px; }
.cart-head button { margin: 0; }
/* 购物车标题下面的蓝色分隔线。查找和按钮在线的下方。 */
.cart-page > .cart-head {
    padding-bottom: 12px;
    border-bottom: 3px solid #0078d4;
}
.cart-page > .cart-find-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}
.cart-find-row .cart-find { margin: 0; }
.cart-find-row .back-link { margin-left: 0; }
.cart-ops { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.cart-ops button { margin: 0; }
h3.cart-day {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px 0 0;
    color: #0078d4;
    font-size: 16px;
    font-weight: 700;
}
.package-page h3.cart-day,
.cart-page h3.cart-day {
    color: #1f1f1f;
}
.cart-page .cart-day-block:not(.is-open) > h3.cart-day {
    color: #8a8a8a;
}
/* 购物车日期行比展开按钮原高 32px 降低 20%。 */
.cart-page .cart-day-block > h3.cart-day {
    min-height: calc(32px * 0.8);
}
.cart-page .cart-day-block > h3.cart-day button.package-toggle {
    width: calc(32px * 0.8);
    height: calc(32px * 0.8);
    font-size: calc(22px * 0.8);
}
.cart-day-pick { display: inline-flex; align-items: center; margin: 0; }
.cart-day-pick input { width: 16px; height: 16px; margin: 0; }
h3.cart-standard { margin: 0; font-size: 16px; color: #0078d4; font-weight: 700; }
.std-abnormal {
    color: #d13438;
    font-weight: 700;
    margin-left: 8px;
    animation: std-abnormal-blink 1s steps(1, end) infinite;
}
@keyframes std-abnormal-blink {
    50% { opacity: 0; }
}
h3.package-name { margin: 0; font-size: 16px; color: #d13438; font-weight: 700; cursor: text; }
h3.package-name .package-std-count { color: #1f1f1f; font-weight: 400; }
.package-page .package-total,
.package-page .package-std-total { font-weight: 400; }
/* 未展开时名称、标准个数和合计为灰色，展开后名称红色、标准个数黑色。 */
.package-listbox > .package-block:not(.is-open) > .cart-head .package-name,
.package-listbox > .package-block:not(.is-open) > .cart-head .package-total,
.package-listbox > .package-block:not(.is-open) > .cart-head .package-std-count {
    color: #8a8a8a;
}
.package-name-edit {
    box-sizing: border-box;
    width: min(420px, 100%);
    height: 28px;
    margin: 0;
    padding: 0 8px;
    border: 1px solid #d13438;
    border-radius: 2px;
    color: #d13438;
    font: inherit;
    font-weight: 700;
}
.quote-name-text { cursor: text; }
@keyframes quote-unopened-blink {
    0%, 100% { background: #fff4ce; }
    50% { background: transparent; }
}
tr.quote-unopened .quote-names {
    animation: quote-unopened-blink 1s ease-in-out infinite;
    border-radius: 2px;
}
.quote-name-edit {
    box-sizing: border-box;
    width: min(360px, 100%);
    height: 28px;
    margin: 0;
    padding: 0 8px;
    border: 1px solid #0078d4;
    border-radius: 2px;
    font: inherit;
}
.package-hide-quote {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    color: #107c10;
    font-size: 13px;
    font-weight: 400;
    white-space: nowrap;
    cursor: pointer;
}
.package-hide-quote[hidden] { display: none !important; }
.package-hide-quote input { width: 14px; height: 14px; margin: 0; }
.package-page > h2 {
    margin: 0 0 4px;
    padding-bottom: 12px;
    border-bottom: 3px solid #0078d4;
    font-size: 20px;
    line-height: 1.3;
}
.package-page .package-search-row {
    padding-top: 0;
    border-top: none;
}
/* 套餐列表与未分配区间距；套餐条目之间仍用灰色分隔线。 */
.package-drafts {
    flex: 0 1 auto;
    min-height: 0;
    max-height: 42%;
    overflow: auto;
}
.package-list {
    margin-top: 16px;
    padding-top: 4px;
    border-top: none;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}
.package-list > .package-listbox {
    flex: 1 1 auto;
    margin-top: 8px;
}
.package-search-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
}
.package-search { margin-top: 0; }
.package-search label { display: inline; margin: 0; }
.package-search input[type=date] {
    width: auto;
    height: 32px;
    box-sizing: border-box;
    border: 1px solid #8a8a8a;
    padding: 0 8px;
}
.cart-listbox { padding-left: 20px; }
.cart-listbox table.grid {
    width: 100%;
    font-size: 13px;
}
.cart-listbox table.grid th,
.cart-listbox table.grid td {
    white-space: nowrap;
    vertical-align: middle;
}
.cart-listbox table.grid th:nth-child(2),
.cart-listbox table.grid td:nth-child(2),
.cart-listbox table.grid th:nth-child(7),
.cart-listbox table.grid td:nth-child(7) {
    white-space: normal;
    overflow-wrap: anywhere;
}
/* 移出列固定为按钮宽的 1.5 倍，各表右缘对齐，不参与其余列的自适应。 */
.cart-listbox table.grid th:nth-child(8),
.cart-listbox table.grid td:nth-child(8),
.package-page .table-wrap table.grid th:nth-child(8),
.package-page .table-wrap table.grid td:nth-child(8) {
    width: 1px;
    white-space: nowrap;
    padding-left: 0;
    padding-right: 0;
    box-sizing: border-box;
}
.cart-listbox table.grid td:nth-child(8) form,
.package-page .table-wrap table.grid td:nth-child(8) form {
    width: var(--remove-col, 63px);
    min-width: var(--remove-col, 63px);
    max-width: var(--remove-col, 63px);
    box-sizing: border-box;
}
.cart-edit { cursor: text; }
.cart-edit.saved { outline: 1px solid #107c10; }
.cart-edit.failed { outline: 1px solid #a4262c; }
.cart-inline-edit {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 1px 4px;
    font: inherit;
    text-align: center;
}
.cart-listbox table.grid th,
.cart-listbox table.grid td,
.package-page table.grid th,
.package-page table.grid td {
    text-align: center;
    vertical-align: middle;
}
.cart-listbox table.grid th,
.cart-listbox table.grid td {
    /* 行间隔在原有基础上减少 30% */
    padding: 1.4px 6px;
    line-height: 1.2;
}
.cart-listbox table.grid button,
.cart-listbox table.grid a.button {
    height: 22px;
    margin: 0;
    padding: 0 8px;
    font-size: 12px;
}
.cart-listbox table.grid input.cart-price,
.cart-listbox table.grid textarea.cart-note {
    width: 100%;
    max-width: none;
    height: 24px;
    min-height: 24px;
    margin: 0;
    padding: 1px 6px;
    line-height: 1.3;
    box-sizing: border-box;
    resize: none;
}
.cart-listbox table.grid td form,
.package-page table.grid td form {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
}
.cart-listbox table.grid button,
.package-page table.grid button { margin: 0; }
/* 套餐页项目表与购物车相同：铺满列表框，短列一行，名称和备注可换行。 */
.package-page .table-wrap table.grid {
    width: 100%;
    font-size: 13px;
}
.package-page .table-wrap table.grid th,
.package-page .table-wrap table.grid td {
    white-space: nowrap;
    vertical-align: middle;
}
.package-page .table-wrap table.grid th:nth-child(2),
.package-page .table-wrap table.grid td:nth-child(2),
.package-page .table-wrap table.grid th:nth-child(7),
.package-page .table-wrap table.grid td:nth-child(7) {
    white-space: normal;
    overflow-wrap: anywhere;
}
.package-page table.grid th,
.package-page table.grid td {
    padding: 2px 6px;
    line-height: 1.3;
}
.package-page table.grid th {
    font-weight: 400;
}
/* 套餐明细项目表只保留表头底色。 */
.package-listbox .package-detail table.grid td {
    background: #fff;
}
.package-page table.grid button,
.package-page table.grid a.button {
    height: 22px;
    margin: 0;
    padding: 0 8px;
    font-size: 12px;
}
.package-page table.grid input.cart-price,
.package-page table.grid textarea.cart-note {
    height: 24px;
    min-height: 24px;
    margin: 0;
    padding: 1px 6px;
    line-height: 1.3;
    box-sizing: border-box;
    resize: none;
}
.cart-listbox input.cart-price,
.cart-listbox textarea.cart-price,
.package-page input.cart-price,
.package-page textarea.cart-price {
    display: block;
    margin: 0 auto;
    text-align: center;
}
.package-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
}
.package-search-row .package-actions { margin-left: 4px; }
.package-actions .back-link { margin-left: 0; }
.package-actions button { margin: 0; }
.package-actions label { display: inline; margin: 0; }
.package-listbox {
    height: 475px;
    margin-top: 12px;
    overflow-y: auto;
    border: 1px solid #8a8a8a;
    background: #fff;
}
.package-listbox.cart-listbox {
    height: 580px;
}
button.package-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    color: #0078d4;
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}
button.package-toggle:hover {
    background: transparent;
    border: none;
    color: #004578;
}
.package-detail { display: none; }
.package-block.is-open > .package-detail { display: block; }
.cart-day-detail { display: none; }
.cart-day-block.is-open > .cart-day-detail { display: block; }
.cart-standard-detail { display: none; }
.cart-standard-block.is-open > .cart-standard-detail { display: block; }

/* ===== 购物车：日期→标准→项目 按菜单/子菜单方式折叠展示 ===== */
.cart-listbox { padding: 4px 8px 8px; }
.cart-listbox .cart-day-block { margin-top: 2px; }
.cart-listbox .cart-day-block > h3.cart-day {
    margin: 0;
    min-height: 36px;
    padding: 0 10px;
    border-radius: 6px;
    transition: background-color .15s ease, color .15s ease;
}
.cart-listbox .cart-day-block > h3.cart-day:hover { background: #f3f3f3; }
.cart-listbox .cart-day-block.is-open > h3.cart-day { background: #eef6fd; }
/* 展开容器只做高度过渡，高度由脚本设置，父级变高时后续栏目一起下移 */
.cart-listbox .cart-day-detail,
.cart-listbox .cart-standard-detail {
    display: block;
    height: 0;
    overflow: hidden;
    opacity: 0;
    transition: height .26s cubic-bezier(.22, .61, .36, 1), opacity .2s ease;
}
.cart-listbox .cart-day-block.is-open > .cart-day-detail,
.cart-listbox .cart-standard-block.is-open > .cart-standard-detail { opacity: 1; }
/* 子级右缩进并加左侧竖线，呈现子菜单层级 */
.cart-listbox .cart-day-detail {
    margin: 2px 0 6px 10px;
    padding-left: 12px;
    border-left: 1px solid #e1e1e1;
}
.cart-listbox .cart-standard-block { margin: 0; }
.cart-listbox .cart-standard-block > .cart-head {
    margin: 0;
    min-height: 34px;
    padding: 0 8px;
    border-radius: 6px;
    transition: background-color .15s ease;
}
.cart-listbox .cart-standard-block > .cart-head:hover { background: #f3f3f3; }
.cart-listbox .cart-standard-block.is-open > .cart-head { background: #f7f7f7; }
.cart-listbox .cart-standard-detail {
    margin: 2px 0 6px 8px;
    padding-left: 12px;
    border-left: 1px solid #e1e1e1;
}
/* 子项轻微错峰：展开时逐条延迟淡入并向下归位 */
.cart-listbox .cart-day-detail > *,
.cart-listbox .cart-standard-detail > * {
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity .18s ease, transform .18s ease;
}
.cart-listbox .cart-day-block.is-open > .cart-day-detail > *,
.cart-listbox .cart-standard-block.is-open > .cart-standard-detail > * {
    opacity: 1;
    transform: none;
}
.cart-listbox .cart-day-detail > *:nth-child(1) { transition-delay: .02s; }
.cart-listbox .cart-day-detail > *:nth-child(2) { transition-delay: .05s; }
.cart-listbox .cart-day-detail > *:nth-child(3) { transition-delay: .08s; }
.cart-listbox .cart-day-detail > *:nth-child(4) { transition-delay: .11s; }
.cart-listbox .cart-day-detail > *:nth-child(5) { transition-delay: .14s; }
.cart-listbox .cart-day-detail > *:nth-child(n+6) { transition-delay: .17s; }
.cart-day-block { margin-top: 8px; }
.package-block {    margin-top: 16px;
    padding: 8px 12px 12px;
    border-top: 2px solid #c8c8c8;
    background: #f7f7f7;
}
.package-listbox > .package-block {
    margin-top: 0;
    padding: 0 8px;
    border-top: 1px solid #e1e1e1;
    background: transparent;
}
.package-listbox > .package-block > .cart-head {
    margin-top: 0;
    min-height: calc(32px * 1.15);
}
.package-block > .cart-head:first-child { margin-top: 4px; }
.package-listbox > .package-block > .cart-head:first-child { margin-top: 0; }
.package-standard-row { margin-left: 28px; }
input.cart-price, textarea.cart-price {
    width: 10em;
    max-width: 100%;
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
}
textarea.cart-note {
    width: 160px;
    min-height: 32px;
    line-height: 1.4;
    resize: vertical;
    white-space: normal;
}
input.cart-price.saved, textarea.cart-price.saved { border-color: #107c10; }
input.cart-price.failed, textarea.cart-price.failed { border-color: #a4262c; }
.cart-total { margin: 8px 0 0; font-weight: 700; }
th.check-col, td.check-col { width: 36px; text-align: center; }
th.check-col { width: 36px; }

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 16px;
    color: #0078d4;
    font-weight: 700;
}
.back-link svg { width: 16px; height: 16px; flex: none; }
.back-bottom { margin-top: 16px; }
.back-bottom .back-link { margin-left: 0; }

.share-qr { margin: 12px 0; }
.share-link { display: flex; gap: 8px; align-items: center; }
.share-link input { flex: 1; width: auto; margin: 0; }
.share-link button { margin: 0; }
/* 报价单列表：去掉文件名列；标准名称略收；操作可换行，避免重叠与横向滚动。 */
.table-wrap.quote-wrap { overflow-x: hidden; }
/* 查询栏留在列表外固定，列表框内下拉查看。 */
.quote-page-head {
    position: sticky;
    top: 0;
    z-index: 2;
    padding-bottom: 4px;
    background: #fff;
}
.quote-page .toolbar {
    margin-top: 8px;
    margin-bottom: 8px;
    padding-top: 6px;
}
.quote-page .toolbar .field {
    gap: 2px;
}
.quote-page .toolbar .field label {
    margin: 0;
    font-size: 12px;
    line-height: 16px;
    color: #5c5c5c;
}
.quote-page .quote-total {
    align-self: flex-end;
    line-height: 32px;
    margin-left: 4px;
}
.quote-listbox {
    height: 580px;
    margin-top: 8px;
    overflow-y: auto;
    border: 1px solid #8a8a8a;
    background: #fff;
}
.quote-listbox table.quote-list thead th {
    background: #f3f3f3;
}
.quote-listbox > .cart-day-block > h3.cart-day {
    /* 日期行间隔在原基础上减少 20%（14px → 11px） */
    margin-top: 11px;
    min-height: calc(32px * 0.8);
    color: #1f1f1f;
}
.quote-listbox > .cart-day-block:not(.is-open) > h3.cart-day {
    color: #8a8a8a;
}
.quote-listbox > .cart-day-block > h3.cart-day button.package-toggle {
    width: calc(32px * 0.8);
    height: calc(32px * 0.8);
    font-size: calc(22px * 0.8);
}
.quote-listbox .cart-day-detail { padding: 0 8px 8px; }
table.quote-list { width: 100%; table-layout: fixed; font-size: 13px; }
/* 报价单列表行高在原有基础再降 30%：单元格上下间距 8px → 4.5px。 */
table.quote-list th,
table.quote-list td {
    padding-top: 4.5px;
    padding-bottom: 4.5px;
}
table.quote-list th:nth-child(1),
table.quote-list td:nth-child(1) { width: 36px; text-align: center; }
table.quote-list th:nth-child(3),
table.quote-list td:nth-child(3) { width: 72px; }
table.quote-list td:nth-child(3) {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
table.quote-list th:nth-child(4),
table.quote-list td:nth-child(4) { width: 118px; white-space: nowrap; }
table.quote-list th:nth-child(5),
table.quote-list td:nth-child(5) { width: 280px; }
table.quote-list tbody td { vertical-align: middle; }
table.quote-list td:nth-child(1) { vertical-align: middle; }
/* 名称列吃掉剩余宽度，尽量单行；超出才省略。 */
table.quote-list th:nth-child(2),
table.quote-list td:nth-child(2) { width: auto; }
table.quote-list td:nth-child(2) {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.quote-names { white-space: normal; }
mark.quote-hit {
    background: #fff3a0;
    color: inherit;
    padding: 0 1px;
}
.quote-ops {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    align-items: center;
}
.quote-ops > a.button,
.quote-ops > form.inline { margin: 0; }
.quote-ops .button,
.quote-ops button {
    height: calc(28px * 0.8);
    padding: 0 10px;
    font-size: 13px;
}
.quote-ops a.quote-share,
.quote-ops button.quote-requote {
    background: transparent;
    color: #1f1f1f;
    border-color: #8a8a8a;
}
.quote-ops a.quote-share:hover {
    background: #dff6dd;
    border-color: #107c10;
    color: #0b5a0b;
}
.quote-ops button.quote-requote:hover {
    background: #fde7e9;
    border-color: #d13438;
    color: #a4262c;
}
table.quote-list td.actions {
    white-space: normal;
    width: 220px;
}
a.file-name {
    display: block;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 资质编辑：删除附件与选择文件用同款按钮，保证同一水平线 */
.attach-cell {
    min-width: 220px;
    max-width: 360px;
    vertical-align: top;
}
.attach-cell .file-name {
    margin-bottom: 6px;
}
.attach-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
}
/* 项目附件与标准文件共用：清除/选择同高、同风格、同一水平线 */
.attach-actions button.clear-attach,
.attach-actions label.attach-pick {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    height: 28px;
    margin: 0;
    margin-top: 0;
    padding: 0 8px;
    border: 1px solid #767676;
    border-radius: 2px;
    background: #efefef;
    color: #1f1f1f;
    font-family: "Microsoft YaHei UI", "Segoe UI", sans-serif;
    font-size: 12px;
    font-weight: 400;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
}
.attach-actions button.clear-attach:hover,
.attach-actions label.attach-pick:hover {
    background: #e5e5e5;
}
.attach-actions .attach-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}
.attach-actions label.attach-pick {
    position: relative;
}
.attach-pick-name {
    font-size: 12px;
    color: #605e5c;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.edit-head {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin: 0 0 6px;
}
.edit-head h2 {
    margin: 0;
    font-size: 22px;
    line-height: 1.3;
}
.edit-head .edit-back {
    margin-left: 0;
    font-size: 18px;
    line-height: 1.3;
}
.edit-form {
    margin-top: 0;
}
.std-file-head {
    margin: 0 0 6px;
}
.std-file-head .std-file-name {
    display: inline-block;
    max-width: min(480px, 70vw);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.std-file-actions {
    margin: 0 0 6px;
}
.std-file-cleared {
    margin: 0 0 6px;
    color: #d13438;
}
.attach-cell .danger-text {
    margin: 4px 0 6px;
    color: #d13438;
}
.attach-current {
    margin-bottom: 6px;
}
.attach-cleared {
    margin: 0 0 6px;
    color: #d13438;
}

/* 日常报价查询结果：关键字亮黄底加粗，与小程序一致 */
.kw-hit {
    color: #1f1f1f;
    background: #ffe600;
    font-weight: 700;
}

.name-source { display: none; }

.project-tip {
    position: fixed;
    z-index: 30;
    width: 360px;
    max-height: 320px;
    overflow: auto;
    background: #fff;
    border: 1px solid #8a8a8a;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    padding: 10px 14px;
    font-size: 13px;
    line-height: 1.5;
}

.project-tip-title { margin-bottom: 8px; font-weight: 600; }
.project-tip ol { margin: 0; padding-left: 1.4em; }
.project-tip li { margin: 2px 0; }
.project-tip p { margin: 0; color: #5c5c5c; }

form.inline { display: inline-flex; margin: 0; }
button.inline, a.button.inline { margin: 0; }
td.actions { white-space: nowrap; width: 1%; }
td.actions > a.button,
td.actions > form.inline { margin-right: 8px; vertical-align: middle; }
td.actions > :last-child { margin-right: 0; }
.form-actions { display: flex; align-items: center; gap: 12px; margin-top: 8px; flex-wrap: wrap; }
.form-actions button, .form-actions a.button { margin: 0; }
.form-actions .back-link { margin-left: 0; }
.hint { color: #5c5c5c; margin: 6px 0 0; }
.hint-alert { color: #d13438; }
.toolbar .log-export-hint { margin: 0 0 0 4px; line-height: 32px; }
.edit-form input[type=file] { margin-top: 6px; }

.edit-fields-row {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
    margin: 0 0 8px;
    width: 100%;
}
.edit-fields-row .edit-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.edit-fields-row .edit-field label {
    margin: 0;
    font-size: 12px;
    color: #5c5c5c;
}
.edit-fields-row .edit-field input[type=text],
.edit-fields-row .edit-field select {
    margin: 0;
    height: 32px;
}
.edit-fields-row .edit-field-name {
    flex: 0 0 40%;
    width: 40%;
    max-width: 40%;
    box-sizing: border-box;
}
.edit-fields-row .edit-field-name input[type=text] {
    width: 100%;
    box-sizing: border-box;
}
.edit-fields-row .edit-field select {
    min-width: 140px;
}
.edit-fields-row .edit-field-file {
    flex: 1 1 220px;
    min-width: 200px;
}
.edit-fields-row .edit-field-file .std-file-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0;
    min-height: 32px;
}
.edit-fields-row .edit-field-file .std-file-actions button,
.edit-fields-row .edit-field-file .std-file-actions .attach-pick {
    margin: 0;
}
.edit-fields-row .edit-field-file .std-file-actions .std-file-name {
    display: inline-block;
    max-width: min(360px, 40vw);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 32px;
}
.edit-fields-row .edit-field-file .attach-pick-name[hidden] {
    display: none !important;
}

.project-title { margin: 0; white-space: nowrap; }
.project-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 20px 0 8px;
}
.project-toolbar input[type=text] {
    width: 220px;
    height: 32px;
    margin: 0;
    box-sizing: border-box;
    border: 1px solid #8a8a8a;
    padding: 0 8px;
}
.project-toolbar button {
    margin: 0;
    height: 32px;
}
.project-toolbar .back-link { margin-left: 0; }
.project-edit-listbox {
    height: 520px;
    margin-top: 8px;
    overflow: auto;
    border: 1px solid #8a8a8a;
    background: #fff;
}
.project-edit-listbox table.project-edit {
    width: 100%;
    margin: 0;
}
/* 行高贴近 32px 输入框，避免单元格上下留白。 */
.project-edit-listbox table.project-edit th,
.project-edit-listbox table.project-edit td {
    padding: 1px 6px;
    vertical-align: middle;
}
.project-edit-listbox table.project-edit button.remove-project {
    height: 32px;
    margin: 0;
}
.project-edit-listbox table.project-edit thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f3f3f3;
}
/* 编辑标准关联项目：行悬停浅绿（不改表格结构） */
.project-edit-listbox tbody tr:hover td {
    background: #dff6dd;
}
.project-edit input[type=text] { width: 110px; height: 32px; }
/* 项目序号、报价框收窄到与列标题同宽。 */
.project-edit td:first-child input[type=text],
.project-edit td:nth-child(4) input[type=text] {
    box-sizing: border-box;
    padding: 0 4px;
}
.project-edit td:first-child input[type=text] { width: 4em; }
.project-edit td:nth-child(4) input[type=text] { width: 4em; }
.project-edit textarea.grow {
    display: block;
    box-sizing: border-box;
    width: 220px;
    min-height: 32px;
    max-height: 180px;
    margin: 0;
    padding: 4px 8px;
    line-height: 22px;
    border: 1px solid #8a8a8a;
    resize: vertical;
    overflow: auto;
    font-family: inherit;
    font-size: 14px;
}
.project-edit textarea.name { width: 320px; }
.project-edit textarea.basis { width: 260px; }
.project-edit textarea.remark { width: 240px; }

.edit-form select {
    height: 32px;
    min-width: 200px;
    border: 1px solid #8a8a8a;
    background: #fff;
    padding: 0 8px;
}

.table-wrap { overflow-x: auto; }

table.grid { border: none; }
table.grid th, table.grid td {
    border: none;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: top;
}
table.grid tbody tr:last-child td { border-bottom: none; }
table.grid th { background: #f3f3f3; white-space: nowrap; border-bottom-color: #e6e6e6; }

.pager { margin-top: 16px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pager.quote-pager { margin-top: 0; }
.pager form { display: flex; align-items: center; gap: 8px; margin: 0; }
.pager select {
    height: 32px;
    border: 1px solid #8a8a8a;
    background: #fff;
    padding: 0 8px;
}

.to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 30;
    width: 52px;
    height: 52px;
    border: 1px solid #005a9e;
    border-radius: 4px;
    background: #0078d4;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

/* 单号管理 */
.ticket-section {
    margin: 12px 0 16px;
}
.ticket-section h3 {
    margin: 0 0 10px;
    font-size: 16px;
}
.ticket-take {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}
.ticket-label {
    font-size: 14px;
    color: #1f1f1f;
}
.ticket-no {
    font-size: 28px;
    color: #d13438;
    font-weight: 700;
    letter-spacing: 0.5px;
    line-height: 1.2;
}
.ticket-rule {
    margin: 0;
}
/* 单号管理弹窗：前缀输入框后面接日期格式选择框 */
.ticket-rule-row {
    display: flex;
    gap: 8px;
    align-items: center;
}
.ticket-rule-row input {
    flex: 1 1 auto;
    min-width: 0;
}
.ticket-rule-row select {
    flex: 0 0 auto;
    width: 150px;
}
.ticket-take-action {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    margin-top: 4px;
}
.ticket-take button { margin: 0; }
.ticket-qty {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}
.ticket-qty input {
    width: 80px;
    margin: 0;
    height: 36px;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
}
.ticket-columns {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 24px;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid #e1e1e1;
    min-height: 0;
    overflow: hidden;
}
.ticket-col {
    flex: 1 1 0;
    min-width: 0;
    min-height: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.ticket-col > .ticket-listbox {
    flex: 1 1 0;
    width: 100%;
    height: 0;
    min-height: 0;
    overflow: auto;
}
.ticket-toolbar { margin-bottom: 6px; }
.ticket-wrap { display: inline-block; max-width: 100%; overflow-x: auto; }
/* 我的取号 / 历史记录：查询栏及以上固定，列表框内下拉。 */
.ticket-list-head {
    position: sticky;
    top: 0;
    z-index: 2;
    padding-bottom: 4px;
    background: #fff;
}
.ticket-listbox {
    height: 380px;
    overflow-y: auto;
    border: 1px solid #8a8a8a;
    background: #fff;
}
.ticket-listbox.ticket-wrap {
    display: block;
    max-width: 100%;
}
.ticket-listbox table.ticket-list {
    width: 100%;
}
.ticket-listbox table.ticket-list thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f3f3f3;
}
table.ticket-list {
    font-size: 13px;
    width: auto;
    table-layout: auto;
}
table.ticket-list th, table.ticket-list td {
    padding: 2px 10px;
    white-space: nowrap;
}
table.ticket-list td.ticket-action {
    width: 1%;
    padding-left: 12px;
}
table.ticket-list .inline button {
    height: 26px;
    padding: 0 10px;
    font-size: 12px;
}

/* ===== 列表统一外观：取消边框，改为圆角 + 阴影 ===== */
.standard-listbox,
.log-listbox,
.user-listbox,
.quote-listbox,
.package-listbox,
.project-edit-listbox,
.ticket-listbox {
    border: none;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 4px 14px rgba(0, 0, 0, .07);
}

/* ===== 输入框统一外观：圆角 + 阴影 ===== */
input[type=text],
input[type=password],
input[type=date],
input[type=number],
input[type=search],
input[type=time],
input[type=email],
input[type=tel],
select,
textarea {
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .12) inset, 0 1px 2px rgba(0, 0, 0, .05);
    transition: border-color .15s ease, box-shadow .15s ease;
}
/* 聚焦时描边变蓝并带主色光晕 */
input[type=text]:focus,
input[type=password]:focus,
input[type=date]:focus,
input[type=number]:focus,
input[type=search]:focus,
input[type=time]:focus,
input[type=email]:focus,
input[type=tel]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #0078d4;
    box-shadow: 0 0 0 3px rgba(0, 120, 212, .18), 0 1px 2px rgba(0, 0, 0, .06);
}

/* ===== 查询栏清除按钮：输入框有内容时显示浅红圆圈的 × ===== */
.clearable {
    position: relative;
    display: inline-block;
    max-width: 100%;
    vertical-align: middle;
}
.field > .clearable { display: block; }
.keyword-box { position: relative; }
input.has-clear { padding-right: 26px; }
button.clear-input {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    /* 用 flex 让 × 在圆圈里水平垂直居中 */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #f7a6a6;
    color: #fff;
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 13px;
    font-weight: 400;
    line-height: 1;
    text-align: center;
    cursor: pointer;
    opacity: .9;
    transition: background-color .15s ease, opacity .15s ease;
}
button.clear-input:hover {
    background: #ef8f8f;
    border: none;
    color: #fff;
    opacity: 1;
    box-shadow: 0 2px 6px rgba(239, 143, 143, .35);
}
button.clear-input[hidden] { display: none !important; }

/* ===== 报价单管理 / 套餐管理：与购物车一致的层级折叠 ===== */
.quote-listbox > .cart-day-block > h3.cart-day,
.package-listbox > .package-block > .cart-head {
    border-radius: 6px;
    transition: background-color .15s ease, color .15s ease;
}
.quote-listbox > .cart-day-block > h3.cart-day { padding: 0 10px; }
.quote-listbox > .cart-day-block > h3.cart-day:hover,
.package-listbox > .package-block > .cart-head:hover { background: #f3f3f3; }
.quote-listbox > .cart-day-block.is-open > h3.cart-day,
.package-listbox > .package-block.is-open > .cart-head { background: #eef6fd; }

/* 二级：报价单列表 / 套餐明细，按高度过渡展开 */
.quote-listbox .cart-day-detail,
.package-listbox .package-detail,
.package-listbox .cart-standard-detail,
.package-drafts .cart-standard-detail {
    display: block;
    height: 0;
    overflow: hidden;
    opacity: 0;
    transition: height .26s cubic-bezier(.22, .61, .36, 1), opacity .2s ease;
}
.quote-listbox .cart-day-block.is-open > .cart-day-detail,
.package-listbox .package-block.is-open > .package-detail,
.package-listbox .cart-standard-block.is-open > .cart-standard-detail,
.package-drafts .cart-standard-block.is-open > .cart-standard-detail { opacity: 1; }
/* 服务端直接渲染为展开状态时，高度交给内容撑开（展开动画时行内高度优先） */
.quote-listbox .cart-day-block.is-open > .cart-day-detail,
.package-listbox .package-block.is-open > .package-detail,
.package-listbox .cart-standard-block.is-open > .cart-standard-detail,
.package-drafts .cart-standard-block.is-open > .cart-standard-detail { height: auto; }

/* 子级缩进 + 左侧竖线，呈现菜单/子菜单层级 */
.quote-listbox .cart-day-detail,
.package-listbox .package-detail,
.package-listbox .cart-standard-detail,
.package-drafts .cart-standard-detail {
    margin: 0;
    padding: 0 0 0 12px;
    border-left: 1px solid #e1e1e1;
}
.quote-listbox .cart-day-detail,
.package-listbox .package-detail { margin-left: 10px; }
.package-listbox .cart-standard-detail { margin-left: 20px; }
.package-drafts .cart-standard-detail { margin-left: 8px; }
/* 展开后才留出上下间距，收起时不占位 */
.quote-listbox .cart-day-block.is-open > .cart-day-detail,
.package-listbox .package-block.is-open > .package-detail,
.package-listbox .cart-standard-block.is-open > .cart-standard-detail,
.package-drafts .cart-standard-block.is-open > .cart-standard-detail {
    margin-top: 2px;
    margin-bottom: 4px;
}
.package-listbox .cart-standard-block > .cart-head,
.package-drafts .cart-standard-block > .cart-head {
    margin: 0;
    min-height: 34px;
    padding: 0 8px;
    border-radius: 6px;
    transition: background-color .15s ease;
}
.package-listbox .cart-standard-block > .cart-head:hover,
.package-drafts .cart-standard-block > .cart-head:hover { background: #f7f7f7; }
.package-listbox .cart-standard-block.is-open > .cart-head,
.package-drafts .cart-standard-block.is-open > .cart-head { background: #f7f7f7; }
/* 标准行仍右缩进，与项目表的左缘对齐 */
.package-listbox .cart-standard-block > .cart-head.package-standard-row { margin-left: 20px; }

/* 子项轻微错峰出现 */
.quote-listbox .cart-day-detail > *,
.package-listbox .cart-standard-detail > *,
.package-drafts .cart-standard-detail > * {
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity .18s ease, transform .18s ease;
}
.quote-listbox .cart-day-block.is-open > .cart-day-detail > *,
.package-listbox .cart-standard-block.is-open > .cart-standard-detail > *,
.package-drafts .cart-standard-block.is-open > .cart-standard-detail > * {
    opacity: 1;
    transform: none;
}
.quote-listbox .cart-day-detail > *:nth-child(2) { transition-delay: .04s; }
.quote-listbox .cart-day-detail > *:nth-child(3) { transition-delay: .07s; }
.quote-listbox .cart-day-detail > *:nth-child(n+4) { transition-delay: .10s; }

/* 报价单日期行内不再有标准的二级结构时，表头缩进与子级对齐 */
.quote-listbox .cart-day-detail table.quote-list th:first-child,
.quote-listbox .cart-day-detail table.quote-list td:first-child { padding-left: 4px; }

/* ===== 首页业务概览：柱状图 ===== */
.dash-card {
    max-width: 880px;
    margin-top: 12px;
}
.dash-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.dash-card > .dash-head > h2 { margin: 0 0 4px; }
.dash-legend {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #5c5c5c;
}
.dash-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 3px;
}
.dash-dot.month { background: linear-gradient(180deg, #4cb3f5, #0078d4); }
.dash-dot.total { background: linear-gradient(180deg, #34b56a, #107c10); margin-left: 10px; }

.dash-chart {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-top: 8px;
    padding: 16px 12px 8px;
    border-radius: 10px;
    background: linear-gradient(180deg, #fbfdff, #f6f8fb);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05);
}
.dash-metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
}
/* 绘图区固定高度（原 160px 增加 50%），柱高用百分比表示，两根柱子共用同一比例尺 */
.dash-bars {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    /* 两根柱子相隔 20px */
    gap: 20px;
    width: 100%;
    height: 240px;
    padding-top: 18px;
    margin-bottom: 20px;
    border-bottom: 1px dashed #d8dee6;
}
.dash-bar-col {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    /* 固定柱宽，避免被拉散 */
    flex: 0 0 46px;
    width: 46px;
    height: 100%;
}
/* 柱底标签：本月 / 总计，贴在基线下 */
.dash-tag {
    position: absolute;
    left: 50%;
    top: 100%;
    transform: translateX(-50%);
    margin-top: 5px;
    font-size: 11px;
    color: #6b6b6b;
    white-space: nowrap;
}
/* 数值贴在柱顶，柱体伸展时数字同步变化 */
.dash-value {
    position: absolute;
    left: 50%;
    bottom: 100%;
    transform: translate(-50%, -2px);
    font-size: 12px;
    font-weight: 700;
    color: #1f1f1f;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.dash-bar {
    position: relative;
    width: 100%;
    max-width: 46px;
    height: 0;
    border-radius: 6px 6px 0 0;
}
.dash-bar.month { background: linear-gradient(180deg, #5cc0ff, #0078d4); box-shadow: 0 2px 8px rgba(0, 120, 212, .25); }
.dash-bar.total { background: linear-gradient(180deg, #46c47c, #107c10); box-shadow: 0 2px 8px rgba(16, 124, 16, .25); }
.dash-label {
    margin-top: 10px;
    font-family: "Microsoft YaHei UI", "Segoe UI", sans-serif;
    font-size: 13px;
    color: #3b3b3b;
    text-align: center;
}
@media (max-width: 720px) {
    .dash-chart { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}


