/* 管理后台定制样式：统一布局、导航、组件外观 */

/* ===== 布局基础 ===== */
:root {
    --sidebar-width: 240px;
    --sidebar-width-collapsed: 72px;
    --app-bg: #f5f6fb;
    --app-main-bg: #f5f6fb;
    --app-card-bg: #fff;
    --app-surface: #fff;
    --app-border: rgba(15, 23, 42, 0.06);
    --app-text: #111827;
    --app-text-muted: #6b7280;
    --app-sidebar-bg: #111827;
    --app-sidebar-text: #e5e7eb;
    --app-sidebar-text-muted: rgba(229, 231, 235, 0.66);
    --app-sidebar-divider: rgba(255, 255, 255, 0.12);
    --app-shadow: rgba(15, 23, 42, 0.05);
    /* 同步覆盖 Bootstrap 变量，确保主题切换不仅影响自定义组件，也影响基础表单/按钮。 */
    --bs-body-bg: #f5f6fb;
    --bs-body-color: #111827;
    --bs-secondary-color: #6b7280;
    --bs-tertiary-bg: #eef2ff;
    --bs-border-color: rgba(15, 23, 42, 0.12);
    --bs-card-bg: #ffffff;
    --bs-card-color: #111827;
    --bs-light: #f8fafc;
    --bs-light-rgb: 248, 250, 252;
}

body[data-theme="dark"] {
    --app-bg: #0b1220;
    --app-main-bg: #0f172a;
    --app-card-bg: #111827;
    --app-surface: #1f2937;
    --app-border: rgba(148, 163, 184, 0.24);
    --app-text: #f8fafc;
    --app-text-muted: #94a3b8;
    --app-sidebar-bg: #0b1220;
    --app-sidebar-text: #e2e8f0;
    --app-sidebar-text-muted: rgba(226, 232, 240, 0.72);
    --app-sidebar-divider: rgba(148, 163, 184, 0.22);
    --app-shadow: rgba(2, 6, 23, 0.45);
    --bs-body-bg: #0f172a;
    --bs-body-color: #f8fafc;
    --bs-secondary-color: #94a3b8;
    --bs-tertiary-bg: #1f2937;
    --bs-border-color: rgba(148, 163, 184, 0.32);
    --bs-card-bg: #111827;
    --bs-card-color: #f8fafc;
    --bs-light: #1f2937;
    --bs-light-rgb: 31, 41, 55;
}

body[data-theme="system"] {
    --app-bg: #f5f6fb;
    --app-main-bg: #f5f6fb;
    --app-card-bg: #fff;
    --app-surface: #fff;
    --app-border: rgba(15, 23, 42, 0.06);
    --app-text: #111827;
    --app-text-muted: #6b7280;
    --app-sidebar-bg: #111827;
    --app-sidebar-text: #e5e7eb;
    --app-sidebar-text-muted: rgba(229, 231, 235, 0.66);
    --app-sidebar-divider: rgba(255, 255, 255, 0.12);
    --app-shadow: rgba(15, 23, 42, 0.05);
    --bs-body-bg: #f5f6fb;
    --bs-body-color: #111827;
    --bs-secondary-color: #6b7280;
    --bs-tertiary-bg: #eef2ff;
    --bs-border-color: rgba(15, 23, 42, 0.12);
    --bs-card-bg: #ffffff;
    --bs-card-color: #111827;
    --bs-light: #f8fafc;
    --bs-light-rgb: 248, 250, 252;
}

@media (prefers-color-scheme: dark) {
    body[data-theme="system"] {
        --app-bg: #0b1220;
        --app-main-bg: #0f172a;
        --app-card-bg: #111827;
        --app-surface: #1f2937;
        --app-border: rgba(148, 163, 184, 0.24);
        --app-text: #f8fafc;
        --app-text-muted: #94a3b8;
        --app-sidebar-bg: #0b1220;
        --app-sidebar-text: #e2e8f0;
        --app-sidebar-text-muted: rgba(226, 232, 240, 0.72);
        --app-sidebar-divider: rgba(148, 163, 184, 0.22);
        --app-shadow: rgba(2, 6, 23, 0.45);
        --bs-body-bg: #0f172a;
        --bs-body-color: #f8fafc;
        --bs-secondary-color: #94a3b8;
        --bs-tertiary-bg: #1f2937;
        --bs-border-color: rgba(148, 163, 184, 0.32);
        --bs-card-bg: #111827;
        --bs-card-color: #f8fafc;
        --bs-light: #1f2937;
        --bs-light-rgb: 31, 41, 55;
    }
}

body {
    background: var(--app-bg);
    color: var(--app-text);
}

.layout {
    min-height: 100vh;
    display: flex;
    flex-direction: row;
    background: var(--app-bg);
}

.mobile-sidebar-toggle {
    display: none;
}

/* ===== 侧边栏 ===== */
.sidebar {
    width: var(--sidebar-width);
    background: var(--app-sidebar-bg);
    color: var(--app-sidebar-text);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    transition: transform .3s ease, width .2s ease;
    z-index: 1040;
    min-height: 100vh;
    overflow-x: hidden;
}

.sidebar .logo {
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: .75rem;
}

.sidebar nav .nav-link {
    color: var(--app-sidebar-text);
    margin-bottom: .25rem;
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .55rem .75rem;
}

/* 左侧导航分组：通过业务域标题收敛一级菜单信息密度。 */
.sidebar-nav-group + .sidebar-nav-group {
    margin-top: .7rem;
    padding-top: .7rem;
    border-top: 1px solid var(--app-sidebar-divider);
}

.sidebar-nav-group-title {
    padding: 0 .75rem .35rem;
    font-size: .72rem;
    line-height: 1.25;
    letter-spacing: .06em;
    color: var(--app-sidebar-text-muted);
    text-transform: uppercase;
}

.nav-icon {
    font-size: 1.1rem;
}

.nav-label {
    flex: 1;
    white-space: nowrap;
}

.sidebar nav .nav-link.active,
.sidebar nav .nav-link:hover {
    color: #fff;
    background-color: color-mix(in srgb, var(--app-sidebar-text) 16%, transparent);
}

.sidebar-overlay {
    display: none;
}

/* ===== 主内容和顶部栏 ===== */
.main {
    flex: 1 1 0%;
    min-width: 0;
    background: var(--app-main-bg);
    min-height: 100vh;
    transition: margin-left .2s ease;
}

.topbar-wrapper {
    padding: 1.5rem 1.5rem 0;
}

.topbar {
    background: var(--app-surface);
    border-radius: 1rem;
    padding: 0.85rem 1.25rem;
    box-shadow: 0 0.5rem 1.5rem var(--app-shadow);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.topbar-left {
    display: inline-flex;
    align-items: center;
    gap: .85rem;
}

.topbar-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0;
}

.topbar-right {
    margin-left: auto;
}

.topbar-notification-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    min-height: 40px;
    padding: .38rem .62rem;
    border: 1px solid rgba(15, 23, 42, 0.14);
    border-radius: 999px;
    background: var(--app-surface);
    color: var(--app-text);
    text-decoration: none;
    transition: border-color .16s ease, box-shadow .16s ease, color .16s ease;
}

.topbar-notification-btn:hover {
    border-color: rgba(37, 99, 235, 0.42);
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.12);
    color: #1d4ed8;
}

.topbar-notification-btn__icon {
    font-size: .98rem;
    line-height: 1;
}

.topbar-notification-btn__text {
    font-size: .82rem;
    font-weight: 600;
}

.topbar-notification-btn__badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    padding: 0 5px;
    border-radius: 999px;
    background: #dc2626;
    color: var(--app-card-bg);
    font-size: .72rem;
    line-height: 20px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.sidebar-toggle-btn {
    border: none;
    background: transparent;
    color: var(--app-sidebar-text);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
}

.topbar-card {
    border-radius: 1rem;
}

.status-badge {
    border-radius: 999px;
    padding: .25rem .75rem;
    font-size: .85rem;
}

.status-open { background: rgba(37, 99, 235, 0.15); color: #2563eb; }
.status-approved { background: rgba(16, 185, 129, 0.15); color: #059669; }
.status-rejected { background: rgba(248, 113, 113, 0.2); color: #dc2626; }

.card-metric h3 {
    font-size: 2rem;
    margin: 0;
}

.card-metric p {
    margin: 0;
    color: var(--app-text-muted);
}

.card {
    border-color: var(--app-border);
    background: var(--app-card-bg);
}

.card-body,
.card-header {
    background: transparent;
}

.table {
    color: var(--app-text);
}

.text-muted {
    color: var(--app-text-muted) !important;
}

/* ===== 仪表盘 ===== */
.dashboard-page .card {
    border: 1px solid var(--app-border);
    border-radius: 1rem;
    box-shadow: 0 6px 20px var(--app-shadow);
}

.dashboard-overview-strip {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
}

.dashboard-summary {
    margin-bottom: .85rem;
}

.dashboard-overview-item {
    display: inline-flex;
    flex-direction: column;
    gap: .25rem;
    min-width: 120px;
    padding: .55rem .8rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: .8rem;
    background: #fff;
}

.dashboard-overview-item strong {
    font-size: 1rem;
    color: #0f172a;
}

.dashboard-insights {
    margin-bottom: .95rem;
}

.dashboard-insights .tickets-insight-card__chip {
    background: rgba(59, 130, 246, 0.08);
    color: #1d4ed8;
}

.dashboard-insights .tickets-insight-card__actions .btn {
    min-height: 34px;
}

.dashboard-metrics-grid {
    margin-bottom: .15rem;
}

.dashboard-metric-col {
    display: flex;
}

.dashboard-metric-link {
    width: 100%;
}

.dashboard-metric-body {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    min-height: 148px;
}

.metric-card {
    background: linear-gradient(145deg, #ffffff, #f8fbff);
    color: #0f172a;
    border: 1px solid rgba(59, 130, 246, 0.12);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(30, 64, 175, 0.12);
    border-color: rgba(37, 99, 235, 0.3);
}

.metric-card__top {
    display: flex;
    align-items: center;
    gap: .65rem;
    margin-bottom: .75rem;
}

.metric-card__icon {
    width: 36px;
    height: 36px;
    border-radius: .75rem;
    background: rgba(37, 99, 235, 0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.metric-card__title {
    font-size: .95rem;
    font-weight: 600;
}

.metric-card__value {
    font-size: clamp(1.7rem, 2.2vw, 2rem);
    line-height: 1;
    font-weight: 700;
    margin-bottom: .35rem;
    font-variant-numeric: tabular-nums;
}

.metric-card__desc {
    color: #64748b;
    font-size: .88rem;
    line-height: 1.4;
}

.metric-card__cta {
    margin-top: auto;
    font-size: .78rem;
    color: #1d4ed8;
    opacity: .85;
}

.dashboard-search {
    width: 220px;
}

/* 仪表盘卡片头部：公告/快捷操作统一为“标题 + 工具区”布局，减少小屏换行抖动。 */
.dashboard-panel-header {
    align-items: center;
}

.dashboard-panel-header h5 {
    white-space: nowrap;
}

.dashboard-panel-tools {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: .5rem;
    margin-left: auto;
}

.dashboard-panel-search {
    min-width: 180px;
}

.dashboard-announcement-item h6 {
    font-weight: 600;
}

.dashboard-quick-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: .65rem;
}

.dashboard-quick-action {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: .85rem;
    padding: .75rem .85rem;
    background: #fff;
    display: flex;
    align-items: flex-start;
    gap: .65rem;
    color: #0f172a;
    text-decoration: none;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.dashboard-quick-action:hover {
    border-color: rgba(37, 99, 235, 0.4);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.12);
    transform: translateY(-1px);
    color: #0f172a;
}

.dashboard-quick-action__icon {
    width: 32px;
    height: 32px;
    border-radius: .65rem;
    background: rgba(15, 23, 42, 0.06);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .95rem;
}

.dashboard-quick-action__content {
    display: flex;
    flex-direction: column;
    gap: .2rem;
}

.dashboard-quick-action__content strong {
    font-size: .92rem;
}

.dashboard-quick-action__content small {
    color: #64748b;
    line-height: 1.35;
}

.dashboard-ticket-filter-row {
    align-items: center;
}

.dashboard-ticket-insights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: .85rem;
}

.dashboard-ticket-insight-card {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    min-width: 0;
    padding: .95rem 1rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: .95rem;
    background:
        radial-gradient(circle at top right, rgba(59, 130, 246, .08), transparent 34%),
        linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.dashboard-ticket-insight-card__label {
    color: #64748b;
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    line-height: 1.3;
}

.dashboard-ticket-insight-card__value {
    color: #0f172a;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.45;
}

.dashboard-ticket-insight-card__desc {
    color: #475569;
    font-size: .82rem;
    line-height: 1.55;
}

.dashboard-ticket-insight-card--action {
    border-color: rgba(29, 78, 216, 0.16);
    color: inherit;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.dashboard-ticket-insight-card--action:hover {
    border-color: rgba(29, 78, 216, 0.34);
    box-shadow: 0 14px 28px rgba(29, 78, 216, 0.10);
    transform: translateY(-1px);
}

.dashboard-ticket-insight-card__cta {
    margin-top: auto;
    color: #1d4ed8;
    font-size: .8rem;
    font-weight: 600;
}

/* 最近工单筛选吸顶区：滚动时保留关键筛选与重置入口。 */
.dashboard-ticket-sticky-panel {
    position: sticky;
    top: .6rem;
    z-index: 25;
    padding: .7rem .7rem .55rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: .85rem;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(4px);
    transition: padding .2s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease;
}

.dashboard-ticket-sticky-panel .dashboard-ticket-active-filters {
    margin-bottom: 0;
}

/* 吸顶紧凑态：滚动后保留关键筛选行，压缩占高。 */
@media (min-width: 992px) {
    .dashboard-ticket-sticky-panel.is-compact {
        padding: .52rem .58rem .45rem;
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    }

    .dashboard-ticket-sticky-panel .dashboard-ticket-type-filters,
    .dashboard-ticket-sticky-panel .dashboard-ticket-active-filters {
        overflow: hidden;
        max-height: 120px;
        opacity: 1;
        transform: translateY(0);
    }

    .dashboard-ticket-sticky-panel.is-compact .dashboard-ticket-type-filters,
    .dashboard-ticket-sticky-panel.is-compact .dashboard-ticket-active-filters {
        max-height: 0;
        opacity: 0;
        transform: translateY(-4px);
        pointer-events: none;
        margin-bottom: 0 !important;
    }

    .dashboard-ticket-sticky-panel.is-compact .dashboard-ticket-filter-row,
    .dashboard-ticket-sticky-panel.is-compact .dashboard-ticket-tools {
        margin-bottom: .45rem !important;
    }

    .dashboard-ticket-sticky-panel.is-compact .dashboard-ticket-filter-btn {
        min-height: 32px;
    }

    .dashboard-ticket-sticky-panel.is-manual-collapsed .dashboard-ticket-sticky-toggle {
        border-color: rgba(37, 99, 235, 0.36);
        color: #1d4ed8;
    }

    .dashboard-ticket-sticky-panel.is-manual-collapsed .dashboard-ticket-sticky-auto,
    .dashboard-ticket-sticky-panel.is-manual-expanded .dashboard-ticket-sticky-auto {
        border-color: rgba(15, 23, 42, 0.26);
    }

    /* 首帧渲染完成后再启用过渡，避免页面初次加载闪动。 */
    .dashboard-ticket-sticky-panel.is-transition-ready .dashboard-ticket-type-filters,
    .dashboard-ticket-sticky-panel.is-transition-ready .dashboard-ticket-active-filters {
        transition: max-height .22s ease, opacity .18s ease, transform .18s ease, margin-bottom .18s ease;
    }
}

.dashboard-ticket-filter-btn {
    min-width: 92px;
    min-height: 34px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .2rem;
    white-space: nowrap;
}

.dashboard-ticket-filter-btn .badge {
    font-weight: 500;
}

.dashboard-ticket-tools .btn,
.dashboard-ticket-action-btn {
    min-height: 34px;
}

.dashboard-ticket-sticky-toggle {
    min-width: 86px;
}

.dashboard-ticket-sticky-auto {
    min-width: 86px;
}

/* 最近工单工具按钮组：重置与排序按钮保持并排，窄屏自动换行。 */
.dashboard-ticket-actions {
    display: inline-flex;
    flex-wrap: wrap;
    gap: .5rem;
    justify-content: flex-end;
}

/* 最近工单筛选摘要：统一展示当前生效条件与可见数量。 */
.dashboard-ticket-active-filters {
    margin-top: -.2rem;
}

.dashboard-ticket-active-filters [data-dashboard-ticket-active-count] {
    margin-left: auto;
}

.dashboard-ticket-active-filters [data-dashboard-ticket-active-share-feedback] {
    min-width: 2.6rem;
}

.dashboard-ticket-table {
    min-width: 720px;
}

.dashboard-ticket-table th {
    white-space: nowrap;
    font-size: .8rem;
    color: #64748b;
}

.dashboard-ticket-table .dashboard-ticket-no-cell {
    min-width: 170px;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.dashboard-ticket-mobile-meta {
    display: none;
}

.dashboard-ticket-table .dashboard-ticket-customer-cell {
    min-width: 150px;
}

.dashboard-ticket-table .dashboard-ticket-contract-cell {
    min-width: 140px;
    max-width: 220px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dashboard-ticket-table .dashboard-ticket-type-cell {
    min-width: 96px;
    white-space: nowrap;
}

.dashboard-ticket-table .dashboard-ticket-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 86px;
}

.dashboard-ticket-table .dashboard-ticket-updated-cell {
    min-width: 150px;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.dashboard-ticket-table [data-dashboard-ticket-empty-reset] {
    vertical-align: baseline;
}

.dashboard-ticket-link {
    color: #0f172a;
    text-decoration: none;
}

.dashboard-ticket-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.dashboard-page tr[data-dashboard-ticket-row].is-clickable {
    cursor: pointer;
    transition: background-color .16s ease, outline-color .16s ease;
}

.dashboard-page tr[data-dashboard-ticket-row].is-clickable:hover {
    background: rgba(37, 99, 235, 0.05);
}

.dashboard-page tr[data-dashboard-ticket-row].is-clickable:focus-visible {
    outline: 2px solid rgba(37, 99, 235, 0.42);
    outline-offset: -2px;
    background: rgba(37, 99, 235, 0.08);
}

.dashboard-page tr[data-dashboard-ticket-row].is-clickable:focus-visible .dashboard-ticket-link {
    color: #1d4ed8;
    text-decoration: underline;
}

/* ===== 登录页 ===== */
.login-hero {
    min-height: 100vh;
    background: radial-gradient(circle at 8% 10%, rgba(186, 230, 253, 0.65), transparent 42%),
        radial-gradient(circle at 92% 86%, rgba(191, 219, 254, 0.6), transparent 38%),
        linear-gradient(145deg, #f0f9ff 0%, #e0f2fe 48%, #f8fafc 100%);
}

.login-panel {
    max-width: none;
}

.guest-auth-shell {
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
}

.guest-auth-shell--split {
    display: flex;
    align-items: center;
    justify-content: center;
}

.guest-auth-shell--single {
    display: flex;
    align-items: center;
    justify-content: center;
}

.guest-auth-layout {
    width: min(100%, 1040px);
    display: grid;
    grid-template-columns: minmax(0, 520px) minmax(280px, 340px);
    gap: 1.1rem;
    align-items: stretch;
}

.guest-auth-layout--single {
    width: min(100%, 460px);
    grid-template-columns: minmax(0, 1fr);
    justify-content: center;
}

.guest-auth-panel {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 1rem;
    box-shadow: 0 24px 52px rgba(15, 23, 42, 0.14);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(2px);
}

.guest-auth-brand h3 {
    font-size: 1.25rem;
    letter-spacing: .01em;
}

.guest-auth-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .5rem;
    margin-bottom: .95rem;
}

.guest-auth-summary__item {
    display: flex;
    flex-direction: column;
    gap: .15rem;
    min-height: 72px;
    justify-content: center;
    padding: .62rem .72rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: .8rem;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.98) 0%, rgba(241, 245, 249, 0.9) 100%);
}

.guest-auth-summary__item span {
    color: #64748b;
    font-size: .75rem;
    line-height: 1.25;
}

.guest-auth-summary__item strong {
    color: #0f172a;
    font-size: .9rem;
    line-height: 1.35;
}

.guest-auth-form .form-control {
    min-height: 40px;
    border-radius: .6rem;
}

.guest-auth-aside {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 1rem 1.05rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(10px);
}

.guest-auth-insight-card {
    display: flex;
    flex-direction: column;
    gap: .58rem;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
}

.guest-auth-insight-card + .guest-auth-insight-card {
    margin-top: .95rem;
    padding-top: .95rem;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.guest-auth-insight-card--action {
    margin-top: auto;
}

.guest-auth-insight-card__eyebrow {
    color: #64748b;
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.guest-auth-insight-card__title {
    color: #0f172a;
    font-size: .98rem;
    line-height: 1.45;
    margin: 0;
}

.guest-auth-insight-card__desc {
    color: #475569;
    font-size: .84rem;
    line-height: 1.6;
    margin: 0;
}

.guest-auth-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}

.guest-auth-chip {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: .18rem .62rem;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    color: #1d4ed8;
    font-size: .77rem;
    line-height: 1.2;
}

.guest-auth-actions {
    margin-top: .2rem;
}

.guest-auth-actions--compact {
    margin-top: .15rem;
}

.guest-auth-aside .guest-auth-actions .btn {
    min-height: 38px;
}

.guest-auth-footer-link {
    color: #2563eb;
}

.guest-auth-footer-link:hover {
    color: #1d4ed8;
}

.guest-auth-note {
    line-height: 1.4;
}

@media (max-width: 575.98px) {
    .guest-auth-shell {
        align-items: flex-start !important;
    }

    .guest-auth-layout {
        grid-template-columns: 1fr;
        gap: .85rem;
    }

    .guest-auth-layout--single {
        width: min(100%, 100%);
    }

    .guest-auth-panel {
        width: 100%;
        margin-top: 1rem;
        border-radius: .85rem;
    }

    .guest-auth-summary {
        grid-template-columns: 1fr;
    }

    .guest-auth-aside {
        padding: .9rem;
    }

    .guest-auth-brand h3 {
        font-size: 1.1rem;
    }
}

.user-menu {
    position: relative;
}

.user-menu__button {
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    padding: .35rem .75rem;
    background: #fff;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    cursor: pointer;
}

/* 顶栏账号入口：仅头像显示，减少多余留白。 */
.user-menu__button--avatar-only {
    padding: .2rem;
    gap: 0;
    min-width: 40px;
    min-height: 40px;
    justify-content: center;
}

.user-menu__avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--avatar-bg, #2563eb);
    color: var(--avatar-fg, #fff);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    letter-spacing: .02em;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.user-menu__avatar-stack {
    position: relative;
    width: 32px;
    height: 32px;
    display: inline-flex;
}

.user-menu__avatar-stack > .user-menu__avatar,
.user-menu__avatar-stack > .user-menu__avatar-image {
    position: absolute;
    inset: 0;
}

.user-menu__avatar--rounded {
    border-radius: .72rem;
}

.user-menu__avatar-image {
    display: block;
    object-fit: cover;
    object-position: center;
    background: #e5e7eb;
    box-shadow: none;
}

.user-menu__avatar--lg {
    width: 64px;
    height: 64px;
    font-size: 1.5rem;
}

.user-menu__avatar-stack--lg {
    width: 64px;
    height: 64px;
}

.user-menu__dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + .5rem);
    background: #fff;
    border-radius: .75rem;
    box-shadow: 0 15px 40px rgba(15, 23, 42, 0.15);
    padding: .5rem;
    min-width: 180px;
    display: none;
    z-index: 1200;
}

.user-menu.open .user-menu__dropdown {
    display: block;
}

.user-menu__dropdown a {
    display: block;
    padding: .5rem .75rem;
    border-radius: .5rem;
    color: #374151;
}

.user-menu__dropdown a:hover {
    background: #f3f4f6;
}

@media (max-width: 991px) {
    .layout {
        flex-direction: column;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        transform: translateX(-100%);
        width: min(var(--sidebar-width), 85vw);
        max-width: 320px;
        overflow-y: auto;
        box-shadow: 0 0 30px rgba(0, 0, 0, 0.35);
    }

    .sidebar.sidebar-open {
        transform: translateX(0);
    }

    .sidebar nav {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: .25rem;
    }

    .sidebar-footer {
        width: 100%;
        margin-top: 1rem;
        position: static;
        justify-content: flex-start;
    }

    .sidebar nav .nav-link {
        flex: 1 1 auto;
        text-align: left;
    }

    .sidebar-toggle-btn {
        border: 1px solid rgba(255, 255, 255, 0.3);
        border-radius: 999px;
        width: auto;
        padding: .35rem .9rem;
    }

    .dashboard-search {
        width: 100%;
    }

    .dashboard-panel-header {
        align-items: flex-start !important;
    }

    .dashboard-panel-tools {
        width: 100%;
        margin-left: 0;
        justify-content: flex-start;
    }

    .dashboard-panel-search {
        min-width: 0;
        width: 100%;
    }

    .dashboard-panel-refresh {
        flex: 0 0 auto;
    }

    /* 最近工单筛选按钮组：移动端改为横向可滑动，避免换行压缩触达面积。 */
    .dashboard-ticket-filter-row {
        flex-wrap: nowrap !important;
        overflow-x: auto;
        padding-bottom: .2rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    .dashboard-ticket-sticky-panel {
        top: .4rem;
        padding: .62rem .62rem .5rem;
    }

    .dashboard-ticket-filter-btn {
        flex: 0 0 auto;
        min-height: 36px;
    }

    .dashboard-ticket-tools {
        align-items: flex-start !important;
    }

    .dashboard-ticket-time-filters,
    .dashboard-ticket-actions {
        width: 100%;
    }

    .dashboard-ticket-actions {
        justify-content: flex-start;
    }

    .dashboard-ticket-sticky-toggle {
        display: none !important;
    }

    .dashboard-ticket-sticky-auto {
        display: none !important;
    }

    .tickets-filter-sticky-panel {
        position: static;
        top: auto;
        z-index: auto;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        backdrop-filter: none;
        box-shadow: none;
    }

    .tickets-filter-sticky-panel .tickets-status-quick-filters {
        flex-wrap: nowrap !important;
        overflow-x: auto;
        padding-bottom: .2rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    .dashboard-metric-body {
        min-height: 132px;
        padding: .95rem .95rem .9rem;
    }

    .metric-card__top {
        margin-bottom: .55rem;
    }

    .metric-card__icon {
        width: 32px;
        height: 32px;
        border-radius: .65rem;
    }

    .metric-card__title {
        font-size: .9rem;
    }

    .metric-card__value {
        margin-bottom: .25rem;
    }

    .metric-card__desc {
        font-size: .84rem;
    }

    .dashboard-overview-item {
        flex: 1 1 calc(50% - .65rem);
        min-width: 0;
    }

    .dashboard-ticket-active-filters [data-dashboard-ticket-active-count] {
        margin-left: 0;
    }

    .dashboard-ticket-table {
        min-width: 680px;
    }

    /* 手机端最近工单信息优先级：状态/类型/更新时间前置到单号列，隐藏重复列。 */
    .dashboard-ticket-mobile-meta {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: .35rem;
        margin-top: .35rem;
    }

    .dashboard-ticket-mobile-type,
    .dashboard-ticket-mobile-contract,
    .dashboard-ticket-mobile-updated {
        color: #64748b;
        font-size: .78rem;
        line-height: 1.2;
    }

    .dashboard-ticket-col--type,
    .dashboard-ticket-col--status,
    .dashboard-ticket-col--updated,
    .dashboard-ticket-col--contract,
    .dashboard-ticket-type-cell,
    .dashboard-ticket-status-cell,
    .dashboard-ticket-updated-cell,
    .dashboard-ticket-contract-cell {
        display: none;
    }

    .dashboard-ticket-table .dashboard-ticket-no-cell {
        min-width: 154px;
        white-space: normal;
    }

    .dashboard-ticket-table .dashboard-ticket-customer-cell {
        min-width: 132px;
    }

    .main {
        width: 100%;
        min-height: 100vh;
    }

    .mobile-sidebar-toggle {
        display: inline-flex !important;
    }

    body.sidebar-active {
        overflow: hidden;
    }

    body.sidebar-active .sidebar-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.55);
        z-index: 1030;
    }
}

@media (min-width: 992px) {
    .layout {
        flex-direction: row;
    }

    .sidebar {
        position: sticky;
        top: 0;
        align-self: flex-start;
        height: 100vh;
        overflow-y: auto;
    }
}

body.sidebar-collapsed .sidebar {
    width: var(--sidebar-width-collapsed);
    padding: 1.25rem .75rem;
}

body.sidebar-collapsed .sidebar .logo div {
    display: none;
}

body.sidebar-collapsed .sidebar nav .nav-label,
body.sidebar-collapsed .sidebar nav .badge,
body.sidebar-collapsed .sidebar .sidebar-nav-group-title {
    display: none;
}

body.sidebar-collapsed .sidebar nav .nav-link {
    justify-content: center;
}

body.sidebar-collapsed .main {
    margin-left: 0;
}

body.sidebar-collapsed .sidebar-toggle-btn {
    align-self: center;
}

.sidebar-menu-btn {
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #0f172a;
    border-radius: 999px;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.sidebar-menu-btn .menu-icon {
    font-size: 1.1rem;
    color: inherit;
}

.sidebar-menu-btn .menu-text {
    font-size: .9rem;
}

@media (min-width: 768px) {
     .sidebar-menu-btn {
        display: none;
    }
    .sidebar-footer {
        display: flex !important;
    }
}

/* ===== 列表工具 & 滚动 ===== */
.table-toolbar {
    display: flex;
    gap: .5rem;
    align-items: center;
    justify-content: flex-end;
}

.tickets-filter-toolbar {
    justify-content: flex-start;
}

.tickets-filter-toolbar .btn[data-table-settings] {
    background: #f8fafc;
    border-color: rgba(15, 23, 42, 0.14);
    color: #334155;
}

.tickets-filter-toolbar .btn[data-table-settings]:hover {
    background: #eef2ff;
    border-color: rgba(59, 130, 246, 0.45);
    color: #1e40af;
}

.pending-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
    gap: .6rem;
}

.pending-summary__item {
    display: flex;
    flex-direction: column;
    gap: .15rem;
    padding: .6rem .75rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: .75rem;
    background: #fff;
}

.pending-summary__item strong {
    font-size: 1.2rem;
    line-height: 1.1;
}

.tickets-insight-deck {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: .75rem;
}

.tickets-insight-card {
    display: flex;
    flex-direction: column;
    gap: .58rem;
    min-width: 0;
    padding: .95rem 1rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: .95rem;
    background: var(--app-card-bg);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.tickets-insight-card--accent {
    border-color: rgba(37, 99, 235, 0.18);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.08);
}

.tickets-insight-card--action {
    border-color: rgba(15, 23, 42, 0.12);
}

.tickets-insight-card__eyebrow {
    color: #64748b;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .06em;
    line-height: 1.3;
    text-transform: uppercase;
}

.tickets-insight-card__title {
    color: var(--app-text);
    font-size: 1rem;
    line-height: 1.4;
}

.tickets-insight-card__desc {
    color: var(--app-text-muted);
    font-size: .84rem;
    line-height: 1.6;
}

.tickets-insight-card__chips {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}

.tickets-insight-card__chip {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: .18rem .6rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.05);
    color: #334155;
    font-size: .78rem;
    line-height: 1.25;
}

.tickets-insight-card__metric-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .55rem;
}

.tickets-insight-card__metric {
    display: flex;
    flex-direction: column;
    gap: .12rem;
    padding: .58rem .62rem;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: .78rem;
    background: rgba(248, 250, 252, 0.9);
}

.tickets-insight-card__metric-label {
    color: #64748b;
    font-size: .74rem;
    line-height: 1.3;
}

.tickets-insight-card__metric-value {
    color: var(--app-text);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
    font-variant-numeric: tabular-nums;
}

.tickets-insight-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: auto;
}

.tickets-insight-card__actions .btn {
    min-height: 34px;
}

body[data-theme="dark"] .tickets-insight-card__chip {
    background: rgba(148, 163, 184, 0.16);
    color: #e2e8f0;
}

body[data-theme="dark"] .tickets-insight-card__metric {
    border-color: rgba(148, 163, 184, 0.18);
    background: rgba(15, 23, 42, 0.42);
}

.pending-summary__item--clickable {
    cursor: pointer;
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease, background-color .16s ease;
}

.pending-summary__item--clickable:hover {
    border-color: rgba(37, 99, 235, 0.42);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

.pending-summary__item--clickable:focus-visible {
    outline: 2px solid rgba(37, 99, 235, 0.42);
    outline-offset: 2px;
}

.pending-summary__item--clickable.is-active {
    border-color: rgba(37, 99, 235, 0.55);
    background: rgba(239, 246, 255, 0.95);
}

.rma-summary-more {
    grid-column: 1 / -1;
    border: 1px dashed rgba(15, 23, 42, 0.18);
    border-radius: .75rem;
    padding: .42rem .58rem;
    background: #f8fafc;
}

.rma-summary-more > summary {
    list-style: none;
    cursor: pointer;
    color: #475569;
    font-size: .83rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: .38rem;
}

.rma-summary-more > summary::-webkit-details-marker {
    display: none;
}

.rma-summary-more > summary::before {
    content: '▸';
    color: #334155;
    transition: transform .14s ease;
}

.rma-summary-more[open] > summary::before {
    transform: rotate(90deg);
}

.rma-summary-more-grid {
    grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
}

.tickets-quick-status-row {
    padding: .4rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: .85rem;
    background: #fff;
}

/* 工单筛选吸顶区：滚动时保留高频筛选入口，减少来回回滚。 */
.tickets-filter-sticky-panel {
    position: sticky;
    top: .6rem;
    z-index: 24;
    padding: .72rem .72rem .58rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: .9rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px);
}

.tickets-filter-sticky-panel.is-transition-ready {
    transition: padding .2s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease;
}

.tickets-filter-sticky-panel .tickets-filter-toolbar,
.tickets-filter-sticky-panel .tickets-quick-status-row,
.tickets-filter-sticky-panel .tickets-list-filter-form,
.tickets-filter-sticky-panel .tickets-pending-filter-form {
    margin-bottom: .65rem !important;
}

.tickets-filter-sticky-panel .tickets-active-filters {
    margin-bottom: 0 !important;
}

@media (min-width: 992px) {
    .tickets-filter-sticky-panel.is-compact {
        padding: .54rem .58rem .46rem;
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    }
}

/* 三类工单快捷筛选统一：按钮最小宽度 + 状态名与计数分离对齐。 */
.tickets-status-quick-filters .btn {
    min-width: 132px;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: .45rem;
    font-weight: 500;
    border-color: rgba(15, 23, 42, 0.14);
    color: #334155;
    background: #fff;
}

.tickets-status-quick-filters .btn:hover {
    border-color: rgba(59, 130, 246, 0.45);
    color: #1d4ed8;
    background: #f8faff;
}

.tickets-status-quick-filters .btn.active {
    color: #fff;
    background: #2563eb;
    border-color: #2563eb;
    box-shadow: 0 8px 16px rgba(37, 99, 235, 0.2);
}

.tickets-status-quick-filters [data-rma-filter-preset-pinned-only-toggle].is-active {
    color: #fff;
    background: #0f766e;
    border-color: #0f766e;
    box-shadow: 0 8px 16px rgba(15, 118, 110, 0.2);
}

.tickets-status-quick-filters .badge {
    min-width: 2rem;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

/* RMA 筛选预设控件：统一输入与下拉宽度，避免与快捷按钮混排时过度挤压。 */
.tickets-status-quick-filters .rma-filter-preset-name-wrap {
    min-width: 196px;
    max-width: 260px;
    flex: 1 1 220px;
}

.tickets-status-quick-filters .rma-filter-preset-name-wrap .input-group-text {
    font-size: .78rem;
    color: #475569;
}

.tickets-status-quick-filters .rma-filter-preset-select {
    min-width: 176px;
    max-width: 260px;
    flex: 1 1 208px;
}

.tickets-status-quick-filters .rma-filter-preset-search-wrap {
    min-width: 196px;
    max-width: 260px;
    flex: 1 1 220px;
}

.tickets-status-quick-filters .rma-filter-preset-search-wrap .input-group-text {
    font-size: .78rem;
    color: #475569;
}

.tickets-status-quick-filters .rma-filter-preset-recent-wrap {
    min-height: 2rem;
    flex: 1 1 220px;
}

.tickets-status-quick-filters .rma-filter-preset-recent-hint {
    font-size: .72rem;
    font-weight: 500;
}

.tickets-status-quick-filters .rma-filter-preset-recent-wrap .rma-filter-preset-recent-btn {
    min-width: 0;
    padding: .18rem .52rem;
    font-size: .74rem;
    line-height: 1.2;
    white-space: nowrap;
}

.tickets-status-quick-filters .rma-filter-preset-recent-wrap .rma-filter-preset-recent-btn.is-pinned {
    border-color: rgba(15, 23, 42, 0.3);
    color: #1e3a8a;
    background: rgba(219, 234, 254, 0.72);
}

.tickets-status-quick-filters .rma-advanced-filter-tools {
    flex: 1 1 100%;
    border: 1px dashed rgba(15, 23, 42, 0.18);
    border-radius: .72rem;
    background: #f8fafc;
    padding: .4rem .56rem;
}

.tickets-status-quick-filters .rma-advanced-filter-tools > summary {
    list-style: none;
    cursor: pointer;
    color: #475569;
    font-size: .82rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}

.tickets-status-quick-filters .rma-advanced-filter-tools > summary::-webkit-details-marker {
    display: none;
}

.tickets-status-quick-filters .rma-advanced-filter-tools > summary::before {
    content: '▸';
    color: #334155;
    transition: transform .14s ease;
}

.tickets-status-quick-filters .rma-advanced-filter-tools[open] > summary::before {
    transform: rotate(90deg);
}

.tickets-status-quick-filters .rma-advanced-filter-tools__body {
    width: 100%;
}

/* 维修单顶部摘要：沿用待确认样式并补充边界，避免多卡片时视觉发散。 */
.repair-summary .pending-summary__item {
    min-height: 76px;
    justify-content: center;
}

.replace-summary .pending-summary__item,
.reship-summary .pending-summary__item {
    min-height: 76px;
    justify-content: center;
}

.tickets-all-summary .pending-summary__item,
.integrations-status-summary .pending-summary__item {
    min-height: 76px;
    justify-content: center;
}

.users-summary .pending-summary__item,
.reports-summary .pending-summary__item {
    min-height: 76px;
    justify-content: center;
}

.users-page-flow > .tickets-insight-deck {
    margin-bottom: .82rem !important;
}

.users-insights .tickets-insight-card__chip {
    background: rgba(37, 99, 235, 0.08);
    color: #1d4ed8;
}

.users-insights .tickets-insight-card__actions .btn {
    min-height: 34px;
}

/* 超宽屏节奏收口：限制筛选区、摘要与表格横向扩张，降低视线跳跃。 */
@media (min-width: 1600px) {
    .pending-summary,
    .tickets-insight-deck,
    .tickets-filter-sticky-panel > .tickets-filter-toolbar,
    .tickets-filter-sticky-panel > .tickets-quick-status-row,
    .tickets-filter-sticky-panel > .tickets-list-filter-form,
    .tickets-filter-sticky-panel > .tickets-pending-filter-form,
    .tickets-filter-sticky-panel > .tickets-active-filters,
    .tickets-pagination-summary {
        max-width: 1280px;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    /* 超宽屏表格容器：填满父元素宽度，确保表格无左右留白。 */
    .table-scrollable {
        width: 100%;
        max-width: none;
    }

    .tickets-filter-sticky-panel {
        padding: .82rem .88rem .72rem;
    }

    .tickets-status-quick-filters .btn {
        min-width: 144px;
    }

    /* 工单列表页超宽屏满宽：按业务反馈取消筛选区与分页摘要收口留白。 */
    .tickets-page-flow > .pending-summary,
    .tickets-page-flow > .tickets-insight-deck,
    .tickets-page-flow > .tickets-pagination-summary,
    .tickets-page-flow > .tickets-filter-sticky-panel > .tickets-filter-toolbar,
    .tickets-page-flow > .tickets-filter-sticky-panel > .tickets-quick-status-row,
    .tickets-page-flow > .tickets-filter-sticky-panel > .tickets-list-filter-form,
    .tickets-page-flow > .tickets-filter-sticky-panel > .tickets-pending-filter-form,
    .tickets-page-flow > .tickets-filter-sticky-panel > .tickets-active-filters {
        width: 100%;
        max-width: none !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* 账号页超宽屏满宽：取消筛选区与分页摘要收口，避免列表区域两侧留白。 */
    .users-page-flow > .pending-summary,
    .users-page-flow > .tickets-pagination-summary,
    .users-page-flow > .tickets-filter-sticky-panel > .tickets-filter-toolbar,
    .users-page-flow > .tickets-filter-sticky-panel > .tickets-quick-status-row,
    .users-page-flow > .tickets-filter-sticky-panel > .tickets-list-filter-form,
    .users-page-flow > .tickets-filter-sticky-panel > .tickets-pending-filter-form,
    .users-page-flow > .tickets-filter-sticky-panel > .tickets-active-filters {
        width: 100%;
        max-width: none !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* 通知中心超宽屏满宽：取消摘要/筛选/分页收口，避免列表页中段留白。 */
    .notifications-page-flow > .notifications-summary,
    .notifications-page-flow > .tickets-pagination-summary,
    .notifications-page-flow > .tickets-filter-sticky-panel > .notifications-filter-form,
    .notifications-page-flow > .tickets-filter-sticky-panel > .notifications-actions-bar {
        width: 100%;
        max-width: none !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* 任务日志超宽屏满宽：取消摘要与分页收口，保持检索页横向一致性。 */
    .task-logs-page-flow .pending-summary,
    .task-logs-page-flow .tickets-pagination-summary {
        width: 100%;
        max-width: none !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

/* 中大屏过渡段（1200~1439）：收紧筛选区与分页密度，降低粘性列启用后的拥挤感。 */
@media (min-width: 1200px) and (max-width: 1439.98px) {
    .tickets-filter-sticky-panel {
        top: .45rem;
        padding: .64rem .64rem .52rem;
    }

    .tickets-filter-sticky-panel .tickets-filter-toolbar,
    .tickets-filter-sticky-panel .tickets-quick-status-row,
    .tickets-filter-sticky-panel .tickets-list-filter-form,
    .tickets-filter-sticky-panel .tickets-pending-filter-form {
        margin-bottom: .55rem !important;
    }

    .tickets-status-quick-filters .btn {
        min-width: 120px;
        padding: .34rem .56rem;
    }

    .tickets-pending-table {
        min-width: 1080px !important;
    }

    .tickets-workflow-table {
        min-width: 950px !important;
    }

    .tickets-all-table {
        min-width: 1100px !important;
    }

    .users-table {
        min-width: 900px !important;
    }

    .rma-links-table {
        min-width: 1320px !important;
    }

    .ticket-action-stack > .btn,
    .ticket-action-stack > form,
    .ticket-action-stack > form .btn {
        min-width: 0;
    }

    .tickets-pagination-summary {
        padding: .42rem .56rem;
        gap: .55rem;
    }

    .tickets-pagination-list .page-item .page-link {
        min-width: 1.9rem;
        padding: .24rem .44rem;
    }

    .table-scrollable .tickets-pending-table thead th:first-child,
    .table-scrollable .tickets-workflow-table thead th:first-child,
    .table-scrollable .tickets-pending-table tbody td:first-child,
    .table-scrollable .tickets-workflow-table tbody td:first-child {
        box-shadow: 6px 0 12px -12px rgba(15, 23, 42, 0.32);
    }

    .table-scrollable .tickets-pending-table thead th[data-column-key="actions"],
    .table-scrollable .tickets-workflow-table thead th[data-column-key="actions"],
    .table-scrollable .tickets-pending-table tbody td.ticket-actions-cell,
    .table-scrollable .tickets-workflow-table tbody td.ticket-actions-cell {
        box-shadow: -6px 0 12px -12px rgba(15, 23, 42, 0.32);
    }
}

@media (max-width: 767.98px) {
    .tickets-status-quick-filters .rma-filter-preset-name-wrap,
    .tickets-status-quick-filters .rma-filter-preset-search-wrap,
    .tickets-status-quick-filters .rma-filter-preset-recent-wrap,
    .tickets-status-quick-filters .rma-filter-preset-select {
        min-width: 100%;
        max-width: none;
        flex: 1 1 100%;
    }
}

/* 中宽大屏（1200~1279）操作列收口：固定堆叠宽度并改为纵向分组，避免粘性操作列在过渡段出现拥挤和拉伸。 */
@media (min-width: 1200px) and (max-width: 1279.98px) {
    .ticket-actions-cell {
        min-width: 0;
    }

    .ticket-action-stack {
        width: min(100%, 220px);
        max-width: 220px;
    }

    .users-table .ticket-action-stack {
        width: min(100%, 190px);
        max-width: 190px;
    }

    .ticket-action-stack > .btn,
    .ticket-action-stack > form,
    .ticket-action-stack > form .btn,
    .ticket-action-stack .ticket-action-group,
    .ticket-action-stack .ticket-action-group .btn {
        width: 100% !important;
        min-width: 0;
    }

    .ticket-action-stack .ticket-action-group {
        flex-direction: column;
        align-items: stretch;
    }

    .ticket-action-stack .btn {
        padding: .3rem .5rem;
        font-size: .8rem;
        line-height: 1.3;
        white-space: normal;
    }
}

/* 维修单快捷筛选：按钮内容不换行，状态 + 数量紧凑展示。 */
.repair-quick-filters .btn {
    white-space: nowrap;
}

.replace-quick-filters .btn,
.reship-quick-filters .btn {
    white-space: nowrap;
}

.tickets-all-quick-filters .btn {
    white-space: nowrap;
}

.users-quick-filters .btn,
.reports-quick-filters .btn,
.reports-quick-ranges .btn {
    white-space: nowrap;
}

.repair-quick-filters .badge {
    font-weight: 600;
}

.replace-quick-filters .badge,
.reship-quick-filters .badge {
    font-weight: 600;
}

.tickets-all-quick-filters .badge {
    font-weight: 600;
}

.users-quick-filters .badge,
.reports-quick-filters .badge {
    font-weight: 600;
}

/* 集成测试摘要：长 endpoint 文本允许换行，避免在窄屏撑破布局。 */
.integrations-status-summary .pending-summary__item strong.small {
    font-size: .85rem;
    line-height: 1.35;
    word-break: break-all;
}

.table-scrollable {
    border-radius: 1rem;
    border: 1px solid rgba(15, 23, 42, 0.05);
    background: #fff;
    /* 列表容器无缝收口：去掉内边距并启用圆角裁剪，避免“容器圆角 + 表格直角”产生缝隙。 */
    padding: 0;
    overflow: hidden;
    overflow-x: auto;
}

.table-scrollable table {
    width: 100%;
    margin-bottom: 0;
    min-width: 720px;
}

/* 全部订单表格容器去缝隙：移除内边距并让分页区与表格无缝衔接。 */
[data-table-wrapper="tickets-all-v2"].table-scrollable {
    padding: 0;
}

[data-table-wrapper="tickets-all-v2"] > .tickets-pagination-summary {
    margin: 0 !important;
    border: 0;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 0 0 .95rem .95rem;
}

[data-table-wrapper="tickets-all-v2"] > .tickets-pagination-summary .tickets-pagination-nav {
    margin-top: 0;
}

/* 工单表格内容优先：保留内容宽度策略并用 min-width 兜底，避免窄内容时表格收得过小。 */
.table-scrollable .tickets-pending-table,
.table-scrollable .tickets-workflow-table {
    width: max-content;
    min-width: 100%;
}

/* 工单列表表格铺满优化：优先占满父容器，内容超宽时仍保留横向滚动。 */
.tickets-page-flow > .table-scrollable > .tickets-pending-table,
.tickets-page-flow > .table-scrollable > .tickets-workflow-table {
    width: 100%;
    min-width: max-content;
}

/* 账号列表表格铺满优化：宽屏下优先占满父容器，避免右侧出现大块留白。 */
.users-page-flow > .table-scrollable > .users-table {
    width: 100%;
    min-width: max-content;
}

/* 通知中心与任务日志表格铺满优化：宽屏下优先占满父容器，减少右侧留白。 */
.notifications-page-flow > .table-scrollable > .notifications-center-table,
.task-logs-page-flow .table-scrollable > .task-run-logs-table {
    width: 100%;
    min-width: max-content;
}

/* 审核日志、报表与售后链接页表格铺满优化：避免继承固定基线宽度后在宽屏出现大面积留白。 */
[data-review-log-token-view] > .tickets-workflow-table,
[data-review-log-event-view] > .tickets-workflow-table,
.reports-page-flow .table-scrollable > .reports-detail-table,
.rma-page-flow .table-scrollable > .rma-recent-table {
    width: 100%;
    min-width: max-content !important;
}

/* 工单表格宽度策略：按内容展开并保留最小宽度，兼顾横向滚动和可读性。 */

/* 表格列宽策略统一：待确认与三类工单采用固定基线宽度，减少换行抖动。 */
.tickets-pending-table {
    min-width: 1120px !important;
}

.tickets-workflow-table {
    min-width: 980px !important;
}

/* 全部订单与账号列表基线宽度：避免筛选后列内容换行导致表格抖动。 */
.tickets-all-table {
    min-width: 1180px !important;
}

.users-table {
    min-width: 980px !important;
}

/* 售后链接页列表：链接与商品列较长，基线宽度适当放大避免挤压。 */
.rma-recent-table {
    min-width: 860px !important;
}

.rma-links-table {
    min-width: 1460px !important;
}

.tickets-pending-table thead th,
.tickets-workflow-table thead th {
    white-space: nowrap;
}

/* 工单表格阅读密度统一：收口表头与正文字号/行高，降低跨页切换成本。 */
.tickets-pending-table thead th,
.tickets-workflow-table thead th {
    padding: .68rem .82rem;
    font-size: .84rem;
    line-height: 1.25;
    letter-spacing: .01em;
}

.tickets-pending-table tbody td,
.tickets-workflow-table tbody td {
    padding: .76rem .82rem;
    font-size: .92rem;
    line-height: 1.42;
}

/* 待确认列表交互：双击行打开操作弹框，提供明确可操作反馈。 */
.tickets-pending-table tbody tr[data-pending-row-open="pending-actions"] {
    cursor: pointer;
}

.tickets-pending-table tbody tr[data-pending-row-open="pending-actions"]:hover > td {
    background: rgba(59, 130, 246, .05);
}

.tickets-pending-table tbody tr[data-pending-row-open="pending-actions"]:focus-visible > td {
    box-shadow: inset 0 0 0 2px rgba(59, 130, 246, .35);
}

.pending-actions-modal .modal__dialog {
    width: min(1120px, 96vw);
}

.pending-actions-pane {
    border: 1px solid var(--bs-border-color);
    border-radius: .9rem;
    padding: 1rem;
    background: var(--bs-body-bg);
}

/* 账号列表交互：行点击进入“账号操作面板”，与待确认页交互保持一致。 */
.users-table tbody tr[data-user-row-open="user-actions"] {
    cursor: pointer;
}

.users-table tbody tr[data-user-row-open="user-actions"]:hover > td {
    background: rgba(37, 99, 235, .05);
}

.users-table tbody tr[data-user-row-open="user-actions"]:focus-visible > td {
    box-shadow: inset 0 0 0 2px rgba(37, 99, 235, .35);
}

/* 通知列表交互：行点击进入“通知操作面板”，与账号/待确认页交互保持一致。 */
.notifications-center-table tbody tr[data-notification-row-open="notification-actions"] {
    cursor: pointer;
}

.notifications-center-table tbody tr[data-notification-row-open="notification-actions"]:hover > td {
    background: rgba(14, 116, 144, .06);
}

.notifications-center-table tbody tr[data-notification-row-open="notification-actions"]:focus-visible > td {
    box-shadow: inset 0 0 0 2px rgba(14, 116, 144, .35);
}

/* 审核日志列表交互：行点击进入操作面板，保持与其他后台列表一致。 */
.review-log-token-table tbody tr[data-review-log-row-open="review-log-actions"],
.review-log-event-table tbody tr[data-review-log-row-open="review-log-actions"] {
    cursor: pointer;
}

.review-log-token-table tbody tr[data-review-log-row-open="review-log-actions"]:hover > td,
.review-log-event-table tbody tr[data-review-log-row-open="review-log-actions"]:hover > td {
    background: rgba(30, 64, 175, .06);
}

.review-log-token-table tbody tr[data-review-log-row-open="review-log-actions"]:focus-visible > td,
.review-log-event-table tbody tr[data-review-log-row-open="review-log-actions"]:focus-visible > td {
    box-shadow: inset 0 0 0 2px rgba(30, 64, 175, .35);
}

/* 工单流程列表交互：双击行打开操作面板，统一维修/换货/补发页交互反馈。 */
.tickets-workflow-table tbody tr[data-repair-row-open="repair-actions"],
.tickets-workflow-table tbody tr[data-replace-row-open="replace-actions"],
.tickets-workflow-table tbody tr[data-reship-row-open="reship-actions"] {
    cursor: pointer;
}

.tickets-workflow-table tbody tr[data-repair-row-open="repair-actions"]:hover > td,
.tickets-workflow-table tbody tr[data-replace-row-open="replace-actions"]:hover > td,
.tickets-workflow-table tbody tr[data-reship-row-open="reship-actions"]:hover > td {
    background: rgba(30, 64, 175, .05);
}

.tickets-workflow-table tbody tr[data-repair-row-open="repair-actions"]:focus-visible > td,
.tickets-workflow-table tbody tr[data-replace-row-open="replace-actions"]:focus-visible > td,
.tickets-workflow-table tbody tr[data-reship-row-open="reship-actions"]:focus-visible > td {
    box-shadow: inset 0 0 0 2px rgba(30, 64, 175, .35);
}

.tickets-workflow-table tbody tr[data-tickets-all-row-open="tickets-all-actions"],
.tickets-workflow-table tbody tr[data-rma-link-row-open="rma-link-actions"] {
    cursor: pointer;
}

.tickets-workflow-table tbody tr[data-tickets-all-row-open="tickets-all-actions"]:hover > td,
.tickets-workflow-table tbody tr[data-rma-link-row-open="rma-link-actions"]:hover > td {
    background: rgba(14, 116, 144, .05);
}

.tickets-workflow-table tbody tr[data-tickets-all-row-open="tickets-all-actions"]:focus-visible > td,
.tickets-workflow-table tbody tr[data-rma-link-row-open="rma-link-actions"]:focus-visible > td {
    box-shadow: inset 0 0 0 2px rgba(14, 116, 144, .35);
}

.ticket-actions-cell {
    vertical-align: top !important;
}

/* 大屏横向滚动可读性：固定首列与操作列，减少滚动后定位困难。
   断点从 1200px 降至 992px，因为侧边栏在 992px+ 可见后表格经常需要横向滚动。 */
@media (min-width: 992px) {
    .table-scrollable .tickets-pending-table thead th:first-child,
    .table-scrollable .tickets-workflow-table thead th:first-child,
    .table-scrollable .tickets-pending-table tbody td:first-child,
    .table-scrollable .tickets-workflow-table tbody td:first-child {
        position: sticky;
        left: 0;
    }

    .table-scrollable .tickets-pending-table thead th[data-column-key="actions"],
    .table-scrollable .tickets-workflow-table thead th[data-column-key="actions"],
    .table-scrollable .tickets-pending-table tbody td.ticket-actions-cell,
    .table-scrollable .tickets-workflow-table tbody td.ticket-actions-cell {
        position: sticky;
        right: 0;
    }

    .table-scrollable .tickets-pending-table thead th:first-child,
    .table-scrollable .tickets-workflow-table thead th:first-child,
    .table-scrollable .tickets-pending-table thead th[data-column-key="actions"],
    .table-scrollable .tickets-workflow-table thead th[data-column-key="actions"] {
        z-index: 5;
    }

    .table-scrollable .tickets-pending-table tbody td:first-child,
    .table-scrollable .tickets-workflow-table tbody td:first-child,
    .table-scrollable .tickets-pending-table tbody td.ticket-actions-cell,
    .table-scrollable .tickets-workflow-table tbody td.ticket-actions-cell {
        z-index: 3;
    }

    .table-scrollable .tickets-pending-table thead th:first-child,
    .table-scrollable .tickets-workflow-table thead th:first-child,
    .table-scrollable .tickets-pending-table thead th[data-column-key="actions"],
    .table-scrollable .tickets-workflow-table thead th[data-column-key="actions"] {
        background: #f8fafc;
    }

    .table-scrollable .tickets-pending-table tbody td:first-child,
    .table-scrollable .tickets-workflow-table tbody td:first-child,
    .table-scrollable .tickets-pending-table tbody td.ticket-actions-cell,
    .table-scrollable .tickets-workflow-table tbody td.ticket-actions-cell {
        background: #fff;
    }

    .table-scrollable .tickets-pending-table.table-striped > tbody > tr:nth-of-type(odd) > td:first-child,
    .table-scrollable .tickets-workflow-table.table-striped > tbody > tr:nth-of-type(odd) > td:first-child,
    .table-scrollable .tickets-pending-table.table-striped > tbody > tr:nth-of-type(odd) > td.ticket-actions-cell,
    .table-scrollable .tickets-workflow-table.table-striped > tbody > tr:nth-of-type(odd) > td.ticket-actions-cell {
        background: #f8fafc;
    }

    .table-scrollable .tickets-pending-table thead th:first-child,
    .table-scrollable .tickets-workflow-table thead th:first-child,
    .table-scrollable .tickets-pending-table tbody td:first-child,
    .table-scrollable .tickets-workflow-table tbody td:first-child {
        box-shadow: 8px 0 14px -12px rgba(15, 23, 42, 0.35);
    }

    .table-scrollable .tickets-pending-table thead th[data-column-key="actions"],
    .table-scrollable .tickets-workflow-table thead th[data-column-key="actions"],
    .table-scrollable .tickets-pending-table tbody td.ticket-actions-cell,
    .table-scrollable .tickets-workflow-table tbody td.ticket-actions-cell {
        box-shadow: -8px 0 14px -12px rgba(15, 23, 42, 0.35);
    }
}

.table-scrollable::-webkit-scrollbar {
    height: 8px;
}

.table-scrollable::-webkit-scrollbar-track {
    background: transparent;
}

.table-scrollable::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, 0.2);
    border-radius: 999px;
}

.table > :not(caption) > * > * {
    padding: .85rem .9rem;
    vertical-align: middle;
    color: #0f172a;
}

.table thead th {
    background: #f8fafc;
    font-weight: 600;
    color: #0f172a;
}

.badge {
    font-weight: 600;
    border-radius: 999px;
    padding: .35rem .75rem;
}

/* 工单表格可读性：统一工单号、状态徽标与物流字段行样式。 */
.tickets-workflow-table .ticket-no-cell {
    white-space: nowrap;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.tickets-workflow-table .ticket-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 92px;
    text-align: center;
}

.ticket-meta-list {
    display: grid;
    gap: .2rem;
    min-width: 0;
}

.ticket-meta-line {
    display: flex;
    align-items: flex-start;
    gap: .35rem;
    line-height: 1.35;
}

.ticket-meta-label {
    flex: 0 0 4.4rem;
    color: #64748b;
}

.ticket-meta-value {
    color: #0f172a;
    word-break: break-word;
}

/* 工单空态统一：标题 + 说明 + 重置入口，替代单行文案。 */
.ticket-table-empty-cell {
    padding: 1.2rem 1rem !important;
}

.ticket-table-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .32rem;
    text-align: center;
}

.ticket-table-empty-state__title {
    margin: 0;
    font-weight: 600;
    color: #334155;
}

.ticket-table-empty-state__hint {
    margin: 0;
    max-width: 620px;
    font-size: .84rem;
    color: #64748b;
    line-height: 1.45;
}

.ticket-table-empty-state__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .45rem;
    margin-top: .22rem;
}

.ticket-table-empty-state__actions .btn {
    min-width: 108px;
}

.json-scroll {
    /* FedEx JSON 区域：保持统一高度，超出时用滚动条避免撑开页面；避免长行撑开布局 */
    max-height: 240px;
    overflow: auto;
    max-width: 100%;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: var(--bs-font-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    width: auto;
    max-width: 100%;
    align-items: center;
}

.table-actions .btn,
.table-actions form,
.table-actions form .btn {
    width: auto;
}

.table-actions form {
    margin: 0;
}

/* 操作列按钮基线：桌面端统一高度与垂直居中，避免多页按钮视觉高低不齐。 */
@media (min-width: 768px) {
    .ticket-actions-cell {
        vertical-align: top;
    }

    .table-actions > .btn,
    .table-actions > form .btn,
    .table-actions--stack > .btn,
    .table-actions--stack > form .btn,
    .ticket-action-stack > .btn,
    .ticket-action-stack > form .btn {
        min-height: 31px;
        display: inline-flex;
        align-items: center;
        justify-content: flex-start;
        line-height: 1.25;
    }

    .table-actions--stack > form,
    .ticket-action-stack > form {
        display: inline-flex;
    }
}

/* 操作列堆叠模式：用于“复制链接 + 多个动作”的组合场景。 */
.table-actions--stack {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
}

/* 工单操作列统一层级：工具动作 -> 流程动作 -> 决策动作。 */
.ticket-action-stack {
    gap: .45rem;
}

.ticket-action-stack > .btn,
.ticket-action-stack > form,
.ticket-action-stack > form .btn {
    min-width: 0;
}

.ticket-action-stack > [data-action-tier="utility"] {
    order: 5;
}

.ticket-action-stack > [data-action-tier="workflow"] {
    order: 15;
}

.ticket-action-stack > [data-action-tier="decision"] {
    order: 25;
}

.ticket-action-stack .ticket-action-group {
    gap: .45rem;
}

.ticket-action-stack .ticket-action-group .btn {
    min-width: 0;
}

.ticket-action-stack .ticket-action-hint {
    line-height: 1.35;
    padding-top: .1rem;
}

.ticket-action-stack > .btn[data-action-tier="utility"],
.ticket-action-stack > .btn.btn-copy {
    min-width: 0;
}

/* 操作列防回归：即使误加 w-100，也保持桌面端按钮按内容宽度展示。 */
.table-actions--stack > .btn,
.table-actions--stack > form,
.table-actions--stack > form .btn {
    width: auto !important;
    max-width: 100%;
    text-align: left;
}

/* 操作列宽度兜底：即使误加 w-100，桌面端也避免被拉伸到整列宽度。 */
.table-actions--stack .btn.w-100,
.table-actions--stack form.w-100,
.table-actions--stack form .btn.w-100 {
    width: auto !important;
}

/* 操作按钮顺序规范：主动作 -> 客户通知 -> 内部协同 -> 数据刷新。 */
.table-actions--stack > [data-action-role="primary"] {
    order: 10;
}

.table-actions--stack > [data-action-role="notify"] {
    order: 20;
}

.table-actions--stack > [data-action-role="collab"] {
    order: 30;
}

.table-actions--stack > [data-action-role="refresh"] {
    order: 40;
}

/* 高风险动作默认靠后，减少与主动作相邻导致的误触。 */
.table-actions--stack > [data-action-role="danger"] {
    order: 50;
}

/* 操作列视觉层级：主动作更突出，协同动作次级化。 */
.ticket-action-stack .btn {
    transition: color .16s ease, border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
}

.ticket-action-stack > .btn[data-action-role="primary"],
.ticket-action-stack > [data-action-role="primary"] .btn,
.ticket-action-stack > [data-action-tier="workflow"] {
    font-weight: 600;
    box-shadow: 0 6px 12px rgba(37, 99, 235, 0.18);
}

.ticket-action-stack > .btn[data-action-role="notify"],
.ticket-action-stack > [data-action-role="collab"] .btn,
.ticket-action-stack > [data-action-role="refresh"] .btn,
.ticket-action-stack > [data-action-tier="utility"],
.ticket-action-stack .ticket-action-group .btn.btn-secondary {
    border-color: rgba(15, 23, 42, 0.18);
    color: #334155;
    background: #fff;
}

.ticket-action-stack > .btn[data-action-role="notify"]:hover,
.ticket-action-stack > [data-action-role="collab"] .btn:hover,
.ticket-action-stack > [data-action-role="refresh"] .btn:hover,
.ticket-action-stack > [data-action-tier="utility"]:hover,
.ticket-action-stack .ticket-action-group .btn.btn-secondary:hover {
    border-color: rgba(37, 99, 235, 0.38);
    color: #1e40af;
    background: #f8fbff;
}

/* 危险动作改为弱强调：保留警示色，但默认不使用高饱和实底。 */
.ticket-action-stack .btn[data-action-risk="danger"],
.ticket-action-stack [data-action-role="danger"] .btn {
    color: #b91c1c;
    border-color: rgba(220, 38, 38, 0.48);
    background: rgba(254, 242, 242, 0.95);
}

.ticket-action-stack .btn[data-action-risk="danger"]:hover,
.ticket-action-stack [data-action-role="danger"] .btn:hover {
    color: #991b1b;
    border-color: rgba(185, 28, 28, 0.62);
    background: rgba(254, 226, 226, 0.95);
}

.ticket-action-stack .btn[data-action-risk="danger"]:focus-visible,
.ticket-action-stack [data-action-role="danger"] .btn:focus-visible {
    box-shadow: 0 0 0 .2rem rgba(220, 38, 38, 0.22);
}

/* 操作列子分组：在桌面端横向排列，减少按钮被拉伸的视觉问题。 */
.table-actions__group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* 复制按钮：桌面端按内容宽度展示，避免在大屏被撑满整列。 */
.btn-copy {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    white-space: nowrap;
    width: auto;
    max-width: 100%;
    flex: 0 0 auto;
    transition: color .16s ease, border-color .16s ease, background-color .16s ease;
}

.btn-copy.is-copied {
    color: #047857;
    border-color: rgba(16, 185, 129, 0.45);
    background: rgba(16, 185, 129, 0.1);
}


.badge-soft-primary {
    color: #1d4ed8;
    background-color: rgba(37, 99, 235, 0.15);
}

.badge-soft-success {
    color: #059669;
    background-color: rgba(16, 185, 129, 0.15);
}

.badge-soft-danger {
    color: #b91c1c;
    background-color: rgba(248, 113, 113, 0.2);
}

.badge-soft-warning {
    color: #b45309;
    background-color: rgba(251, 191, 36, 0.2);
}

.badge-soft-info {
    color: #0369a1;
    background-color: rgba(59, 130, 246, 0.15);
}

.badge-soft-secondary {
    color: #475569;
    background-color: rgba(148, 163, 184, 0.3);
}

/* ===== 列配置面板 ===== */
.table-pref-panel {
    position: relative;
    width: 100%;
    border-radius: 1rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #fff;
    box-shadow: 0 15px 35px rgba(15, 23, 42, 0.12);
    padding: 1.25rem;
}

.table-pref-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 2rem 1rem;
    z-index: 1200;
}

.table-pref-modal.is-visible {
    display: flex;
}

.table-pref-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(2px);
    z-index: 0;
}

.table-pref-modal__dialog {
    position: relative;
    width: min(760px, 100%);
    max-height: calc(100vh - 4rem);
    overflow: auto;
    z-index: 1;
}

.table-pref-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1rem;
}

.table-pref-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: .25rem;
}

.table-pref-desc {
    margin: 0;
    color: #6b7280;
    font-size: .85rem;
}

.table-pref-group + .table-pref-group {
    margin-top: 1.5rem;
}

.table-pref-group-title {
    font-weight: 600;
    margin-bottom: .75rem;
}

.table-pref-help {
    margin: -.35rem 0 .75rem;
    color: #6b7280;
    font-size: .8rem;
}

.table-pref-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: .5rem;
}

.table-pref-width-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.table-pref-width-row {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    align-items: center;
    justify-content: space-between;
}

.table-pref-width-label {
    font-weight: 500;
    color: #0f172a;
}

.table-pref-width-control {
    flex: 1 1 280px;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.table-pref-width-control input[type="range"] {
    flex: 1;
}

.table-pref-width-value {
    min-width: 48px;
    text-align: right;
    font-variant-numeric: tabular-nums;
    color: #475569;
}

.table-pref-actions {
    display: flex;
    justify-content: flex-end;
    gap: .75rem;
    margin-top: 1.5rem;
}

/* 屏幕阅读器播报区：视觉隐藏但可读，避免交互状态“无反馈”。 */
.table-pref-live-region {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .table-scrollable {
        padding: 0;
        border-radius: .75rem;
    }

    .table-pref-panel {
        padding: 1rem;
    }

    .table-pref-modal {
        padding: 1.5rem .75rem;
    }

    .table-pref-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }

    .table-pref-width-control {
        flex-direction: column;
        align-items: flex-start;
    }

    .table-pref-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    /* 移动端保持操作按钮满宽，提升点击区域。 */
    .table-actions,
    .table-actions--stack,
    .table-actions__group {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .table-actions .btn,
    .table-actions form,
    .table-actions form .btn,
    .btn-copy,
    .table-actions--stack > .btn,
    .table-actions--stack > form,
    .table-actions--stack > form .btn {
        width: 100% !important;
    }

    .ticket-action-stack .ticket-action-group .btn {
        min-width: 0;
    }

    /* 窄屏下快捷筛选按钮满宽，保证触控面积与对齐一致。 */
    .tickets-status-quick-filters .btn {
        width: 100%;
    }

    .tickets-quick-status-row {
        padding: .45rem;
    }

    .ticket-meta-label {
        flex-basis: 3.9rem;
    }

    .tickets-workflow-table .ticket-status-badge {
        min-width: 0;
    }

    .tickets-pending-table thead th,
    .tickets-workflow-table thead th {
        padding: .6rem .68rem;
        font-size: .8rem;
    }

    .tickets-pending-table tbody td,
    .tickets-workflow-table tbody td {
        padding: .68rem .68rem;
        font-size: .88rem;
    }
}

/* ===== 报表样式 ===== */
.reports-page-flow > .card {
    margin-bottom: 1rem !important;
}

.reports-insights .tickets-insight-card__chip {
    background: rgba(16, 185, 129, 0.08);
    color: #047857;
}

.reports-insights .tickets-insight-card__actions .btn {
    min-height: 34px;
}

.report-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.report-filters__form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.report-filters__form > * {
    margin: .15rem;
}

.report-filters__form .input-group {
    min-width: 280px;
}

.report-filters__form .form-select,
.report-filters__form .btn {
    min-height: 34px;
}

/* 报表筛选吸顶区：与工单页交互节奏一致，长页面滚动时保持可控。 */
.report-filter-sticky-panel {
    width: 100%;
}

.report-filter-sticky-panel .report-filters-toolbar {
    margin-bottom: .35rem !important;
}

.report-filter-sticky-panel .reports-filter-meta {
    margin-bottom: .35rem;
}

.reports-subscription-panel {
    display: flex;
    flex-direction: column;
    gap: .4rem;
}

.reports-subscription-form .form-control,
.reports-subscription-form .form-select,
.reports-subscription-form .btn {
    min-height: 34px;
}

.reports-subscription-actions {
    border-top: 1px dashed rgba(15, 23, 42, 0.12);
    padding-top: .45rem;
}

.reports-detail-table {
    min-width: 860px !important;
}

.reports-detail-table td:nth-child(2) {
    font-variant-numeric: tabular-nums;
}

.reports-detail-table td:nth-child(3) {
    line-height: 1.4;
}

.users-filter-form .form-control,
.users-filter-form .form-select {
    min-width: 150px;
}

/* 非栅格筛选条（全部订单/账号管理）覆盖 Bootstrap 100% 宽，
   避免控件在 flex 容器中逐行独占、视觉上“每项都一样宽”。 */
.tickets-all-filter-form .form-control,
.tickets-all-filter-form .form-select,
.tickets-all-filter-form .btn,
.users-filter-form .form-control,
.users-filter-form .form-select,
.users-filter-form .btn {
    width: auto;
    flex: 0 0 auto;
}

/* 筛选区与操作区按钮统一垂直居中，修复 a.btn 与 button.btn 在不同浏览器里的文本偏移。 */
.btn.btn-sm,
.report-filters__form .btn,
.reports-subscription-form .btn,
.reports-subscription-actions .btn,
.tickets-all-filter-form .btn,
.users-filter-form .btn,
.tickets-pending-filter-form .btn,
.tickets-list-filter-form .btn,
.table-actions .btn,
.table-actions form .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* 账号页筛选条拉伸优化：宽屏下让搜索框吸收剩余空间，减少工具条中段留白。 */
.users-page-flow .users-filter-form {
    flex: 1 1 auto;
    min-width: 0;
}

.users-page-flow .tickets-filter-toolbar > .d-flex {
    flex: 1 1 auto;
    min-width: 0;
}

.users-page-flow .tickets-filter-toolbar > .d-flex .users-filter-form {
    width: 100%;
}

.users-page-flow .users-filter-form .form-control[type="search"] {
    flex: 1 1 320px;
    min-width: 240px;
}

/* 账号页筛选工具条对齐：
   1) 左右区块统一按底部对齐；
   2) 表单内控件与主操作按钮统一高度，避免“筛选/重置/新增账号”基线不一致。 */
.users-page-flow .tickets-filter-toolbar {
    align-items: flex-end !important;
}

.users-page-flow .tickets-filter-toolbar > .d-flex,
.users-page-flow .tickets-filter-toolbar > .d-flex .users-filter-form {
    align-items: flex-end;
}

.users-page-flow .users-filter-form .form-control,
.users-page-flow .users-filter-form .form-select,
.users-page-flow .users-filter-form .btn {
    min-height: var(--ticket-filter-control-height, 38px);
}

/* users 工具条内的筛选表单不参与 sticky 面板通用 margin-bottom 规则，避免左侧整体被抬高。 */
.users-page-flow .tickets-filter-toolbar .users-filter-form.tickets-list-filter-form {
    margin-bottom: 0 !important;
}

/* users 工具条筛选动作组：将“应用筛选/清空筛选”绑定为同一 flex 单元，避免拆行错位。 */
.users-page-flow .users-filter-actions {
    display: flex;
    align-items: stretch;
    gap: .5rem;
    flex: 0 0 auto;
}

.users-page-flow .users-filter-actions .btn {
    min-height: var(--ticket-filter-control-height, 38px);
    white-space: nowrap;
}

.users-page-flow .tickets-filter-toolbar > .btn[data-modal-open="user-create"] {
    min-height: var(--ticket-filter-control-height, 38px);
    align-self: flex-end;
}

/* 全部订单筛选栏（flex 布局）保持最小宽度，避免输入框被压缩后错位。 */
.tickets-all-filter-form .form-control,
.tickets-all-filter-form .form-select {
    min-width: 132px;
}

/* 全部订单筛选字段统一：每个控件以“标题 + 输入”成组展示。 */
.tickets-all-filter-form .tickets-all-filter-field {
    display: flex;
    flex-direction: column;
    gap: .22rem;
    min-width: 132px;
    flex: 0 0 auto;
}

.tickets-all-filter-field__label {
    margin: 0;
    font-size: .72rem;
    line-height: 1.2;
    color: #64748b;
}

.tickets-all-filter-form .tickets-all-filter-field .form-control,
.tickets-all-filter-form .tickets-all-filter-field .form-select {
    min-width: 0;
}

/* 全部订单筛选条节奏优化：关键词扩展，日期区间固定宽度。 */
.tickets-all-filter-form .tickets-all-filter-field--keyword,
.tickets-all-filter-form .tickets-all-filter-field--ref {
    flex: 1 1 230px;
    min-width: 210px;
}

.tickets-all-filter-form .tickets-all-date-field {
    min-width: 158px;
}

/* 操作按钮与分页筛选并列，保持同一组操作区域。 */
.tickets-all-filter-form .tickets-all-filter-actions {
    display: flex;
    align-items: flex-end;
    gap: .5rem;
    flex: 0 0 auto;
}

.tickets-all-filter-form .tickets-all-filter-actions .btn {
    min-height: var(--ticket-filter-control-height, 38px);
    white-space: nowrap;
}

/* 栅格布局筛选表单（pending/repairs/replaces/reships）不设 min-width，
   由 Bootstrap 列宽自适应控制，避免在中等屏幕下溢出列边界。 */

/* 四个工单页筛选表单密度统一：输入高度、圆角、标签节奏保持一致。 */
.tickets-pending-filter-form,
.tickets-list-filter-form {
    --ticket-filter-control-height: 38px;
    --ticket-filter-radius: .6rem;
    row-gap: .35rem !important;
}

.tickets-pending-filter-form .form-control,
.tickets-pending-filter-form .form-select,
.tickets-list-filter-form .form-control,
.tickets-list-filter-form .form-select {
    min-height: var(--ticket-filter-control-height);
    border-radius: var(--ticket-filter-radius);
    border-color: rgba(15, 23, 42, 0.14);
}

.tickets-pending-filter-form .form-control:focus,
.tickets-pending-filter-form .form-select:focus,
.tickets-list-filter-form .form-control:focus,
.tickets-list-filter-form .form-select:focus {
    border-color: rgba(37, 99, 235, 0.55);
    box-shadow: 0 0 0 .16rem rgba(37, 99, 235, 0.16);
}

.tickets-pending-filter-form .form-label,
.tickets-list-filter-form .form-label {
    margin-bottom: .32rem;
    font-weight: 500;
    line-height: 1.2;
    color: #334155;
}

.tickets-pending-filter-form .btn,
.tickets-list-filter-form .btn {
    min-height: var(--ticket-filter-control-height);
    border-radius: var(--ticket-filter-radius);
    white-space: nowrap;
}

/* 筛选动作列统一：两个按钮合并在同一列内，flex 水平排列。 */
.tickets-filter-action-col {
    display: flex;
    align-items: flex-end;
}

.tickets-filter-action-col .btn {
    min-height: var(--ticket-filter-control-height, 38px);
}

.tickets-pending-filter-form .tickets-filter-action-col .btn,
.tickets-list-filter-form .tickets-filter-action-col .btn {
    font-weight: 600;
}

/* 操作列内部 flex 容器：确保与表单控件底部对齐 */
.tickets-filter-action-col > .d-flex {
    align-self: flex-end;
}

/* 待确认页附加筛选（仅显示可推进/待补充）统一排布，减少不同浏览器下行高抖动。 */
.tickets-pending-filter-form .form-check {
    margin-bottom: 0;
    min-height: 24px;
}

/* 工单筛选摘要条：统一展示当前生效条件，方便快速核对与清空。 */
.tickets-active-filters {
    padding: .45rem .65rem;
    border: 1px dashed rgba(15, 23, 42, 0.18);
    border-radius: .75rem;
    background: rgba(248, 250, 252, 0.9);
    min-height: 42px;
    row-gap: .45rem !important;
}

.tickets-active-filters__badge {
    font-weight: 500;
}

.tickets-active-filters__chip {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}

.tickets-active-filters__chip--flash {
    animation: ticketsActiveFilterChipFlash 1.2s ease-out;
}

@keyframes ticketsActiveFilterChipFlash {
    0% {
        background: #dbeafe;
        color: #1e3a8a;
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.35);
    }
    70% {
        background: #dbeafe;
        color: #1e3a8a;
        box-shadow: 0 0 0 8px rgba(37, 99, 235, 0);
    }
    100% {
        background: inherit;
        color: inherit;
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
    }
}

.tickets-active-filters__chip-remove-btn,
.tickets-active-filters__chip-remove-link {
    border: 0;
    background: transparent;
    color: #475569;
    font-size: .95rem;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    padding: 0;
}

.tickets-active-filters__chip-remove-btn:hover,
.tickets-active-filters__chip-remove-link:hover {
    color: #1d4ed8;
}

.tickets-active-filters__status-hint {
    font-size: .8rem;
    color: #475569;
}

.tickets-active-filters__inline-reset {
    text-decoration: none;
    line-height: 1.2;
    padding: .05rem 0;
}

.tickets-active-filters__reset {
    text-decoration: none;
    color: #2563eb;
    line-height: 1.2;
    padding: .05rem 0;
}

.tickets-active-filters__reset:hover {
    text-decoration: underline;
}

/* 工单页垂直节奏统一：标题区 -> 摘要 -> 筛选 -> 分页/列表间距收口。 */
.tickets-page-flow > .tickets-page-header {
    margin-bottom: .8rem !important;
}

.tickets-page-header h5 {
    line-height: 1.2;
}

.tickets-page-header .text-muted.small {
    line-height: 1.4;
}

.tickets-page-flow > .pending-summary {
    margin-bottom: .78rem !important;
}

.tickets-page-flow > .tickets-insight-deck {
    margin-bottom: .78rem !important;
}

.tickets-page-flow > .tickets-filter-sticky-panel {
    margin-bottom: .82rem !important;
}

.tickets-page-flow > .tickets-pagination-summary {
    margin-bottom: .38rem !important;
}

.tickets-page-flow > .table-scrollable {
    margin-top: .1rem;
}

/* 账号页沿用工单页纵向节奏，降低跨页面切换时的视觉落差。 */
.users-page-flow > .tickets-page-header {
    margin-bottom: .8rem !important;
}

.users-page-flow > .pending-summary {
    margin-bottom: .78rem !important;
}

.users-page-flow > .tickets-filter-sticky-panel {
    margin-bottom: .82rem !important;
}

/* 账号中心页：与工单页保持一致的标题节奏与表单密度。 */
.account-page-flow > .tickets-page-header {
    margin-bottom: .85rem !important;
}

.account-page-flow > .pending-summary {
    margin-bottom: .78rem !important;
}

.account-page-flow > .tickets-insight-deck {
    margin-bottom: .92rem !important;
}

.account-debug-page-flow > .tickets-page-header {
    margin-bottom: .85rem !important;
}

.account-debug-page-flow > .pending-summary,
.account-debug-page-flow > .tickets-insight-deck {
    margin-bottom: .85rem !important;
}

.account-debug-summary .pending-summary__item {
    min-height: 72px;
    justify-content: center;
}

.account-debug-insights .tickets-insight-card__chip {
    background: rgba(15, 23, 42, 0.06);
}

.account-debug-card {
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}

.account-debug-list {
    display: grid;
    gap: .85rem;
}

.account-debug-list__item {
    display: grid;
    gap: .18rem;
}

.account-debug-list__item dt {
    color: #64748b;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.account-debug-list__item dd {
    margin: 0;
    color: #0f172a;
    font-size: .94rem;
}

.account-debug-resource-links {
    display: grid;
    gap: .65rem;
}

.account-debug-resource-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .75rem;
    padding: .72rem .85rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: .9rem;
    color: #0f172a;
    text-decoration: none;
    background: rgba(248, 250, 252, 0.72);
}

.account-debug-resource-link:hover {
    border-color: rgba(37, 99, 235, 0.22);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.08);
    color: #0f172a;
}

.account-debug-note {
    border: 1px dashed rgba(37, 99, 235, 0.18);
    border-radius: .9rem;
}

.account-debug-pre {
    max-height: 420px;
    padding: .8rem .95rem;
    border-radius: .9rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #f8fafc;
    font-size: .8rem;
    line-height: 1.55;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

.account-debug-tips {
    display: grid;
    gap: .55rem;
    padding-left: 1.1rem;
}

.account-summary .pending-summary__item {
    min-height: 72px;
    justify-content: center;
}

.account-insights .tickets-insight-card__chip {
    background: rgba(15, 23, 42, 0.06);
}

.account-insights .tickets-insight-card__actions .btn {
    min-height: 34px;
}

.account-layout-grid {
    margin-top: 0;
    width: 100%;
    min-width: 0;
}

.account-layout-grid > [class*='col-'] {
    min-width: 0;
}

.account-profile-card .user-menu__avatar--lg {
    width: 54px;
    height: 54px;
    font-size: 1.15rem;
}

.account-avatar-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: transparent;
    line-height: 0;
    cursor: pointer;
    border-radius: 999px;
}

.account-avatar-trigger:focus-visible {
    outline: 2px solid rgba(37, 99, 235, .45);
    outline-offset: 3px;
}

.account-profile-form .form-control,
.account-profile-form .form-select,
.account-security-form .form-control {
    min-height: var(--ticket-filter-control-height);
}

.account-avatar-manager {
    margin-top: -.15rem;
    padding: .55rem .65rem;
    border: 1px solid var(--bs-border-color);
    border-radius: .55rem;
    background: var(--bs-tertiary-bg);
}

.account-avatar-form .form-control[type="file"] {
    min-height: auto;
    cursor: pointer;
    pointer-events: auto;
}

.account-avatar-upload-preview {
    padding: .45rem .55rem;
    border: 1px dashed var(--bs-border-color);
    border-radius: .5rem;
    background: var(--app-card-bg);
}

.account-avatar-upload-preview .user-menu__avatar {
    width: 40px;
    height: 40px;
    font-size: .95rem;
}

/* 头像显示设置弹框：预览区统一展示当前选项效果。 */
.account-avatar-preview {
    border-radius: .65rem;
}

.account-avatar-preview__media {
    width: 54px;
    height: 54px;
    display: inline-flex;
}

.account-avatar-editor-modal {
    width: min(980px, 96vw);
}

.account-avatar-editor-workspace {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: .5rem;
    border-radius: .65rem;
    border: 1px solid var(--bs-border-color);
    background: color-mix(in srgb, var(--bs-tertiary-bg) 84%, var(--app-main-bg));
}

.account-avatar-editor-workspace canvas {
    width: min(100%, 520px);
    height: auto;
    max-height: 62vh;
    border-radius: .65rem;
    border: 1px solid var(--bs-border-color);
    box-shadow: 0 8px 24px var(--app-shadow);
    background: var(--app-card-bg);
    cursor: grab;
    touch-action: none;
}

.account-avatar-editor-workspace canvas.is-dragging {
    cursor: grabbing;
}

.account-avatar-editor-compare {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .6rem;
}

.account-avatar-editor-compare__modes {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}

.account-avatar-editor-compare__modes .btn {
    min-width: 92px;
}

.account-avatar-editor-compare__modes .btn.active {
    color: #fff;
    background: #2563eb;
    border-color: #2563eb;
}

.account-avatar-editor-compare__hint {
    margin-left: auto;
    align-self: center;
    font-size: .76rem;
    color: var(--bs-secondary-color);
}

.account-avatar-editor-compare__hint kbd {
    font-size: .72rem;
    padding: .05rem .28rem;
    border-radius: .28rem;
}

.account-avatar-editor-shortcuts {
    border: 1px dashed var(--bs-border-color);
    border-radius: .6rem;
    background: color-mix(in srgb, var(--bs-tertiary-bg) 80%, var(--app-main-bg));
    padding: .55rem .65rem;
}

.account-avatar-editor-shortcuts__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .35rem;
}

.account-avatar-editor-shortcuts .small {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: .25rem .8rem;
    color: var(--bs-secondary-color);
}

.account-avatar-editor-shortcuts kbd {
    font-size: .7rem;
    padding: .05rem .28rem;
    border-radius: .24rem;
}

@media (max-width: 767.98px) {
    .account-avatar-editor-compare__hint {
        margin-left: 0;
        width: 100%;
    }
}

.account-avatar-editor-compare__card {
    border: 1px solid var(--bs-border-color);
    border-radius: .6rem;
    padding: .5rem;
    background: var(--app-card-bg);
}

.account-avatar-editor-compare__card--mix {
    grid-column: 1 / -1;
}

.account-avatar-editor-compare__title {
    font-size: .78rem;
    color: var(--bs-secondary-color);
    margin-bottom: .35rem;
}

.account-avatar-editor-compare__card canvas {
    width: 100%;
    max-width: 220px;
    aspect-ratio: 1 / 1;
    height: auto;
    border-radius: .5rem;
    border: 1px solid var(--bs-border-color);
    background: var(--app-card-bg);
    display: block;
    margin: 0 auto;
}

.account-avatar-editor-compare__card--mix canvas {
    max-width: 100%;
    width: min(100%, 560px);
}

@media (max-width: 767.98px) {
    .account-avatar-editor-compare {
        grid-template-columns: 1fr;
    }
}

.account-avatar-editor-controls .form-label {
    margin-bottom: .2rem;
    font-size: .8rem;
    color: var(--bs-secondary-color);
}

.account-form-section-title {
    margin: .2rem 0 .05rem;
    color: var(--bs-secondary-color);
    font-size: .82rem;
    letter-spacing: .03em;
}

.account-notify-switch {
    padding: .55rem .65rem;
    border: 1px solid var(--bs-border-color);
    border-radius: .55rem;
    background: var(--bs-tertiary-bg);
}

/* 通知开关窄屏错位修复：
   Bootstrap form-switch 使用负 margin 定位，外层改写 padding 后会在窄宽度下错位。
   这里改为显式 flex 对齐并重置 input 浮动/负边距。 */
.account-notify-switch.form-check.form-switch {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    padding: .55rem .65rem;
}

.account-notify-switch.form-check.form-switch .form-check-input {
    float: none;
    margin: .1rem 0 0;
    flex: 0 0 auto;
}

.account-notify-switch.form-check.form-switch .form-check-label {
    margin: 0;
    line-height: 1.4;
    overflow-wrap: anywhere;
    word-break: break-word;
}

@media (max-width: 420px) {
    .account-notify-switch.form-check.form-switch {
        gap: .42rem;
        padding: .5rem .55rem;
    }
}

.account-form-actions {
    margin-top: .2rem;
    padding-top: .65rem;
    border-top: 1px dashed var(--bs-border-color);
}

.account-security-card__header {
    padding-bottom: .15rem;
    border-bottom: 1px dashed var(--bs-border-color);
    min-width: 0;
    row-gap: .35rem;
}

.account-security-card {
    overflow: hidden;
}

.account-security-card__metric {
    margin-bottom: .6rem;
    padding: .55rem .65rem;
    border: 1px solid var(--bs-border-color);
    border-radius: .55rem;
    background: var(--bs-tertiary-bg);
    min-width: 0;
}

.account-security-card__metric .d-flex {
    min-width: 0;
}

.account-security-card__metric .text-muted,
.account-security-card__metric .fw-semibold {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.account-security-card__metric:last-of-type {
    margin-bottom: 0;
}

.account-trusted-devices {
    border-top: 1px dashed var(--bs-border-color);
    padding-top: .65rem;
}

.account-trusted-devices-table {
    min-width: 760px;
}

.account-trusted-devices-table th {
    white-space: nowrap;
    font-size: .77rem;
    color: var(--bs-secondary-color);
}

.account-trusted-devices-table td {
    vertical-align: middle;
}

.account-trusted-devices-table tbody tr[data-trusted-device-row-open="trusted-device-actions"] {
    cursor: pointer;
}

.account-trusted-devices-table tbody tr[data-trusted-device-row-open="trusted-device-actions"]:hover > td {
    background: rgba(14, 116, 144, .06);
}

.account-trusted-devices-table tbody tr[data-trusted-device-row-open="trusted-device-actions"]:focus-visible > td {
    box-shadow: inset 0 0 0 2px rgba(14, 116, 144, .35);
}

.account-security-card__metric--summary .form-text {
    margin-top: .2rem;
}

.account-security-card__progress {
    height: 6px;
}

.account-security-card__tip {
    margin-top: .15rem;
}

.account-security-card__details {
    margin-bottom: .6rem;
    padding: .5rem .65rem;
    border: 1px dashed var(--bs-border-color);
    border-radius: .55rem;
    background: color-mix(in srgb, var(--bs-tertiary-bg) 92%, transparent);
}

.account-security-card__details summary {
    cursor: pointer;
    color: var(--bs-secondary-color);
    font-size: .82rem;
    font-weight: 600;
    user-select: none;
}

.account-security-card__details summary:focus-visible {
    outline: 2px solid rgba(var(--bs-primary-rgb), .35);
    outline-offset: 2px;
    border-radius: .35rem;
}

.account-security-breakdown {
    margin-top: .55rem;
    display: flex;
    flex-direction: column;
    gap: .6rem;
}

.account-security-breakdown__item {
    padding: .45rem .5rem;
    border: 1px solid var(--bs-border-color);
    border-radius: .5rem;
    background: var(--bs-body-bg);
}

.account-security-breakdown__detail {
    margin-top: .2rem;
}

.account-security-card__advice {
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
}

.account-security-card__recommendation-list {
    margin-top: .45rem;
    padding-left: 1rem;
    display: grid;
    gap: .2rem;
}

.account-security-card__details--inner {
    margin-top: .5rem;
    margin-bottom: 0;
    background: transparent;
}

.account-security-form .input-group .btn {
    min-width: 104px;
}

/* 登录历史页：复用账号页节奏，并为会话/记录区提供统一密度。 */
.login-history-page-flow > .tickets-page-header {
    margin-bottom: .85rem !important;
}

.login-history-page-flow > .pending-summary {
    margin-bottom: .78rem !important;
}

.login-history-page-flow > .tickets-insight-deck {
    margin-bottom: .82rem !important;
}

.login-history-page-flow > .tickets-filter-sticky-panel {
    margin-bottom: .82rem !important;
}

.login-history-summary .pending-summary__item {
    min-height: 72px;
    justify-content: center;
}

.login-history-insights .tickets-insight-card__chip {
    background: rgba(14, 116, 144, 0.08);
    color: #0f766e;
}

.login-history-insights .tickets-insight-card__actions .btn {
    min-height: 34px;
}

.login-history-page-flow .login-history-section-card {
    border: 1px solid var(--app-border);
}

.login-history-page-flow .login-history-section-card + .login-history-section-card {
    margin-top: .9rem;
}

.login-history-page-flow .login-history-active-table,
.login-history-page-flow .login-history-records-table {
    min-width: 920px;
}

.login-history-page-flow .login-history-filter-form .form-control,
.login-history-page-flow .login-history-filter-form .form-select {
    min-height: var(--ticket-filter-control-height);
}

.login-history-page-flow .login-history-records-table {
    min-width: 1040px;
}

/* 活跃会话列表行交互：统一进入会话操作面板。 */
.login-history-active-table tbody tr[data-active-session-row-open="active-session-actions"] {
    cursor: pointer;
}

.login-history-active-table tbody tr[data-active-session-row-open="active-session-actions"]:hover > td {
    background: rgba(14, 116, 144, .06);
}

.login-history-active-table tbody tr[data-active-session-row-open="active-session-actions"]:focus-visible > td {
    box-shadow: inset 0 0 0 2px rgba(14, 116, 144, .35);
}

/* 登录历史列表行交互：统一进入操作面板。 */
.login-history-records-table tbody tr[data-login-history-row-open="login-history-actions"] {
    cursor: pointer;
}

.login-history-records-table tbody tr[data-login-history-row-open="login-history-actions"]:hover > td {
    background: rgba(37, 99, 235, .05);
}

.login-history-records-table tbody tr[data-login-history-row-open="login-history-actions"]:focus-visible > td {
    box-shadow: inset 0 0 0 2px rgba(37, 99, 235, .35);
}

/* SQL Server 调试页：统一标题节奏、表清单滚动区与结果表格最小宽度。 */
.debug-db-page-flow > .tickets-page-header {
    margin-bottom: .85rem !important;
}

.debug-db-page-flow > .pending-summary,
.debug-db-page-flow > .tickets-insight-deck {
    margin-bottom: .85rem !important;
}

.debug-db-summary .pending-summary__item {
    min-height: 72px;
    justify-content: center;
}

.debug-db-insights .tickets-insight-card__chip {
    background: rgba(2, 132, 199, 0.08);
    color: #0369a1;
}

.debug-db-page-flow > .row {
    margin-top: 0;
}

.debug-db-query-card,
.debug-db-result-card {
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}

.db-debug-tables-list {
    max-height: 220px;
    overflow: auto;
}

.debug-db-result-table {
    min-width: 720px;
}

/* FedEx 认证工作台：沿用后台统一节奏，并补足步骤卡与侧栏提示样式。 */
.fedex-cert-page-flow > .tickets-page-header {
    margin-bottom: .85rem !important;
}

.fedex-cert-page-flow > .pending-summary,
.fedex-cert-page-flow > .tickets-insight-deck {
    margin-bottom: .85rem !important;
}

.fedex-cert-summary .pending-summary__item {
    min-height: 72px;
    justify-content: center;
}

.fedex-cert-insights .tickets-insight-card__chip {
    background: rgba(37, 99, 235, 0.08);
    color: #1d4ed8;
}

.fedex-cert-step-card {
    display: flex;
    flex-direction: column;
    gap: .6rem;
    padding: 1rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: .95rem;
    background: var(--app-card-bg);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
}

.fedex-cert-step-card .btn {
    align-self: flex-start;
    margin-top: auto;
}

.fedex-cert-note-list li + li {
    margin-top: .45rem;
}

/* 工单详情/编辑页：统一头部、卡片与表单节奏，降低与主列表页的风格割裂。 */
.ticket-show-page-flow > .tickets-page-header,
.ticket-edit-page-flow > .tickets-page-header {
    margin-bottom: .85rem !important;
}

.ticket-show-page-flow > .row,
.ticket-edit-page-flow > .card {
    margin-bottom: .9rem;
}

.ticket-show-page-flow > .tickets-insight-deck {
    margin-bottom: .9rem;
}

.ticket-show-summary .card-body h4 {
    margin-bottom: .15rem;
}

.ticket-show-insights .tickets-insight-card__chip {
    background: rgba(37, 99, 235, 0.08);
    color: #1d4ed8;
}

.ticket-show-insights .tickets-insight-card__actions .btn {
    min-height: 34px;
}

.ticket-show-logistics-form .form-control,
.ticket-show-logistics-form .form-select,
.ticket-show-logistics-stage-form .form-control,
.ticket-show-logistics-stage-form .form-select,
.ticket-show-external-ref-form .form-control,
.ticket-edit-form .form-control,
.ticket-edit-form .form-select {
    min-height: var(--ticket-filter-control-height);
}

.ticket-show-section-divider {
    margin: .95rem 0 .85rem;
    border-top: 1px dashed var(--bs-border-color);
}

/* 工单详情页：轨迹查询入口与结果区，保持与筛选卡片一致的紧凑信息密度。 */
.ticket-show-track-query-form {
    display: flex;
    justify-content: flex-end;
    margin-top: .65rem;
}

.ticket-show-track-result {
    margin-top: .85rem;
    padding: .8rem;
    border: 1px solid var(--bs-border-color);
    border-radius: .65rem;
    background: var(--bs-body-bg);
}

.ticket-show-track-result-meta {
    margin-top: .35rem;
    margin-bottom: .55rem;
}

.ticket-show-logistics-tracks {
    min-width: 540px;
}

.ticket-show-logistics-tracks th,
.ticket-show-logistics-tracks td {
    white-space: nowrap;
    vertical-align: top;
}

/* 售后链接页节奏：摘要卡片、生成表单、链接列表间距统一。 */
.rma-page-flow > .row,
.rma-page-flow > .card {
    margin-bottom: .9rem;
}

.rma-page-flow .tickets-page-header {
    margin-bottom: .75rem !important;
}

.rma-page-flow > .tickets-insight-deck {
    margin-bottom: .82rem !important;
}

.rma-links-insights .tickets-insight-card__chip {
    background: rgba(14, 116, 144, 0.08);
    color: #0f766e;
}

.rma-links-insights .tickets-insight-card__actions .btn {
    min-height: 34px;
}

/* 接口测试页头部：联调状态与锚点入口采用统一吸顶工具条。 */
.integrations-test-page-flow > .card {
    margin-bottom: 1rem !important;
}

.integrations-test-sticky-panel {
    width: 100%;
}

.integrations-test-sticky-panel .tickets-filter-toolbar {
    margin-bottom: .35rem !important;
}

.integrations-test-insights .tickets-insight-card__chip {
    background: rgba(99, 102, 241, 0.08);
    color: #4338ca;
}

.integrations-test-insights .tickets-insight-card__actions .btn {
    min-height: 34px;
}

/* 系统集成中心：摘要与卡片动作区密度统一。 */
.integrations-page-flow > .card {
    margin-bottom: 1rem !important;
}

.integration-center-summary .pending-summary__item {
    min-height: 72px;
    justify-content: center;
}

.integrations-insights {
    margin-top: .85rem;
}

.integrations-insights .tickets-insight-card__chip {
    background: rgba(37, 99, 235, 0.08);
    color: #1d4ed8;
}

.integrations-insights .tickets-insight-card__actions .btn {
    min-height: 34px;
}

.integration-center-toolbar .btn {
    min-height: 34px;
}

.integration-card-actions .btn {
    min-height: 34px;
}

.integration-card-actions .btn[data-modal-open="integration-connector-actions"] {
    min-width: 104px;
}

/* 任务日志页：筛选、表格与上下文预览统一密度。 */
.task-logs-page-flow > .card {
    margin-bottom: 1rem !important;
}

.task-logs-summary .pending-summary__item {
    min-height: 72px;
    justify-content: center;
}

.task-logs-toolbar .btn {
    min-height: 34px;
}

.task-logs-insights .tickets-insight-card__chip {
    background: rgba(37, 99, 235, 0.08);
    color: #1d4ed8;
}

.task-logs-filter-sticky-panel {
    margin-bottom: .82rem;
}

.task-logs-filter-form .form-control,
.task-logs-filter-form .form-select,
.task-logs-filter-actions .btn {
    min-height: var(--ticket-filter-control-height);
}

.task-run-logs-table {
    min-width: 1240px;
}

.task-run-logs-context-cell {
    min-width: 220px;
}

/* 任务日志行级交互：与账号/通知列表一致，行点击进入操作面板。 */
.task-run-logs-table tbody tr[data-task-log-row-open="task-log-actions"] {
    cursor: pointer;
}

.task-run-logs-table tbody tr[data-task-log-row-open="task-log-actions"]:hover > td {
    background: rgba(37, 99, 235, .05);
}

.task-run-logs-table tbody tr[data-task-log-row-open="task-log-actions"]:focus-visible > td {
    box-shadow: inset 0 0 0 2px rgba(37, 99, 235, .35);
}

/* 回收站列表行交互：与其他列表页一致，行点击进入操作面板。 */
.tickets-recycle-table tbody tr[data-ticket-recycle-row-open="ticket-recycle-actions"] {
    cursor: pointer;
}

.tickets-recycle-table tbody tr[data-ticket-recycle-row-open="ticket-recycle-actions"]:hover > td {
    background: rgba(14, 116, 144, .06);
}

.tickets-recycle-table tbody tr[data-ticket-recycle-row-open="ticket-recycle-actions"]:focus-visible > td {
    box-shadow: inset 0 0 0 2px rgba(14, 116, 144, .35);
}

.tickets-recycle-insights .tickets-insight-card__chip {
    background: rgba(14, 116, 144, 0.08);
    color: #0f766e;
}

/* 通知中心：筛选与列表间距、内容列宽收口。 */
.notifications-page-flow > .tickets-page-header {
    margin-bottom: .85rem !important;
}

.notifications-page-flow > .notifications-summary {
    margin-bottom: .78rem !important;
}

.notifications-page-flow > .tickets-insight-deck {
    margin-bottom: .82rem !important;
}

.notifications-page-flow > .tickets-filter-sticky-panel {
    margin-bottom: .82rem !important;
}

.notifications-page-flow > .table-scrollable {
    margin-top: .1rem;
}

.notifications-insights .tickets-insight-card__chip {
    background: rgba(14, 165, 233, 0.08);
    color: #0f766e;
}

.notifications-insights .tickets-insight-card__actions .btn {
    min-height: 34px;
}

.notifications-filter-form .form-control,
.notifications-filter-form .form-select {
    min-height: var(--ticket-filter-control-height);
}

.notifications-actions-bar {
    border-top: 1px dashed rgba(15, 23, 42, 0.14);
    padding-top: .68rem;
}

.notifications-center-table {
    min-width: 980px;
}

.notifications-center-table td:nth-child(3) {
    min-width: 320px;
}

/* 工单列表页头工具按钮：在窄屏自动换行，避免按钮挤压标题。 */
.tickets-list-header__actions {
    justify-content: flex-end;
}

/* 三类工单分页区统一：摘要与分页器保持一致间距和对齐。 */
.tickets-pagination-summary {
    gap: .75rem;
    padding: .5rem .7rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: .7rem;
    background: rgba(248, 250, 252, 0.92);
    margin-bottom: .3rem !important;
}

.tickets-pagination-summary .text-muted.small {
    line-height: 1.35;
    font-variant-numeric: tabular-nums;
}

.tickets-pagination-nav {
    margin-top: .75rem;
    display: flex;
    justify-content: flex-end;
}

.tickets-pagination-list {
    margin-bottom: 0;
    gap: .22rem;
}

.tickets-pagination-list .page-item .page-link {
    min-width: 2rem;
    text-align: center;
    border-radius: .55rem;
    border-color: rgba(15, 23, 42, 0.14);
    color: #334155;
}

.tickets-pagination-list .page-item .page-link:hover {
    border-color: rgba(37, 99, 235, 0.42);
    color: #1e40af;
    background: #f8fbff;
}

.tickets-pagination-list .page-item.active .page-link {
    border-color: #2563eb;
    background: #2563eb;
    color: #fff;
    box-shadow: 0 6px 12px rgba(37, 99, 235, 0.2);
}

.tickets-pagination-list .page-item.disabled .page-link {
    color: #94a3b8;
    background: #f8fafc;
    border-color: rgba(148, 163, 184, 0.28);
}

.kpi-card {
    padding: 1.25rem;
    border-radius: 1rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #fff;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.04);
}

.kpi-card__label {
    font-size: .9rem;
}

.kpi-card__value {
    font-size: 1.75rem;
    font-weight: 600;
    margin: .35rem 0;
}

.kpi-card__trend {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.trend-badge {
    border-radius: 999px;
    padding: .2rem .65rem;
    font-size: .8rem;
    font-weight: 600;
}

.trend-up {
    color: #15803d;
    background: rgba(22, 163, 74, 0.15);
}

.trend-down {
    color: #b91c1c;
    background: rgba(239, 68, 68, 0.15);
}

.chart-card {
    border-radius: 1rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #fff;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-shadow: 0 15px 35px rgba(15, 23, 42, 0.05);
}

.chart-card__header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.chart-card__body {
    position: relative;
}

.chart-surface {
    width: 100%;
    height: 280px;
}

@media (max-width: 768px) {
    .chart-surface {
        height: 220px;
    }

    .report-filters__form {
        width: 100%;
    }

    .report-filters__form .input-group,
    .report-filters__form .form-select,
    .report-filters__form .btn {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

    .reports-subscription-form .form-control,
    .reports-subscription-form .form-select,
    .reports-subscription-form .btn,
    .reports-subscription-actions .btn {
        width: 100%;
    }

    .users-filter-form .form-control,
    .users-filter-form .form-select,
    .users-filter-form .btn,
    .tickets-all-filter-form .tickets-all-filter-field,
    .tickets-all-filter-form .form-control,
    .tickets-all-filter-form .form-select,
    .tickets-all-filter-form .tickets-all-filter-actions,
    .tickets-all-filter-form .btn,
    .tickets-pending-filter-form .form-control,
    .tickets-pending-filter-form .form-select,
    .tickets-pending-filter-form .btn,
    .tickets-list-filter-form .form-control,
    .tickets-list-filter-form .form-select,
    .tickets-list-filter-form .btn {
        width: 100%;
    }

    .tickets-all-filter-form .tickets-all-filter-actions {
        display: flex;
        gap: .5rem;
    }

    .tickets-all-filter-form .tickets-all-filter-actions .btn {
        width: auto;
        flex: 1 1 0;
    }

    .tickets-filter-action-col .btn {
        min-height: 0;
    }

    .tickets-list-header__actions {
        width: 100%;
        justify-content: flex-start;
    }

    .tickets-page-flow > .tickets-page-header,
    .tickets-page-flow > .pending-summary,
    .tickets-page-flow > .tickets-filter-sticky-panel {
        margin-bottom: .7rem !important;
    }

    .tickets-active-filters {
        padding: .5rem;
    }

    .ticket-table-empty-state__actions {
        width: 100%;
    }

    .ticket-table-empty-state__actions .btn {
        width: 100%;
    }

    .tickets-pagination-summary {
        flex-direction: column;
        align-items: flex-start !important;
        padding: .45rem .5rem;
    }

    .tickets-pagination-nav .tickets-pagination-list {
        justify-content: flex-start !important;
    }

    .reports-page-flow .tickets-page-header,
    .integrations-page-flow .tickets-page-header,
    .integrations-test-page-flow .tickets-page-header,
    .task-logs-page-flow .tickets-page-header {
        margin-bottom: .7rem !important;
    }

    .report-filter-sticky-panel .tickets-filter-toolbar,
    .integrations-test-sticky-panel .tickets-filter-toolbar,
    .integration-center-toolbar,
    .task-logs-toolbar {
        width: 100%;
    }

    .integration-center-toolbar .btn,
    .integrations-test-sticky-panel .btn,
    .task-logs-toolbar .btn {
        width: 100%;
    }

    .task-logs-filter-form .form-control,
    .task-logs-filter-form .form-select,
    .task-logs-filter-actions .btn {
        width: 100%;
    }
}

/* ===== 系统集成面板 ===== */
.integration-card {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}

.integration-form {
    margin-top: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.integration-status {
    border-radius: 999px;
    padding: .25rem .75rem;
    font-size: .85rem;
    font-weight: 600;
}

.integration-status--success {
    background: rgba(34, 197, 94, 0.15);
    color: #15803d;
}

.integration-status--warning {
    background: rgba(249, 115, 22, 0.15);
    color: #b45309;
}

.integration-status--info {
    background: rgba(59, 130, 246, 0.15);
    color: #1d4ed8;
}

.integration-switches {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    padding: .5rem 0;
}

.integration-jobs {
    margin: 0;
}

.integration-jobs__item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .75rem 0;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.integration-jobs__item:last-child {
    border-bottom: none;
}

/* ===== 待确认快速编辑侧边栏 ===== */
.ticket-edit-drawer {
    position: fixed;
    inset: 0;
    display: none;
    justify-content: flex-end;
    z-index: 2050;
}

.ticket-edit-drawer.is-visible {
    display: flex;
}

.ticket-edit-drawer__overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}

.ticket-edit-drawer__panel {
    position: relative;
    z-index: 1;
    width: min(560px, 94vw);
    height: 100vh;
    max-height: 100vh;
    background: #fff;
    box-shadow: -18px 0 38px rgba(15, 23, 42, 0.18);
    padding: 1rem 1.1rem;
    display: flex;
    flex-direction: column;
}

.ticket-edit-drawer__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: .85rem;
    padding-bottom: .75rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.ticket-edit-drawer__body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-top: .9rem;
}

.ticket-edit-drawer__body .form-control,
.ticket-edit-drawer__body .form-select {
    min-height: var(--ticket-filter-control-height);
}

.ticket-edit-drawer__body textarea.form-control {
    resize: vertical;
}

.ticket-edit-drawer__footer {
    position: sticky;
    bottom: 0;
    display: flex;
    justify-content: flex-end;
    gap: .75rem;
    padding-top: .75rem;
    background: #fff;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
}

/* ===== 模态框 ===== */
.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal.is-visible {
    display: flex;
}

.modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}

.modal__dialog {
    position: relative;
    background: #fff;
    border-radius: 1rem;
    width: min(720px, 92vw);
    max-height: 90vh;
    overflow-y: auto;
    padding: 1.5rem;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.2);
    z-index: 1;
}

.modal__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.modal__body {
    margin-bottom: 0;
}

.workflow-actions-modal__header-actions {
    display: flex;
    align-items: center;
    gap: .65rem;
}

.workflow-actions-help-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.15rem;
    height: 2.15rem;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #f8fafc;
    color: #1e293b;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
    transition: background-color .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease;
}

.workflow-actions-help-toggle:hover,
.workflow-actions-help-toggle:focus-visible {
    border-color: #60a5fa;
    background: #eff6ff;
    color: #1d4ed8;
    box-shadow: 0 0 0 .2rem rgba(59, 130, 246, .12);
    outline: none;
}

.workflow-actions-help-toggle.is-active {
    border-color: #1d4ed8;
    background: #1d4ed8;
    color: #fff;
}

/* 账号操作弹框：统一 Tab 切换与分区容器样式，降低多动作并存时的视觉复杂度。 */
.user-actions-modal .modal__dialog {
    width: min(780px, 94vw);
}

.users-actions-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.users-actions-tabs .btn {
    min-width: 96px;
}

.users-actions-tabs .btn.active {
    color: #fff;
    background: #2563eb;
    border-color: #2563eb;
}

.users-actions-pane {
    border: 1px solid var(--bs-border-color);
    border-radius: .75rem;
    padding: .9rem;
    background: var(--bs-body-bg);
}

/* 任务日志操作弹框：统一 Tab 切换和上下文代码块样式。 */
.task-log-actions-modal .modal__dialog {
    width: min(1080px, 96vw);
}

.task-log-actions-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.task-log-actions-tabs .btn {
    min-width: 96px;
}

.task-log-actions-tabs .btn.active {
    color: #fff;
    background: #1d4ed8;
    border-color: #1d4ed8;
}

.task-log-actions-note {
    border: 1px dashed rgba(37, 99, 235, 0.18);
    border-radius: .9rem;
    line-height: 1.6;
}

.task-log-actions-pane {
    border: 1px solid var(--bs-border-color);
    border-radius: .75rem;
    padding: .9rem;
    background: var(--bs-body-bg);
}

.task-log-actions-context-json {
    padding: .6rem .7rem;
    border-radius: .6rem;
    border: 1px solid rgba(15, 23, 42, 0.1);
    background: #f8fafc;
    font-size: .78rem;
    line-height: 1.4;
    max-height: 260px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

/* 兼容旧样式选择器：历史合同测试与少量遗留页面仍可能引用该类名。 */
.task-run-logs-context-json {
    padding: .6rem .7rem;
    border-radius: .6rem;
    border: 1px solid rgba(15, 23, 42, 0.1);
    background: #f8fafc;
    font-size: .78rem;
    line-height: 1.4;
    max-height: 260px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

/* 通知操作弹框：与账号操作弹框保持同一 Tab 交互视觉。 */
.notification-actions-modal .modal__dialog {
    width: min(760px, 94vw);
}

.notifications-actions-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.notifications-actions-tabs .btn {
    min-width: 96px;
}

.notifications-actions-tabs .btn.active {
    color: #fff;
    background: #0f766e;
    border-color: #0f766e;
}

.notifications-actions-pane {
    border: 1px solid var(--bs-border-color);
    border-radius: .75rem;
    padding: .9rem;
    background: var(--bs-body-bg);
}

.notification-actions-note,
.user-actions-note {
    border: 1px dashed rgba(15, 23, 42, 0.14);
    border-radius: .75rem;
    background: rgba(248, 250, 252, 0.92);
    color: #475569;
}

/* 回收站操作弹框：统一 Tab 交互样式。 */
.ticket-recycle-actions-modal .modal__dialog {
    width: min(780px, 94vw);
}

.ticket-recycle-actions-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.ticket-recycle-actions-tabs .btn {
    min-width: 96px;
}

.ticket-recycle-actions-tabs .btn.active {
    color: #fff;
    background: #0f766e;
    border-color: #0f766e;
}

.ticket-recycle-actions-note {
    border: 1px dashed rgba(14, 116, 144, 0.22);
    border-radius: .9rem;
    color: #0f172a;
    line-height: 1.6;
}

.ticket-recycle-actions-pane {
    border: 1px solid var(--bs-border-color);
    border-radius: .75rem;
    padding: .9rem;
    background: var(--bs-body-bg);
}

/* 登录历史操作弹框：统一 Tab 交互样式。 */
.login-history-actions-modal .modal__dialog {
    width: min(760px, 94vw);
}

.login-history-actions-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.login-history-actions-tabs .btn {
    min-width: 96px;
}

.login-history-actions-tabs .btn.active {
    color: #fff;
    background: #1d4ed8;
    border-color: #1d4ed8;
}

.login-history-actions-pane {
    border: 1px solid var(--bs-border-color);
    border-radius: .75rem;
    padding: .9rem;
    background: var(--bs-body-bg);
}

.active-session-actions-note,
.login-history-actions-note,
.review-log-actions-note {
    border: 1px dashed rgba(15, 23, 42, 0.14);
    border-radius: .75rem;
    background: rgba(248, 250, 252, 0.92);
    color: #475569;
}

/* 活跃会话操作弹框：统一 Tab 交互样式。 */
.active-session-actions-modal .modal__dialog {
    width: min(760px, 94vw);
}

.active-session-actions-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.active-session-actions-tabs .btn {
    min-width: 96px;
}

.active-session-actions-tabs .btn.active {
    color: #fff;
    background: #0f766e;
    border-color: #0f766e;
}

.active-session-actions-pane {
    border: 1px solid var(--bs-border-color);
    border-radius: .75rem;
    padding: .9rem;
    background: var(--bs-body-bg);
}

/* 受信设备操作弹框：统一 Tab 交互样式。 */
.trusted-device-actions-modal .modal__dialog {
    width: min(760px, 94vw);
}

.trusted-device-actions-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.trusted-device-actions-tabs .btn {
    min-width: 96px;
}

.trusted-device-actions-tabs .btn.active {
    color: #fff;
    background: #0f766e;
    border-color: #0f766e;
}

.trusted-device-actions-pane {
    border: 1px solid var(--bs-border-color);
    border-radius: .75rem;
    padding: .9rem;
    background: var(--bs-body-bg);
}

/* 集成操作弹框：统一卡片动作入口，避免卡片底部按钮过载。 */
.integration-connector-actions-modal .modal__dialog {
    width: min(780px, 94vw);
}

.integration-connector-actions-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.integration-connector-actions-tabs .btn {
    min-width: 96px;
}

.integration-connector-actions-tabs .btn.active {
    color: #fff;
    background: #1d4ed8;
    border-color: #1d4ed8;
}

.integration-connector-actions-pane {
    border: 1px solid var(--bs-border-color);
    border-radius: .75rem;
    padding: .9rem;
    background: var(--bs-body-bg);
}

.review-log-actions-modal .modal__dialog {
    width: min(820px, calc(100vw - 2rem));
}

.review-log-actions-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.review-log-actions-tabs .btn {
    min-width: 96px;
}

.review-log-actions-tabs .btn.active {
    color: #fff;
    background: #1d4ed8;
    border-color: #1d4ed8;
}

.review-log-actions-pane {
    border: 1px solid var(--bs-border-color);
    border-radius: .75rem;
    padding: .9rem;
    background: var(--bs-body-bg);
}

.review-log-actions-tips {
    padding-left: 1.1rem;
    color: #475569;
}

.review-log-actions-tips li + li {
    margin-top: .45rem;
}

.review-log-actions-link-group .btn {
    min-height: 34px;
}

.review-logs-page-flow > .tickets-page-header {
    margin-bottom: .85rem !important;
}

.review-logs-page-flow > .pending-summary,
.review-logs-page-flow > .tickets-insight-deck,
.review-logs-page-flow > .tickets-filter-sticky-panel {
    margin-bottom: .82rem !important;
}

.review-logs-summary .pending-summary__item {
    min-height: 72px;
    justify-content: center;
}

.review-logs-insights .tickets-insight-card__chip {
    background: rgba(30, 64, 175, 0.08);
    color: #1d4ed8;
}

.review-logs-insights .tickets-insight-card__actions .btn {
    min-height: 34px;
}

.review-logs-page-flow .review-logs-filter-form .form-control,
.review-logs-page-flow .review-logs-filter-form .form-select {
    min-height: var(--ticket-filter-control-height);
}

/* 工单行级操作弹框：放大画布并统一摘要、分区与卡片交互。 */
.repair-actions-modal .modal__dialog,
.replace-actions-modal .modal__dialog,
.reship-actions-modal .modal__dialog,
.tickets-all-actions-modal .modal__dialog {
    width: min(1040px, 96vw);
}

.repair-actions-tabs,
.replace-actions-tabs,
.reship-actions-tabs,
.tickets-all-actions-tabs,
.rma-link-actions-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.repair-actions-tabs .btn,
.replace-actions-tabs .btn,
.reship-actions-tabs .btn,
.tickets-all-actions-tabs .btn,
.rma-link-actions-tabs .btn {
    min-width: 96px;
}

.repair-actions-tabs .btn.active,
.replace-actions-tabs .btn.active,
.reship-actions-tabs .btn.active,
.tickets-all-actions-tabs .btn.active,
.rma-link-actions-tabs .btn.active {
    color: #fff;
    background: #1d4ed8;
    border-color: #1d4ed8;
}

.repair-actions-pane,
.replace-actions-pane,
.reship-actions-pane,
.tickets-all-actions-pane,
.rma-link-actions-pane {
    border: 1px solid var(--bs-border-color);
    border-radius: .9rem;
    padding: 1rem;
    background: var(--bs-body-bg);
}

.workflow-actions-summary {
    border: 1px solid #dbe4f0;
    border-radius: 1rem;
    padding: 1rem 1.1rem;
    background:
        radial-gradient(circle at top right, rgba(59, 130, 246, .08), transparent 34%),
        linear-gradient(180deg, #f8fbff 0%, #f4f7fb 100%);
}

.workflow-actions-summary__head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .9rem;
}

.workflow-actions-summary__eyebrow {
    color: #475569;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.workflow-actions-summary__ticket {
    color: #0f172a;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.35;
}

.workflow-actions-summary__subtitle {
    color: #64748b;
    font-size: .875rem;
    line-height: 1.5;
    max-width: 44rem;
}

.workflow-actions-summary__badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .5rem;
    align-self: flex-start;
}

.workflow-actions-chip {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    padding: .35rem .75rem;
    border: 1px solid #dbe4f0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .82);
    color: #1e293b;
    font-size: .8125rem;
    font-weight: 600;
    line-height: 1.2;
}

.workflow-actions-summary__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .75rem;
}

.workflow-actions-summary__item {
    display: flex;
    flex-direction: column;
    gap: .3rem;
    min-width: 0;
    padding: .85rem .9rem;
    border: 1px solid #e2e8f0;
    border-radius: .85rem;
    background: rgba(255, 255, 255, .88);
}

.workflow-actions-summary__item--wide {
    grid-column: span 2;
}

.workflow-actions-summary__label {
    color: #64748b;
    font-size: .75rem;
    font-weight: 600;
    line-height: 1.3;
}

.workflow-actions-insights {
    display: flex;
    flex-direction: column;
    gap: .95rem;
}

.workflow-actions-progress {
    border: 1px solid #dbe4f0;
    border-radius: 1rem;
    padding: 1rem 1.05rem;
    background:
        radial-gradient(circle at top right, rgba(16, 185, 129, .08), transparent 30%),
        linear-gradient(180deg, #f8fffc 0%, #f4fbf8 100%);
}

.workflow-actions-progress__head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: .85rem;
    margin-bottom: .9rem;
}

.workflow-actions-progress__eyebrow {
    color: #0f766e;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.workflow-actions-progress__title {
    color: #0f172a;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
}

.workflow-actions-progress__intro {
    color: #4b5563;
    font-size: .83rem;
    line-height: 1.55;
    max-width: 46rem;
}

.workflow-actions-progress__current {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    padding: .35rem .8rem;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    background: rgba(255, 255, 255, .9);
    color: #1d4ed8;
    font-size: .8125rem;
    font-weight: 700;
    line-height: 1.25;
}

.workflow-actions-progress__rail {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: .75rem;
}

.workflow-actions-progress__step {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: .45rem;
    min-width: 0;
    padding: .9rem .95rem;
    border: 1px solid #dbe4f0;
    border-radius: .95rem;
    background: rgba(255, 255, 255, .9);
    color: #94a3b8;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, color .18s ease;
}

.workflow-actions-progress__step.is-completed {
    border-color: #86efac;
    background: linear-gradient(180deg, #ffffff 0%, #f0fdf4 100%);
    color: #166534;
}

.workflow-actions-progress__step.is-current {
    border-color: #60a5fa;
    background: linear-gradient(180deg, #ffffff 0%, #eff6ff 100%);
    color: #1d4ed8;
    box-shadow: 0 12px 24px rgba(37, 99, 235, .08);
    transform: translateY(-1px);
}

.workflow-actions-progress__dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    border: 1px solid currentColor;
    background: rgba(255, 255, 255, .92);
    font-size: .78rem;
    font-weight: 700;
    line-height: 1;
}

.workflow-actions-progress__label {
    color: #0f172a;
    font-size: .84rem;
    font-weight: 700;
    line-height: 1.4;
}

.workflow-actions-progress__step.is-upcoming .workflow-actions-progress__label {
    color: #475569;
}

.workflow-actions-insight-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: .85rem;
}

.workflow-actions-insight-card {
    display: flex;
    flex-direction: column;
    gap: .45rem;
    min-width: 0;
    padding: .95rem 1rem;
    border: 1px solid #dbe4f0;
    border-radius: .95rem;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 8px 22px rgba(15, 23, 42, .04);
}

.workflow-actions-insight-card__label {
    color: #64748b;
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    line-height: 1.3;
}

.workflow-actions-insight-card__value {
    color: #0f172a;
    font-size: .95rem;
    font-weight: 700;
    line-height: 1.45;
}

.workflow-actions-insight-card__desc {
    color: #475569;
    font-size: .82rem;
    line-height: 1.55;
}

.workflow-actions-insight-card__button {
    align-self: flex-start;
    margin-top: auto;
}

.workflow-actions-help {
    border: 1px solid #cbd5e1;
    border-radius: 1rem;
    padding: 1rem 1.05rem;
    background:
        radial-gradient(circle at top left, rgba(14, 165, 233, .08), transparent 30%),
        linear-gradient(180deg, #fffef8 0%, #fffdf5 100%);
}

.workflow-actions-help__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: .9rem;
}

.workflow-actions-help__eyebrow {
    color: #92400e;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.workflow-actions-help__title {
    color: #111827;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
}

.workflow-actions-help__intro {
    color: #4b5563;
    font-size: .84rem;
    line-height: 1.55;
    max-width: 46rem;
}

.workflow-actions-help__context {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .7rem;
    margin-bottom: .95rem;
}

.workflow-actions-help__context-item {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    min-width: 0;
    padding: .75rem .85rem;
    border: 1px solid #e5e7eb;
    border-radius: .85rem;
    background: rgba(255, 255, 255, .92);
}

.workflow-actions-help__context-label {
    color: #6b7280;
    font-size: .75rem;
    font-weight: 600;
    line-height: 1.3;
}

.workflow-actions-help__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: .85rem;
}

.workflow-actions-help__section {
    min-width: 0;
    padding: .9rem .95rem;
    border: 1px solid #e5e7eb;
    border-radius: .9rem;
    background: rgba(255, 255, 255, .94);
}

.workflow-actions-help__section-title {
    margin-bottom: .65rem;
    color: #111827;
    font-size: .92rem;
    font-weight: 700;
    line-height: 1.4;
}

.workflow-actions-help__list {
    margin: 0;
    padding-left: 1.1rem;
    color: #374151;
    font-size: .825rem;
    line-height: 1.6;
}

.workflow-actions-help__items {
    display: flex;
    flex-direction: column;
    gap: .7rem;
}

.workflow-actions-help__item {
    display: flex;
    flex-direction: column;
    gap: .18rem;
}

.workflow-actions-help__item-title {
    color: #111827;
    font-size: .84rem;
    font-weight: 700;
    line-height: 1.4;
}

.workflow-actions-help__item-desc {
    color: #4b5563;
    font-size: .81rem;
    line-height: 1.55;
}

.workflow-actions-help__footnote {
    margin-top: .95rem;
    color: #6b7280;
    font-size: .78rem;
    line-height: 1.5;
}

.workflow-actions-pane__stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.workflow-actions-section {
    border: 1px solid #e2e8f0;
    border-radius: .9rem;
    padding: 1rem;
    background: #fff;
}

.workflow-actions-section__head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: .75rem;
    margin-bottom: .9rem;
}

.workflow-actions-section__title {
    color: #0f172a;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
}

.workflow-actions-section__subtitle {
    color: #64748b;
    font-size: .825rem;
    line-height: 1.5;
}

.workflow-actions-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: .9rem;
}

.workflow-actions-card {
    display: flex;
    flex-direction: column;
    gap: .9rem;
    min-height: 100%;
    padding: 1rem;
    border: 1px solid #dbe4f0;
    border-radius: .9rem;
    background:
        linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 8px 22px rgba(15, 23, 42, .04);
    transition: border-color .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.workflow-actions-card:hover {
    border-color: #bfdbfe;
    box-shadow: 0 12px 28px rgba(37, 99, 235, .08);
}

.workflow-actions-card.is-disabled {
    opacity: .72;
    border-color: #e2e8f0;
    box-shadow: none;
}

.workflow-actions-card--danger {
    background:
        linear-gradient(180deg, #fff7f7 0%, #fffafa 100%);
    border-color: #fecaca;
}

.workflow-actions-card__title {
    color: #0f172a;
    font-size: .95rem;
    font-weight: 700;
    line-height: 1.35;
}

.workflow-actions-card__desc {
    margin-top: .2rem;
    color: #475569;
    font-size: .825rem;
    line-height: 1.55;
}

.workflow-actions-card__status {
    min-height: 2.8rem;
    padding: .7rem .8rem;
    border-radius: .8rem;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: .8125rem;
    line-height: 1.45;
}

.workflow-actions-card.is-disabled .workflow-actions-card__status {
    background: #f8fafc;
    color: #64748b;
}

.workflow-actions-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: auto;
}

.workflow-actions-card__button {
    min-width: 8.25rem;
}

/* 售后链接弹框沿用旧结构，但仍保持较宽画布。 */
.rma-link-actions-modal .modal__dialog {
    width: min(900px, 96vw);
}

.rma-link-actions-note {
    border: 1px dashed rgba(15, 23, 42, 0.14);
    border-radius: .75rem;
    background: rgba(248, 250, 252, 0.92);
    color: #475569;
}

@media (max-width: 991.98px) {
    .workflow-actions-summary__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .workflow-actions-summary__item--wide {
        grid-column: span 2;
    }

    .workflow-actions-help__context {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .workflow-actions-progress__rail {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .tickets-insight-card {
        padding: .85rem;
    }

    .tickets-insight-card__metric-grid {
        grid-template-columns: 1fr;
    }

    .workflow-actions-summary,
    .workflow-actions-progress,
    .workflow-actions-insight-card,
    .workflow-actions-help,
    .pending-actions-pane,
    .repair-actions-pane,
    .replace-actions-pane,
    .reship-actions-pane,
    .tickets-all-actions-pane,
    .rma-link-actions-pane,
    .workflow-actions-section {
        padding: .85rem;
    }

    .workflow-actions-summary__grid,
    .workflow-actions-progress__rail,
    .workflow-actions-insight-grid,
    .workflow-actions-help__context,
    .workflow-actions-card-grid {
        grid-template-columns: 1fr;
    }

    .workflow-actions-summary__item--wide {
        grid-column: span 1;
    }

    .workflow-actions-chip,
    .workflow-actions-card__button,
    .workflow-actions-insight-card__button {
        width: 100%;
        justify-content: center;
    }
}

.ticket-notify-section {
    border-color: #e2e8f0 !important;
    background: #f8fafc;
}

.ticket-notify-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .75rem;
}

.ticket-notify-section__subtitle {
    color: #64748b;
    font-size: .8125rem;
    line-height: 1.35;
}

/* 工单弹框表单：统一标签行高、控件高度与中英文混排对齐。 */
.ticket-modal-form > .border.rounded.p-3 {
    padding: 1rem !important;
    border-color: #e2e8f0 !important;
    border-radius: .75rem !important;
}

/* 分区卡片头部与标题：统一节奏，保证取件/寄件流程视觉层级一致。 */
.ticket-modal-form > .border.rounded.p-3 > .d-flex.justify-content-between.align-items-start.mb-3 {
    align-items: flex-start !important;
    gap: .75rem;
    margin-bottom: .75rem !important;
}

.ticket-modal-form > .border.rounded.p-3 > .d-flex.justify-content-between.align-items-start.mb-3 h6,
.ticket-notify-section__header h6 {
    margin-bottom: .25rem !important;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
    color: #0f172a;
}

.ticket-modal-form > .border.rounded.p-3 > .d-flex.justify-content-between.align-items-start.mb-3 .text-muted.small,
.ticket-notify-section__subtitle {
    font-size: .8125rem;
    line-height: 1.35;
    color: #64748b !important;
}

.ticket-modal-form .form-label {
    display: block;
    margin-bottom: .375rem;
    line-height: 1.35;
    font-weight: 600;
    color: #334155;
    word-break: break-word;
}

.ticket-modal-form .form-control,
.ticket-modal-form .form-select {
    width: 100%;
    min-height: 2.5rem;
    line-height: 1.4;
}

.ticket-modal-form textarea.form-control {
    min-height: 5.25rem;
    line-height: 1.45;
    resize: vertical;
}

.ticket-modal-form .form-control::placeholder,
.ticket-modal-form .form-select::placeholder {
    color: #94a3b8;
}

/* 弹框状态标签：统一必填/可选/Mock/数据库语义色，减少跨页视觉差异。 */
.ticket-modal-form .ticket-modal-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3.3rem;
    margin-left: .5rem;
    padding: .3125rem .625rem;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
    line-height: 1;
}

.ticket-modal-form .ticket-modal-badge--required {
    color: #1d4ed8;
    background: #dbeafe;
    border-color: #bfdbfe;
}

.ticket-modal-form .ticket-modal-badge--optional {
    color: #475569;
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.ticket-modal-form .ticket-modal-badge--mock {
    color: #c2410c;
    background: #ffedd5;
    border-color: #fed7aa;
}

.ticket-modal-form .ticket-modal-badge--system {
    color: #0f766e;
    background: #ecfeff;
    border-color: #a5f3fc;
}

.ticket-time-summary {
    display: flex;
    flex-direction: column;
    gap: .375rem;
    padding: .875rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: .75rem;
    background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
}

.ticket-time-summary__title {
    font-size: .8125rem;
    font-weight: 700;
    line-height: 1.35;
    color: #0f172a;
}

.ticket-time-summary__body {
    font-size: .9375rem;
    line-height: 1.55;
    color: #1e293b;
}

.ticket-time-summary__meta {
    font-size: .8125rem;
    line-height: 1.5;
    color: #475569;
}

.ticket-time-summary--ship {
    background: linear-gradient(135deg, #f8fafc 0%, #ecfeff 100%);
}

.ticket-time-summary.is-valid {
    border-color: #bfdbfe;
}

.ticket-time-summary.is-invalid {
    border-color: #fecaca;
    background: linear-gradient(135deg, #fef2f2 0%, #fff7ed 100%);
}

.ticket-time-summary.is-invalid .ticket-time-summary__body {
    color: #b91c1c;
}

.ticket-customs-preview {
    display: flex;
    flex-direction: column;
    gap: .9rem;
    padding: 1rem 1.05rem;
    border: 1px solid #dbe4f0;
    border-radius: .9rem;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.ticket-customs-preview__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
}

.ticket-customs-preview__title {
    color: #0f172a;
    font-size: .92rem;
    font-weight: 700;
    line-height: 1.35;
}

.ticket-customs-preview__subtitle {
    color: #64748b;
    font-size: .78rem;
    line-height: 1.55;
    max-width: 40rem;
}

.ticket-customs-preview__status {
    color: #475569;
    font-size: .82rem;
    line-height: 1.6;
}

.ticket-customs-preview__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: .75rem;
}

.ticket-customs-preview__item {
    display: flex;
    flex-direction: column;
    gap: .3rem;
    min-width: 0;
    padding: .8rem .85rem;
    border: 1px solid #e2e8f0;
    border-radius: .8rem;
    background: rgba(255, 255, 255, .95);
}

.ticket-customs-preview__label {
    color: #64748b;
    font-size: .74rem;
    font-weight: 600;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.ticket-customs-preview__value {
    color: #0f172a;
    font-size: .9rem;
    font-weight: 700;
    line-height: 1.45;
    word-break: break-word;
}

/* 待确认页邮寄弹框：独立控制宽度与草稿提示布局。 */
.ticket-shipping-modal .modal__dialog {
    width: min(760px, 94vw);
}

.ticket-shipping-modal [data-ticket-shipping-draft-alert] {
    margin-top: .25rem;
}

@media (min-width: 768px) {
    .ticket-modal-form .row.g-3 > [class*='col-md-'] > .form-label {
        min-height: 2.7em;
    }
}

.modal__footer {
    display: flex;
    justify-content: flex-end;
    gap: .75rem;
    margin-top: 1rem;
}

.btn-close {
    /* 自定义弹框使用纯按钮结构，兜底渲染可见的“×”图标，避免背景图被覆盖后不可见。 */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: none;
    border-radius: .375rem;
    background: transparent;
    padding: .25rem;
    line-height: 1;
    color: #94a3b8;
    cursor: pointer;
}

.btn-close::before {
    content: '\00d7';
    font-size: 1.4rem;
    font-weight: 400;
    line-height: 1;
    transform: translateY(-.04em);
}

.btn-close:hover {
    background-color: #f1f5f9;
    color: #1e293b;
}

.btn-close:focus-visible {
    outline: 2px solid rgba(59, 130, 246, .45);
    outline-offset: 2px;
}

body.modal-open {
    overflow: hidden;
}

@media (max-width: 768px) {
    .ticket-edit-drawer__panel {
        width: 100vw;
        padding: .95rem;
    }

    .ticket-edit-drawer__footer {
        flex-direction: column-reverse;
        align-items: stretch;
        gap: .55rem;
    }

    .ticket-edit-drawer__footer .btn {
        width: 100%;
    }

    .modal {
        padding: 1rem;
    }

    .modal__dialog {
        width: min(720px, 96vw);
        max-height: calc(100vh - 2rem);
        padding: 1rem;
        border-radius: .875rem;
    }

    .modal__header {
        margin-bottom: .75rem;
    }

    .users-actions-tabs .btn {
        flex: 1 1 calc(50% - .5rem);
        min-width: 0;
    }

    .notifications-actions-tabs .btn {
        flex: 1 1 calc(50% - .5rem);
        min-width: 0;
    }

    .task-log-actions-tabs .btn {
        flex: 1 1 calc(50% - .5rem);
        min-width: 0;
    }

    .ticket-recycle-actions-tabs .btn {
        flex: 1 1 calc(50% - .5rem);
        min-width: 0;
    }

    .login-history-actions-tabs .btn {
        flex: 1 1 calc(50% - .5rem);
        min-width: 0;
    }

    .active-session-actions-tabs .btn {
        flex: 1 1 calc(50% - .5rem);
        min-width: 0;
    }

    .integration-connector-actions-tabs .btn {
        flex: 1 1 calc(50% - .5rem);
        min-width: 0;
    }

    .modal__footer {
        margin-top: .75rem;
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .modal__footer .btn {
        width: 100%;
        margin-right: 0 !important;
    }

    .ticket-notify-section {
        padding: .875rem !important;
    }

    .ticket-notify-section__header {
        margin-bottom: .625rem;
    }

    .ticket-modal-form > .border.rounded.p-3 {
        padding: .875rem !important;
    }

    .ticket-modal-form > .border.rounded.p-3 > .d-flex.justify-content-between.align-items-start.mb-3 {
        margin-bottom: .625rem !important;
    }

    .ticket-modal-form .ticket-modal-badge {
        min-width: 3rem;
        margin-left: 0;
    }

    .ticket-shipping-modal .modal__dialog {
        width: min(760px, 96vw);
    }

    .ticket-shipping-modal .form-label.d-flex.justify-content-between.align-items-center {
        align-items: flex-start !important;
        gap: .375rem;
    }
}

/* 审核日志关键词高亮：在明细/聚合视图中突出命中片段。 */
.review-log-highlight {
    background: #fff3cd;
    color: #6b4f00;
    padding: 0 2px;
    border-radius: 3px;
}
