/* 农之翼后台设计系统：业务数据与接口保持不变，仅统一视觉与响应式行为 */
:root {
    --brand-950: #10243f;
    --brand-900: #17375e;
    --brand-800: #1e4e85;
    --brand-700: #2563eb;
    --brand-600: #2f80ed;
    --brand-500: #4ea1f3;
    --brand-100: #dbeafe;
    --brand-50: #eff6ff;
    --gold-600: #c56b16;
    --gold-500: #ea8a23;
    --ink-950: #17251f;
    --ink-800: #273a31;
    --ink-700: #40544a;
    --ink-600: #5f7067;
    --ink-500: #77867e;
    --danger-600: #dc2626;
    --warning-600: #b7791f;
    --info-600: #2563eb;
    --line: #e1eae4;
    --surface: #ffffff;
    --surface-muted: #f7faf8;
    --page-bg: #f5f7fb;
    --shadow-sm: 0 2px 9px rgba(16, 36, 63, .06);
    --shadow-md: 0 12px 28px rgba(16, 36, 63, .12);
    --radius-lg: 10px;
    --radius-md: 8px;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--page-bg); }

body {
    min-width: 320px;
    margin: 0;
    color: var(--ink-800);
    background: #f5f7fb;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; }

.app-layout { display: flex; min-height: 100vh; }

/* ==================== 左侧导航 ==================== */
.sidebar {
    display: flex;
    position: fixed;
    z-index: 160;
    top: 0;
    bottom: 0;
    left: 0;
    width: 260px;
    flex-direction: column;
    color: rgba(241, 246, 255, .84);
    background: linear-gradient(180deg, #10243f 0%, #0d1b30 100%);
    box-shadow: 8px 0 30px rgba(15, 23, 42, .16);
}

.sidebar-brand {
    display: flex;
    position: relative;
    min-height: 94px;
    align-items: center;
    padding: 18px 19px;
    border-bottom: 1px solid rgba(226, 232, 240, .12);
}

.brand-logo {
    width: 42px;
    height: 42px;
    margin-right: 11px;
    padding: 2px;
    object-fit: contain;
    border-radius: 10px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 5px 12px rgba(0, 0, 0, .17);
}

.brand-copy { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.brand-text { color: #fff; font-size: 18px; font-weight: 800; letter-spacing: .3px; }
.brand-subtitle { color: rgba(226, 232, 240, .62); font-size: 11px; font-weight: 650; }
.sidebar-online { position: relative; display: inline-flex; width: max-content; max-width: 100%; outline: none; }
.sidebar-online-summary { display: inline-flex; align-items: center; gap: 4px; color: rgba(226, 247, 234, .74); font-size: 10.5px; line-height: 1.2; cursor: default; }
.sidebar-online-summary i { color: #6ee7a2; font-size: 7px; }
.sidebar-online-summary strong { color: #eaffef; font-size: 11px; }
.sidebar-online:focus-visible .sidebar-online-summary { border-radius: 4px; outline: 2px solid rgba(244, 216, 137, .78); outline-offset: 3px; }
.sidebar-online-popover { position: absolute; z-index: 3; top: calc(100% + 8px); left: -7px; width: 220px; max-height: 180px; padding: 8px 9px; overflow-y: auto; visibility: hidden; border: 1px solid rgba(238,255,245,.2); border-radius: 9px; background: #163d2c; box-shadow: 0 10px 22px rgba(0,0,0,.28); opacity: 0; pointer-events: none; transform: translateY(-4px); transition: opacity .16s ease, transform .16s ease, visibility .16s; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.22) transparent; }
.sidebar-online:hover .sidebar-online-popover, .sidebar-online:focus .sidebar-online-popover { visibility: visible; opacity: 1; pointer-events: auto; transform: translateY(0); }
.sidebar-online-row { display: grid; min-width: 0; grid-template-columns: 6px minmax(0, 1fr) auto; align-items: center; gap: 6px; padding: 4px 0; color: rgba(239,251,244,.82); font-size: 11px; }
.presence-dot { width: 6px; height: 6px; border-radius: 50%; background: #6ee7a2; box-shadow: 0 0 0 3px rgba(110,231,162,.12); }
.sidebar-online-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-online-name small { margin-left: 3px; color: rgba(239,251,244,.52); font-size: 9px; }
.sidebar-online-name small + small { margin-left: 5px; }
.presence-duration { color: rgba(239,251,244,.48); font-size: 10px; white-space: nowrap; }
.sidebar-online-empty { padding: 3px 0; color: rgba(239,251,244,.5); font-size: 10.5px; }

.sidebar-nav { flex: 1; padding: 14px 12px 15px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.22) transparent; }
.nav-task-group { margin-bottom: 5px; border: 1px solid transparent; border-radius: 11px; }
.nav-task-group > summary {
    display: grid;
    min-height: 44px;
    grid-template-columns: 22px minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 8px;
    padding: 9px 11px;
    color: rgba(226, 232, 240, .82);
    border-radius: 10px;
    cursor: pointer;
    list-style: none;
    font-size: 13.5px;
    font-weight: 750;
}
.nav-task-group > summary::-webkit-details-marker { display: none; }
.nav-task-group > summary:hover { color: #fff; background: rgba(96, 165, 250, .12); }
.nav-task-group > summary:focus-visible { outline: 2px solid rgba(147, 197, 253, .9); outline-offset: 2px; }
.nav-task-group > summary > i:first-child { width: 20px; color: rgba(147, 197, 253, .9); font-size: 16px; text-align: center; }
.nav-task-group.is-current { border-color: rgba(96, 165, 250, .18); background: rgba(37, 99, 235, .09); }
.nav-task-group.is-current > summary { color: #fff; }
.nav-task-group-secondary { margin-top: 13px; padding-top: 8px; border-top-color: rgba(226, 232, 240, .12); border-radius: 0 0 11px 11px; }
.nav-task-chevron { font-size: 11px; transition: transform .18s ease; }
.nav-task-group[open] .nav-task-chevron { transform: rotate(180deg); }
.nav-task-count { min-width: 20px; padding: 2px 6px; color: #fff; border-radius: 999px; background: #dc2626; font-size: 10px; line-height: 1.4; text-align: center; }
.nav-task-links { padding: 2px 0 5px 7px; }
.nav-task-links .nav-item { min-height: 38px; margin-bottom: 1px; padding: 7px 10px; font-size: 12.5px; }
.nav-task-links .nav-item i { width: 18px; margin-right: 8px; font-size: 14px; }
.nav-task-links .nav-sub-item { padding-left: 34px; }
.nav-divider { margin: 11px 9px; border-top: 1px solid rgba(238, 255, 245, .13); }
.nav-section-label {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 16px 10px 7px;
    color: rgba(203, 213, 225, .62);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .12em;
}
.nav-section-label::before { width: 6px; height: 6px; border-radius: 2px; background: #ea8a23; content: ""; }
.nav-section-label:first-child { margin-top: 0; }

.nav-item {
    display: flex;
    min-height: 44px;
    align-items: center;
    margin-bottom: 2px;
    padding: 9px 12px;
    color: rgba(226, 232, 240, .76);
    border: 1px solid transparent;
    border-radius: 9px;
    font-size: 13.5px;
    font-weight: 500;
    text-decoration: none;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}

.nav-item:hover { color: #fff; background: rgba(96, 165, 250, .14); transform: translateX(2px); }
.nav-item.active { color: #0f172a; border-color: rgba(255,255,255,.5); background: #f8fafc; box-shadow: inset 4px 0 0 #ea8a23, 0 8px 18px rgba(0,0,0,.16); font-weight: 800; }
.nav-item i { width: 20px; margin-right: 10px; font-size: 17px; text-align: center; }
.nav-item .badge { margin-left: auto; font-size: 10px; }
.nav-item-approval { color: #fff5c7; border-color: rgba(251, 146, 60, .26); background: rgba(234, 88, 12, .24); box-shadow: inset 3px 0 0 #fb923c; font-weight: 700; }
.nav-item-approval:hover { color: #fff; background: rgba(234, 88, 12, .38); }
.nav-item-approval .badge { box-shadow: 0 2px 8px rgba(0,0,0,.2); }

.nav-item-group.active-group > .nav-item-row > .nav-item { color: #eaf2ff; background: rgba(37, 99, 235, .22); }
.nav-item-row { display: flex; align-items: stretch; }
.nav-item-row > .nav-item { flex: 1; }
.nav-toggle-btn { padding: 0 13px 0 4px; color: rgba(238,250,242,.65); border: none; border-radius: 0 10px 10px 0; background: transparent; cursor: pointer; transition: color .15s; }
.nav-toggle-btn:hover { color: #fff; }
.nav-toggle-btn i { display: inline-block; transition: transform .25s ease; }
.nav-item-group.collapsed .nav-toggle-btn i { transform: rotate(-90deg); }
.nav-submenu { max-height: 500px; overflow: hidden; opacity: 1; transition: max-height .3s ease, opacity .2s ease; }
.nav-item-group.collapsed .nav-submenu { max-height: 0; opacity: 0; }
.nav-sub-item { display: flex; align-items: center; margin: 2px 0; padding: 7px 10px 7px 39px; color: rgba(203,213,225,.66); border-radius: 8px; font-size: 12.5px; font-weight: 500; text-decoration: none; transition: background .18s, color .18s; }
.nav-sub-item:hover, .nav-sub-item.active { color: #fff; background: rgba(96,165,250,.13); }
.nav-sub-item.active { font-weight: 700; }
.nav-sub-item i { margin-right: 5px; font-size: 11px; }

.sidebar-footer { margin: 0 12px 13px; padding: 13px 8px 0; border-top: 1px solid rgba(238,255,245,.13); }
.user-info { color: #fff; font-size: 13px; font-weight: 600; }
.role-badge { padding: 2px 7px; color: #fed7aa; border: 1px solid rgba(251, 146, 60, .34); border-radius: 99px; background: rgba(234, 88, 12, .13); font-size: 10px; font-weight: 600; }
.sidebar-footer .btn-outline-light { color: rgba(239, 251, 244, .83); border-color: rgba(235, 251, 241, .25); border-radius: 8px; font-size: 12px; }
.sidebar-footer .btn-outline-light:hover { color: #fff; border-color: rgba(255,255,255,.55); background: rgba(255,255,255,.12); }

/* ==================== 内容区和通用组件 ==================== */
.main-content { width: calc(100% - 260px); min-height: 100vh; margin-left: 260px; padding: 30px 34px 42px; }
.main-content > .container-fluid { padding: 0; }

.page-header { margin-bottom: 23px; }
.page-header h2, .main-content h4 { margin: 0; color: var(--ink-950); font-size: 22px; font-weight: 750; letter-spacing: -.35px; }
.page-header h2 i { color: var(--brand-700); }
.page-header .text-muted { color: var(--ink-500) !important; }

.card, .stat-card {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, .95);
    border-radius: var(--radius-lg);
    background: rgba(255,255,255,.96);
    box-shadow: var(--shadow-sm);
}

.card { border: 1px solid rgba(226,232,240,.98); }
.card-header { padding: 12px 16px; color: var(--ink-800); border-bottom: 1px solid var(--line); border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important; background: #fbfdff; font-size: 13.5px; font-weight: 700; }
.card-body { padding: 16px; }
.card > .table-responsive:first-child .table { margin-bottom: 0; }

.stat-card { position: relative; min-height: 112px; padding: 17px 18px; }
.stat-card::before { position: absolute; top: 0; left: 0; width: 4px; height: 100%; background: var(--brand-600); content: ""; opacity: .9; }
.stat-card.text-center::before { width: 100%; height: 3px; }
.shop-card-hover { border: 1px solid var(--line); transition: transform .2s ease, box-shadow .2s ease, border-color .2s; }
.shop-card-hover:hover { border-color: #94c9a8; box-shadow: var(--shadow-md); transform: translateY(-3px); }
.stat-label { margin-bottom: 7px; color: var(--ink-500); font-size: 12px; font-weight: 600; }
.stat-value { color: var(--ink-950); font-size: clamp(22px, 2vw, 28px); font-weight: 750; letter-spacing: -.55px; line-height: 1.15; }
.stat-value.small-stat { font-size: clamp(20px, 1.8vw, 23px); }
.kpi-card { transition: transform .2s ease, box-shadow .2s ease; }
.kpi-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.kpi-card .stat-value { font-size: clamp(20px, 1.7vw, 24px); }
.section-title { padding-left: 4px; color: var(--ink-700); font-size: 14px; font-weight: 750; }
.fw-500 { font-weight: 600; }
.text-purple { color: #7555c7 !important; }

.btn { min-height: 34px; padding: 6px 12px; border-radius: var(--radius-md); font-size: 13px; font-weight: 600; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible, .form-control:focus, .form-select:focus, .nav-link:focus-visible { box-shadow: 0 0 0 3px rgba(39,155,102,.16); outline: none; }
.btn-sm { min-height: 30px; padding: 4px 9px; font-size: 12px; }
.btn-primary { border-color: var(--brand-700); background: linear-gradient(135deg, var(--brand-600), var(--brand-800)); box-shadow: 0 3px 7px rgba(25,119,73,.16); }
.btn-primary:hover, .btn-primary:focus { border-color: var(--brand-800); background: var(--brand-800); }
.btn-success { background: #21875b; border-color: #21875b; }
.btn-outline-primary { color: var(--brand-700); border-color: #88c7a3; }
.btn-outline-primary:hover { color: #fff; border-color: var(--brand-700); background: var(--brand-700); }
.btn-outline-secondary { color: #55675e; border-color: #c9d8cf; }
.btn-outline-secondary:hover { color: var(--brand-900); border-color: #93b9a3; background: var(--brand-50); }
.btn-group .btn-outline-secondary.active, .btn-group .btn-outline-secondary:active { color: #fff; border-color: var(--brand-700); background: var(--brand-700); }

.form-label { margin-bottom: 5px; color: var(--ink-600); font-size: 12px; font-weight: 600; }
.form-control, .form-select { min-height: 36px; padding: 7px 10px; color: var(--ink-800); border-color: #d5e1da; border-radius: var(--radius-md); background-color: #fff; font-size: 13px; }
.form-control::placeholder { color: #a2b0a7; }
.form-control:hover, .form-select:hover { border-color: #aac8b5; }
.form-control:focus, .form-select:focus { border-color: var(--brand-600); }
.form-control-sm, .form-select-sm { min-height: 32px; padding-top: 4px; padding-bottom: 4px; border-radius: 7px; font-size: 12px; }
.input-group-text { border-color: #d5e1da; background: var(--surface-muted); }

.nav-tabs { gap: 3px; border-bottom-color: #dbe7df; }
.nav-tabs .nav-link { margin-bottom: -1px; padding: 9px 13px; color: var(--ink-600); border: 0; border-bottom: 3px solid transparent; border-radius: 8px 8px 0 0; background: transparent; font-size: 13px; font-weight: 600; }
.nav-tabs .nav-link:hover { color: var(--brand-800); border-color: transparent; background: var(--brand-50); }
.nav-tabs .nav-link.active { color: var(--brand-800); border-bottom-color: var(--gold-500); background: transparent; }

.table { --bs-table-bg: transparent; --bs-table-hover-bg: #f4faf6; margin-bottom: 0; color: var(--ink-800); }
.table > :not(caption) > * > * { padding: 10px 12px; border-bottom-color: #e7eee9; }
.table th { color: var(--ink-500); background: #f8fbf9; border-bottom-width: 1px; font-size: 11.5px; font-weight: 700; letter-spacing: .1px; text-transform: none; white-space: nowrap; }
.table td { font-size: 13px; vertical-align: middle; }
.table-hover > tbody > tr { transition: background .15s ease; }
.table-light { --bs-table-bg: #f7faf8; }
.table-danger { --bs-table-bg: #fff6f5; }
.table-responsive { border-radius: inherit; -webkit-overflow-scrolling: touch; }
.table-auto-tools { display: flex; align-items: center; justify-content: flex-end; gap: 9px; margin: 0 0 8px; }
.table-auto-filter { width: min(230px, 100%); min-height: 32px; padding: 5px 9px; border: 1px solid #d5e1da; border-radius: 8px; background: #fff; color: var(--ink-800); font-size: 12px; }
.table-auto-filter:focus { border-color: var(--brand-600); box-shadow: 0 0 0 3px rgba(39,155,102,.13); outline: 0; }
.table-auto-summary { min-height: 18px; margin-top: 7px; color: var(--ink-500); font-size: 11.5px; text-align: right; }
.table th.table-auto-sortable { cursor: pointer; user-select: none; }
.table th.table-auto-sortable:hover { color: var(--brand-800); background: #eef8f1; }
.table th.table-auto-sortable:focus-visible { outline: 2px solid var(--brand-600); outline-offset: -2px; }
.table-auto-sort-indicator { display: inline-block; margin-left: 4px; color: #a5b6ab; font-size: 10px; }
.table-auto-sortable.is-sorted .table-auto-sort-indicator { color: var(--brand-700); font-weight: 800; }
.table-auto-filtered-out { display: none !important; }

/* 首页筛选栏：下拉框保留足够的右侧箭头空间，避免“全部店铺”等选项被覆盖。 */
.dashboard-filter-bar { min-width: 0; }
.dashboard-filter-field { flex: 0 0 auto; min-width: 142px; }
.dashboard-filter-select { width: 160px; padding-right: 2.35rem; background-position: right .72rem center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-date-range .form-control { width: 140px; }

.dashboard-period-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .8rem .95rem;
    border: 1px solid #dbe5ef;
    border-radius: 10px;
    background: #fff;
    color: #40544a;
    box-shadow: var(--shadow-sm);
    font-size: .85rem;
}
.dashboard-brief-values > div + div { border-left: 1px solid #edf0f4; }
.dashboard-brief-values > div:nth-child(3) { border-left: 0; }
.dashboard-brief-values > div:nth-child(n+3) { border-top: 1px solid #edf0f4; padding-top: .55rem; }
.brief-label { color: #64748b; font-size: .75rem; }
.brief-value { margin-top: .2rem; font-weight: 700; font-size: 1rem; }
.dashboard-alert-item { display: flex; align-items: flex-start; padding: .65rem .85rem; }
.dashboard-alert-item small { display: block; margin-top: .15rem; color: #64748b; font-size: .76rem; font-weight: 400; }
#dashboardInsights .card { border-color: #dbe5ef; box-shadow: 0 8px 20px rgba(16, 36, 63, .07); }
#dashboardInsights .card-header { min-height: 46px; background: #fbfdff; }
#kpiRow .kpi-card { min-height: 126px; background: linear-gradient(180deg, #fff 0%, #f8fbff 100%); }
#kpiRow .kpi-card::before { width: 5px; }
#kpiRow > div:nth-child(1) .kpi-card::before { background: #2563eb; }
#kpiRow > div:nth-child(2) .kpi-card::before { background: #0891b2; }
#kpiRow > div:nth-child(3) .kpi-card::before { background: #dc2626; }
#kpiRow > div:nth-child(4) .kpi-card::before { background: #16a34a; }
#kpiRow > div:nth-child(5) .kpi-card::before { background: #ea8a23; }
#kpiRow .stat-label { display: flex; align-items: center; gap: 7px; color: #475569; font-size: 12.5px; }
#kpiRow .stat-label i { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 8px; background: #eff6ff; font-size: 15px; }
#kpiRow .stat-value { margin-top: 12px; font-size: clamp(22px, 2.1vw, 30px); }

.sidebar-global-search { margin-top: auto; padding-top: .75rem; border-top: 1px solid rgba(255, 255, 255, .14); }
.global-search-result { display: flex; align-items: center; gap: .25rem; }
.global-search-result small { display: block; flex: 1 1 100%; margin-left: .15rem; color: #64748b; font-size: .76rem; }

/* 店铺经营概览的整月切换：桌面与手机上均保持一眼可用。 */
.overview-month-filter { background: linear-gradient(100deg, #f7fbff 0%, #fff 72%); }
.overview-month-filter select { min-width: 136px; }
.toolbar-surface,
.tab-pane > .d-flex.justify-content-between:first-child {
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(255,255,255,.78);
    box-shadow: var(--shadow-sm);
}
.tab-pane > .d-flex.justify-content-between:first-child .form-control-sm,
.tab-pane > .d-flex.justify-content-between:first-child .form-select-sm {
    min-height: 34px;
}
.table .btn-sm {
    display: inline-grid;
    min-width: 32px;
    place-items: center;
}
.badge.text-bg-warning,
.badge.bg-warning { color: #4d3100 !important; }

/* 商品与销售工作台：高密度信息保持清晰层级，业务逻辑仍由原模板负责。 */
.workspace-hero {
    display: flex;
    min-height: 112px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 20px;
    border: 1px solid #dbe5ef;
    border-top: 3px solid var(--gold-500);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow-sm);
}
.workspace-hero-copy { min-width: 0; }
.workspace-eyebrow { display: flex; align-items: center; gap: 6px; margin-bottom: 5px; color: var(--brand-700); font-size: 11px; font-weight: 800; }
.workspace-hero h2 { display: flex; min-width: 0; align-items: baseline; gap: 9px; font-size: 22px; letter-spacing: 0; }
.workspace-hero h2 small { min-width: 0; overflow: hidden; color: var(--ink-600); font-size: 15px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.workspace-hero-divider { color: #b6c2ce; font-weight: 400; }
.workspace-hero p { margin: 7px 0 0; color: var(--ink-500); font-size: 12.5px; }
.workspace-hero-stats { display: flex; flex: 0 0 auto; align-items: stretch; border: 1px solid #e2e8f0; border-radius: 8px; background: #f8fafc; }
.workspace-hero-stats > div { display: flex; min-width: 88px; flex-direction: column; justify-content: center; padding: 10px 15px; }
.workspace-hero-stats > div + div { border-left: 1px solid #e2e8f0; }
.workspace-hero-stats span { color: #64748b; font-size: 11px; }
.workspace-hero-stats strong { margin-top: 2px; color: var(--brand-950); font-size: 20px; line-height: 1.1; }
.workspace-hero-actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }

.workspace-tabs { gap: 8px; }
.workspace-tabs .nav-item { min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; transform: none; }
.workspace-tabs .nav-link { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding-right: 14px; padding-left: 14px; }
.workspace-tabs .nav-link i { color: #718096; font-size: 14px; }
.workspace-tabs .nav-link.active i { color: var(--gold-600); }

.workspace-toolbar {
    display: flex;
    min-height: 58px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 12px;
    border: 1px solid #dbe5ef;
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow-sm);
}
.workspace-filter-group, .workspace-toolbar-actions { display: flex; min-width: 0; align-items: center; flex-wrap: wrap; gap: 8px; }
.workspace-toolbar-actions { justify-content: flex-end; }
.workspace-search { width: min(300px, 40vw); }
.workspace-search .input-group-text { color: #64748b; border-right: 0; background: #fff; }
.workspace-search .form-control { border-left: 0; }
.workspace-search .form-control:focus { border-left: 0; box-shadow: none; }
.workspace-search:focus-within { border-radius: 8px; box-shadow: 0 0 0 3px rgba(37, 99, 235, .14); }
.workspace-search:focus-within .input-group-text, .workspace-search:focus-within .form-control { border-color: var(--brand-600); }
.workspace-select { width: 166px; }
.workspace-count { color: #64748b; font-size: 12px; font-weight: 650; white-space: nowrap; }
.workspace-money { color: #64748b; font-size: 12px; white-space: nowrap; }
.workspace-money strong { margin-left: 4px; color: var(--danger-600); font-size: 13px; }
.workspace-toolbar-title { display: block; color: var(--ink-950); font-size: 13px; }
.workspace-toolbar-note { display: block; margin-top: 2px; color: var(--ink-500); font-size: 11px; }

.workspace-table-wrap { border: 1px solid #dbe5ef; border-radius: 8px; background: #fff; box-shadow: var(--shadow-sm); }
.workspace-table > thead > tr > th { padding-top: 11px; padding-bottom: 11px; background: #f7f9fc; }
.workspace-table > tbody > tr:last-child > td { border-bottom: 0; }
.product-table { min-width: 980px; }
.supplier-table { min-width: 1260px; }
.selection-table { min-width: 1080px; }
.order-table { min-width: 1000px; }
.recent-order-table { min-width: 820px; }
.product-thumb, .product-thumb-placeholder { width: 42px; height: 42px; border-radius: 7px; }
.product-thumb { display: block; border: 1px solid #e2e8f0; object-fit: cover; cursor: pointer; }
.product-thumb-placeholder { display: grid; place-items: center; color: #94a3b8; border: 1px dashed #cbd5e1; background: #f8fafc; }
.product-table .sku-detail-trigger { max-width: 300px; color: var(--ink-800); font-weight: inherit; line-height: 1.42; }
.product-table .sku-detail-trigger:hover { color: var(--brand-700); }
.product-table code, .order-table code, .recent-order-table code { color: #334155; font-size: 11.5px; }
.workspace-empty { padding: 42px 16px !important; color: var(--ink-500); text-align: center; }
.workspace-empty i, .workspace-empty strong, .workspace-empty span { display: block; }
.workspace-empty i { margin-bottom: 8px; color: #94a3b8; font-size: 26px; }
.workspace-empty strong { color: var(--ink-700); font-size: 13px; }
.workspace-empty span { margin-top: 3px; font-size: 11.5px; }
.workspace-empty.standalone { display: flex; min-height: 170px; align-items: center; justify-content: center; flex-direction: column; border: 1px dashed #cbd5e1; border-radius: 8px; background: #fff; }
.modal-subtitle { margin-top: 2px; color: var(--ink-500); font-size: 11px; }

/* 流程与审批中心：复用工作台层级，保留原审批逻辑与表单结构。 */
.workflow-hero, .operations-hero, .approval-center-hero { min-height: 104px; }
.workflow-toolbar-copy { min-width: 210px; }
.workflow-toolbar .workspace-filter-group { flex: 1 1 auto; }
.workflow-tabs { overflow-x: auto; scrollbar-width: none; }
.workflow-tabs::-webkit-scrollbar { display: none; }
.workflow-list-panel { overflow: hidden; }
.workflow-table { min-width: 920px; }
.workflow-table-scroll-hint { display: none; }
.workflow-col-id { width: 70px; }
.workflow-col-amount { width: 110px; }
.workflow-col-owner { width: 110px; }
.workflow-col-step { width: 175px; }
.workflow-col-status { width: 90px; }
.workflow-col-time { width: 150px; }
.workflow-col-action { width: 90px; }
.workflow-record-id { color: #64748b; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
.workflow-record-title { color: var(--ink-950); font-weight: 700; }
.workflow-record-amount { font-variant-numeric: tabular-nums; font-weight: 700; }
.workflow-record-status .badge { min-width: 58px; }
.workflow-form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding-top: 14px; border-top: 1px solid #e8edf3; }
.workflow-form-actions .btn { margin: 0 !important; }
.workflow-action-panel { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 10px; }
.workflow-action-field { min-width: 180px; flex: 1 1 220px; }
.workflow-action-buttons { display: flex; align-items: center; gap: 7px; }
.workflow-action-panel > .alert { width: 100%; }
.workflow-timeline { padding-left: 8px; }
.wf-step { display: flex; position: relative; gap: 10px; padding-bottom: 16px; }
.wf-step:not(:last-child)::before { position: absolute; top: 24px; bottom: 0; left: 11px; width: 2px; background: #dbe5ef; content: ''; }
.wf-step.step-done:not(:last-child)::before { background: #198754; }
.wf-step-icon { z-index: 1; padding-top: 2px; font-size: 20px; line-height: 1; }
.wf-step-name { color: var(--ink-800); font-weight: 700; }
.step-current .wf-step-name { color: var(--brand-700); }
.step-rejected .wf-step-name { color: var(--danger-600); }

.approval-center-hero.has-pending { border-top-color: var(--gold-500); }
.approval-center-hero.is-clear { border-top-color: #16a34a; }
.approval-state-chip { display: inline-flex; min-height: 36px; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid; border-radius: 8px; font-size: 12px; font-weight: 750; white-space: nowrap; }
.approval-state-chip.has-pending { color: #92400e; border-color: #f6cf85; background: #fff8e8; }
.approval-state-chip.is-clear { color: #166534; border-color: #b7dfc4; background: #f0fdf4; }
.approval-summary-strip { display: grid; overflow: hidden; grid-template-columns: repeat(6, minmax(0, 1fr)); border: 1px solid #dbe5ef; border-radius: 8px; background: #fff; box-shadow: var(--shadow-sm); }
.approval-summary-strip > div { display: grid; min-width: 0; grid-template-columns: 32px minmax(0, 1fr); align-items: center; gap: 9px; padding: 12px 13px; }
.approval-summary-strip > div + div { border-left: 1px solid #e8edf3; }
.approval-summary-strip i { display: grid; width: 32px; height: 32px; place-items: center; color: var(--brand-700); border-radius: 8px; background: var(--brand-50); font-size: 15px; }
.approval-summary-strip span, .approval-summary-strip small, .approval-summary-strip strong { display: block; min-width: 0; }
.approval-summary-strip small { overflow: hidden; color: #64748b; font-size: 10.5px; text-overflow: ellipsis; white-space: nowrap; }
.approval-summary-strip strong { margin-top: 1px; color: var(--brand-950); font-size: 19px; line-height: 1.05; }
.approval-summary-strip .is-total i { color: #9a580d; background: #fff7e6; }
.approval-section { border-radius: 8px; box-shadow: var(--shadow-sm); }
.approval-section .card-header { min-height: 48px; border-bottom-color: #e8edf3; background: #fbfdff; }
.approval-section .card-header > span:first-child { color: var(--ink-950); }
.approval-section .table { min-width: 700px; }
.approval-section .list-group-item { padding: 13px 15px; border-color: #e8edf3; }
.approval-money { font-variant-numeric: tabular-nums; }

.operations-hero .workspace-hero-copy { flex: 1 1 auto; }
.operations-hero .workspace-hero-stats { margin-left: auto; }
.operations-panel .card-header > span:first-child { display: flex; min-width: 0; align-items: center; }
.operations-panel .card-header small { display: block; margin-left: 8px; color: var(--ink-500); font-size: 10.5px; font-weight: 500; }
.operations-panel .table-responsive::before { display: none; }
.operations-primary { min-width: 150px; }
.operations-amount { font-variant-numeric: tabular-nums; }
.operations-status .badge { white-space: nowrap; }
.operations-action .btn { white-space: nowrap; }

/* 人力与审计后台：统一高密度工作台层级，移动端将宽表重排为记录卡片。 */
.hr-hero, .audit-hero { min-height: 104px; }
.hr-hero .workspace-hero-copy, .audit-hero .workspace-hero-copy { flex: 1 1 auto; }
.hr-hero .workspace-hero-stats, .audit-hero .workspace-hero-stats { margin-left: auto; }
.audit-admin-value { font-size: 14px !important; line-height: 1.25 !important; }
.hr-tabs { overflow-x: auto; scrollbar-width: none; }
.hr-tabs::-webkit-scrollbar { display: none; }
.hr-search, .audit-search { width: min(320px, 34vw); }
.hr-employee-row.filtered-out, .audit-log-row.filtered-out { display: none !important; }
.hr-panel { overflow: hidden; border-color: #dbe5ef; border-radius: 8px; box-shadow: var(--shadow-sm); }
.hr-panel-header { min-height: 48px; border-bottom-color: #e8edf3; background: #fbfdff; }
.hr-panel-header > div > small { display: block; margin-top: 2px; color: var(--ink-500); font-size: 10.5px; font-weight: 500; }
.hr-panel .list-group-item { border-color: #e8edf3; }
.hr-department-row { min-height: 54px; }
.hr-context-note { line-height: 1.55; }
.hr-employee-table { min-width: 1120px; }
.hr-position-table { min-width: 920px; }
.hr-task-table { min-width: 700px; }
.hr-attendance-table { min-width: 640px; }
.hr-employee-table code, .audit-log-table code { color: #334155; font-size: 11.5px; }
.hr-employee-position, .hr-position-permissions { white-space: normal !important; }
.hr-employee-salary, .hr-position-salary { font-variant-numeric: tabular-nums; white-space: nowrap; }
.hr-position-permissions { min-width: 210px; }
.hr-task-main { min-width: 220px; white-space: normal !important; }
.hr-task-main small { display: block; margin-top: 2px; line-height: 1.4; }
.hr-task-summary { height: 100%; }
.hr-task-stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: hidden; border: 1px solid #e8edf3; border-radius: 8px; }
.hr-task-stat-grid > div { padding: 13px; }
.hr-task-stat-grid > div:nth-child(even) { border-left: 1px solid #e8edf3; }
.hr-task-stat-grid > div:nth-child(n+3) { border-top: 1px solid #e8edf3; }
.hr-task-stat-grid span, .hr-task-stat-grid strong { display: block; }
.hr-task-stat-grid span { color: var(--ink-500); font-size: 10.5px; }
.hr-task-stat-grid strong { margin-top: 3px; color: var(--ink-950); font-size: 20px; }
.hr-attendance-form { padding-bottom: 13px; border-bottom: 1px solid #e8edf3; }
.hr-attendance-form .form-label { margin-bottom: 4px; color: var(--ink-600); font-weight: 700; }
.position-permission { cursor: pointer; }
.position-permission + * { cursor: pointer; }

.audit-hero .workspace-hero-actions { margin-left: 0; }
.audit-panel { overflow: hidden; }
.audit-log-table { min-width: 920px; }
.audit-time { color: #475569; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-variant-numeric: tabular-nums; }
.audit-user { min-width: 90px; }
.audit-target { min-width: 150px; max-width: 280px; white-space: normal !important; }
.audit-detail { min-width: 220px; max-width: 390px; line-height: 1.45; white-space: normal !important; }
.audit-action .badge { min-width: 52px; }

.workspace-period-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; color: #64748b; border: 1px solid #dbe5ef; border-radius: 8px; background: #fff; box-shadow: var(--shadow-sm); font-size: 11.5px; }
.workspace-period-main { display: flex; align-items: center; gap: 8px; }
.workspace-period-main > i { color: var(--brand-700); font-size: 15px; }
.workspace-period-main label { color: var(--ink-700); font-size: 12px; font-weight: 700; white-space: nowrap; }
.workspace-period-main select { width: 145px; }
.sales-kpi-card { min-height: 122px; background: #fff; }
.sales-kpi-card::before { width: 4px; }
.sales-kpi-card[data-tone="blue"]::before { background: #2563eb; }
.sales-kpi-card[data-tone="cyan"]::before { background: #0891b2; }
.sales-kpi-card[data-tone="green"]::before { background: #16a34a; }
.sales-kpi-card[data-tone="red"]::before { background: #dc2626; }
.sales-kpi-card[data-tone="gold"]::before { background: var(--gold-500); }
.sales-kpi-card .stat-label { display: flex; align-items: center; gap: 7px; color: #64748b; }
.sales-kpi-card .stat-label i { display: grid; width: 27px; height: 27px; place-items: center; color: var(--brand-700); border-radius: 7px; background: var(--brand-50); font-size: 14px; }
.sales-kpi-card .stat-value { margin-top: 10px; }
.sales-kpi-card .stat-meta { margin-top: 5px; color: #94a3b8; font-size: 10.5px; }
.sales-chart-card { height: 100%; }
.sales-chart-card .card-header { color: #334155; background: #f8fafc; }

.workspace-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.workspace-section-heading h5 { margin: 0; color: var(--ink-950); font-size: 15px; font-weight: 750; }
.workspace-section-heading p { margin: 3px 0 0; color: var(--ink-500); font-size: 11.5px; }
.sales-store-link { display: block; height: 100%; color: inherit; text-decoration: none; }
.sales-store-card { height: 100%; border-color: #dbe5ef; }
.sales-store-card:hover { border-color: #93b4df; }
.sales-store-card .card-body { padding: 15px 16px; }
.sales-store-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.sales-store-head h6 { margin: 0; color: var(--brand-950); font-size: 14px; font-weight: 750; }
.sales-store-head > i { color: #94a3b8; }
.sales-store-tags { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 6px; color: #64748b; font-size: 11px; }
.sales-store-tags > span:not(.badge) { display: inline-flex; align-items: center; gap: 3px; }
.sales-store-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-top: 13px; padding-top: 12px; border-top: 1px solid #edf1f5; }
.sales-store-metrics > div { min-width: 0; padding: 0 10px; }
.sales-store-metrics > div:first-child { padding-left: 0; }
.sales-store-metrics > div + div { border-left: 1px solid #edf1f5; }
.sales-store-metrics span, .sales-store-metrics strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sales-store-metrics span { color: #7b8794; font-size: 10px; }
.sales-store-metrics strong { margin-top: 3px; color: #334155; font-size: 12.5px; }
.sales-import-card { max-width: 900px; }
.sales-import-heading { display: flex; align-items: center; gap: 11px; margin-bottom: 17px; }
.sales-import-heading > i { display: grid; width: 38px; height: 38px; place-items: center; color: var(--brand-700); border-radius: 8px; background: var(--brand-50); font-size: 19px; }
.sales-import-heading h5 { margin: 0; color: var(--ink-950); font-size: 15px; }
.sales-import-heading p { margin: 2px 0 0; color: var(--ink-500); font-size: 11.5px; }

.v2-page { max-width: 1680px; margin: 0 auto; }
.v2-metric-card, .v2-mini-stat, .v2-task-card {
    display: flex; height: 100%; min-height: 112px; flex-direction: column; justify-content: center;
    padding: 16px; color: var(--ink-900); border: 1px solid #dce8df; border-radius: 14px;
    background: linear-gradient(145deg, #fff, #f7fbf8); box-shadow: 0 5px 18px rgba(19, 71, 43, .06);
}
.v2-metric-card small, .v2-mini-stat small, .v2-task-card small { color: var(--ink-500); font-weight: 650; }
.v2-metric-card strong, .v2-mini-stat strong, .v2-task-card strong { margin: 5px 0 2px; color: var(--brand-800); font-size: clamp(20px, 2.2vw, 28px); }
.v2-metric-card span, .v2-task-card span { color: var(--ink-500); font-size: 12px; }
.v2-metric-card.is-danger strong { color: #b42318; }
.v2-task-card { min-height: 100px; text-decoration: none; }
.v2-task-card:hover { color: inherit; border-color: var(--brand-500); transform: translateY(-1px); }
.v2-mini-stat { min-height: 82px; padding: 12px; box-shadow: none; }
.v2-mapping-control { min-width: 290px; }
.upload-workbench-hero { margin-bottom: 12px; }
.upload-workbench-hero .workspace-eyebrow .badge { padding: 3px 6px; font-size: 9px; }
.upload-workbench-hero .workspace-hero-actions .btn { display: inline-flex; align-items: center; gap: 5px; }
.upload-alert-region:not(:empty) { margin-bottom: 12px; }
.upload-alert-region .alert { margin-bottom: 0; }
.upload-primary-toolbar { align-items: flex-end; }
.upload-scope-fields, .upload-bulk-action { display: flex; min-width: 0; align-items: flex-end; gap: 10px; }
.upload-bulk-action { margin-left: auto; }
.upload-field { min-width: 0; }
.upload-field .form-label { display: flex; align-items: center; gap: 5px; margin-bottom: 5px; color: var(--ink-700); font-size: 11.5px; font-weight: 750; }
.upload-field .form-label i { color: var(--brand-700); }
.upload-field .form-label span { color: var(--ink-500); font-size: 10px; font-weight: 600; }
.upload-date-field { width: 165px; }
.upload-shop-field { width: 230px; }
.upload-files-field { width: min(390px, 32vw); }
.upload-bulk-action > .btn { min-height: 34px; white-space: nowrap; }

.upload-process { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr) 18px) minmax(0, 1fr); align-items: center; gap: 4px; margin-bottom: 12px; padding: 10px 13px; border: 1px solid #dbe5ef; border-radius: 8px; background: #fff; box-shadow: var(--shadow-sm); }
.upload-process > i { color: #cbd5e1; font-size: 11px; text-align: center; }
.upload-process-step { display: grid; grid-template-columns: 27px minmax(0, 1fr); align-items: center; column-gap: 8px; color: var(--ink-500); }
.upload-process-step > span { grid-row: 1 / 3; display: grid; width: 27px; height: 27px; place-items: center; border: 1px solid #cbd5e1; border-radius: 50%; background: #fff; font-size: 11px; font-weight: 800; }
.upload-process-step strong, .upload-process-step small { display: block; min-width: 0; }
.upload-process-step strong { color: var(--ink-700); font-size: 11.5px; }
.upload-process-step small { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.upload-process-step.is-done > span { color: #fff; border-color: #16a34a; background: #16a34a; }
.upload-process-step.is-current > span { color: #fff; border-color: var(--brand-700); background: var(--brand-700); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.upload-process-step.is-current strong { color: var(--brand-800); }

.upload-next-action { display: grid; min-height: 76px; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 12px; margin-bottom: 12px; padding: 12px 14px; border: 1px solid #bfd2e8; border-radius: 8px; background: #f7fbff; box-shadow: var(--shadow-sm); }
.upload-next-icon { display: grid; width: 40px; height: 40px; place-items: center; color: var(--brand-700); border-radius: 9px; background: #e8f1ff; font-size: 18px; }
.upload-next-icon.is-warning { color: #a16207; background: #fff3cd; }
.upload-next-icon.is-danger { color: #b42318; background: #feeceb; }
.upload-next-icon.is-success { color: #15803d; background: #e8f7ed; }
.upload-next-action strong, .upload-next-action p, .upload-next-kicker { display: block; }
.upload-next-kicker { margin-bottom: 2px; color: var(--brand-700); font-size: 9.5px; font-weight: 850; letter-spacing: .08em; }
.upload-next-action strong { color: var(--ink-950); font-size: 14px; }
.upload-next-action p { margin: 3px 0 0; color: var(--ink-600); font-size: 11px; line-height: 1.45; }
.upload-next-button { align-self: center; }
.upload-next-state { padding: 4px 9px; border-radius: 999px; background: #e8f7ed; font-size: 11px; font-weight: 750; }

.upload-summary-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: hidden; border: 1px solid #dbe5ef; border-radius: 8px; background: #fff; box-shadow: var(--shadow-sm); }
.upload-summary-strip > div { display: grid; min-width: 0; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 11px 14px; }
.upload-summary-strip > div + div { border-left: 1px solid #e8edf3; }
.upload-summary-strip i { display: grid; width: 32px; height: 32px; place-items: center; color: var(--brand-700); border-radius: 7px; background: var(--brand-50); font-size: 15px; }
.upload-summary-strip span, .upload-summary-strip small { display: block; min-width: 0; }
.upload-summary-strip span { color: var(--ink-700); font-size: 12px; font-weight: 750; }
.upload-summary-strip small { margin-top: 1px; color: var(--ink-500); font-size: 9.5px; font-weight: 500; }
.upload-summary-strip strong { color: var(--brand-950); font-size: 22px; line-height: 1; }
.upload-summary-strip [data-tone="success"] i, .upload-summary-strip [data-tone="success"] strong { color: #15803d; }
.upload-summary-strip [data-tone="success"] i { background: #edf9f0; }
.upload-summary-strip [data-tone="warning"] i, .upload-summary-strip [data-tone="warning"] strong { color: #a16207; }
.upload-summary-strip [data-tone="warning"] i { background: #fff7dd; }
.upload-summary-strip [data-tone="danger"] i, .upload-summary-strip [data-tone="danger"] strong { color: #c2413b; }
.upload-summary-strip [data-tone="danger"] i { background: #fff1f0; }

.upload-tabs { flex-wrap: nowrap; overflow-x: auto; }
.upload-tabs .nav-link { min-height: 40px; white-space: nowrap; }
.upload-classification-guide { overflow: hidden; border: 1px solid #dbe5ef; border-radius: 8px; background: #fff; }
.upload-classification-guide > summary { display: flex; min-height: 46px; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 13px; color: var(--ink-800); cursor: pointer; list-style: none; }
.upload-classification-guide > summary::-webkit-details-marker { display: none; }
.upload-classification-guide > summary > span { display: flex; min-width: 0; align-items: center; gap: 7px; }
.upload-classification-guide > summary i:first-child { color: var(--brand-700); }
.upload-classification-guide > summary strong { font-size: 12.5px; }
.upload-classification-guide > summary small { color: var(--ink-500); font-size: 10.5px; font-weight: 500; }
.upload-guide-chevron { color: var(--ink-500); transition: transform .16s ease; }
.upload-classification-guide[open] .upload-guide-chevron { transform: rotate(180deg); }
.upload-guide-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid #e8edf3; background: #fbfcfe; }
.upload-guide-item { display: flex; min-width: 0; flex-direction: column; gap: 4px; padding: 12px 13px; }
.upload-guide-item + .upload-guide-item { border-left: 1px solid #e8edf3; }
.upload-guide-tag { width: fit-content; padding: 2px 7px; color: #166534; border-radius: 999px; background: #e8f7ed; font-size: 10px; font-weight: 800; }
.upload-guide-item.optional .upload-guide-tag { color: #1d4ed8; background: #eaf2ff; }
.upload-guide-item strong { color: var(--ink-950); font-size: 13px; }
.upload-guide-item small { color: var(--ink-600); font-size: 11px; line-height: 1.4; }
.upload-guide-item b { color: var(--brand-800); font-size: 11px; font-weight: 750; line-height: 1.35; }
.upload-guide-item em { color: var(--ink-500); font-size: 10.5px; font-style: normal; line-height: 1.4; }

.upload-shop-panel { overflow: hidden; border: 1px solid #dbe5ef; border-radius: 8px; background: #fff; box-shadow: var(--shadow-sm); }
.upload-shop-header { display: flex; min-height: 58px; align-items: center; gap: 12px; padding: 10px 13px; border-bottom: 1px solid #e8edf3; background: #f8fafc; }
.upload-shop-identity { display: flex; min-width: 180px; align-items: center; gap: 9px; }
.upload-shop-identity > i { display: grid; width: 32px; height: 32px; flex: 0 0 32px; place-items: center; color: var(--brand-700); border-radius: 7px; background: #fff; font-size: 15px; }
.upload-shop-identity strong, .upload-shop-identity span { display: block; }
.upload-shop-identity strong { color: var(--brand-950); font-size: 13.5px; }
.upload-shop-identity span { margin-top: 1px; color: var(--ink-500); font-size: 10.5px; }
.upload-shop-progress { height: 5px; min-width: 80px; max-width: 220px; flex: 1 1 180px; overflow: hidden; border-radius: 999px; background: #e2e8f0; }
.upload-shop-progress span { display: block; height: 100%; border-radius: inherit; background: #16a34a; }
.upload-shop-header > .btn { margin-left: auto; white-space: nowrap; }
.upload-report-head, .upload-report-row { display: grid; grid-template-columns: minmax(150px, .85fr) 90px minmax(280px, 1.35fr) minmax(330px, 1.55fr); align-items: center; column-gap: 14px; }
.upload-report-head { padding: 7px 13px; color: var(--ink-500); border-bottom: 1px solid #edf1f5; background: #fff; font-size: 10px; font-weight: 750; }
.upload-report-row { position: relative; min-height: 70px; padding: 9px 13px; }
.upload-report-row + .upload-report-row { border-top: 1px solid #edf1f5; }
.upload-report-row.completed { box-shadow: inset 3px 0 #22a559; }
.upload-report-row.ready, .upload-report-row.needs_mapping, .upload-report-row.no_data_pending { box-shadow: inset 3px 0 #d69e2e; }
.upload-report-row.failed { box-shadow: inset 3px 0 #dc4c45; }
.upload-report-row.is-focused { animation: upload-row-focus 1.35s ease; }
@keyframes upload-row-focus { 0%, 100% { background: #fff; } 25%, 70% { background: #fff7dc; } }
.upload-report-type { display: flex; min-width: 0; align-items: center; gap: 9px; }
.upload-report-type > i { display: grid; width: 32px; height: 32px; flex: 0 0 32px; place-items: center; color: var(--brand-700); border-radius: 7px; background: var(--brand-50); font-size: 14px; }
.upload-report-type strong, .upload-report-type small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-report-type strong { color: var(--ink-900); font-size: 12.5px; }
.upload-report-type small { margin-top: 2px; color: var(--ink-500); font-size: 10px; }
.upload-report-result strong, .upload-report-result span { display: block; }
.upload-report-result strong { color: var(--ink-800); font-size: 12px; }
.upload-report-result span { margin-top: 2px; color: var(--ink-500); font-size: 10.5px; }
.upload-report-result .upload-result-empty { margin-top: 0; }
.upload-report-action { min-width: 0; }
.upload-report-actions { display: flex; min-width: 0; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; }
.upload-report-actions .upload-inline-control { width: 100%; }
.upload-report-actions .btn { display: inline-flex; min-height: 32px; align-items: center; justify-content: center; gap: 4px; white-space: nowrap; }
.upload-inline-control { display: grid; min-width: 0; grid-template-columns: auto minmax(70px, 1fr) auto auto; align-items: center; gap: 6px; }
.upload-inline-control > label { margin: 0; }
.upload-file-name { min-width: 0; overflow: hidden; color: var(--ink-500); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.upload-no-data-action { min-width: auto !important; padding-right: 3px; padding-left: 3px; color: var(--ink-500); text-decoration: none; }
.upload-tab-toolbar { align-items: center; }
.upload-product-actions { display: grid; grid-template-columns: minmax(220px, 320px) auto; align-items: center; gap: 8px; }
.upload-data-table { min-width: 760px; }
.upload-history-table { min-width: 1050px; }
.upload-mapping-table { min-width: 980px; }

@media (max-width: 575.98px) {
    .overview-month-filter .card-body { align-items: flex-start !important; }
    .overview-month-filter .text-muted { width: 100%; line-height: 1.45; }
}

/* 首页数据既是概览也是入口：保持卡片视觉克制，同时明确可下钻状态。 */
.dashboard-drilldown,
.dashboard-drilldown-row { cursor: pointer; }
.dashboard-drilldown { transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.dashboard-drilldown:hover,
.dashboard-drilldown:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 .45rem 1rem rgba(15, 23, 42, .12);
    outline: 0;
}
.dashboard-drilldown:focus-visible { border-color: var(--bs-primary, #0d6efd); }
.dashboard-drilldown-row:hover > td { background: rgba(13, 110, 253, .055); }
.dashboard-drilldown-row:focus-visible { outline: 2px solid var(--bs-primary, #0d6efd); outline-offset: -2px; }

/* ==================== 登录欢迎 ==================== */
.login-welcome {
    position: fixed;
    z-index: 2500;
    inset: 0;
    display: grid;
    place-items: center;
    isolation: isolate;
    padding: 28px;
    cursor: pointer;
    background: rgba(11, 42, 28, .82);
    opacity: 1;
    transition: opacity .48s ease, visibility .48s ease;
}
.login-welcome.is-leaving { visibility: hidden; opacity: 0; pointer-events: none; }
.login-welcome-card {
    width: min(560px, calc(100vw - 48px));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 25px 30px;
    animation: login-welcome-float .72s cubic-bezier(.2, .8, .2, 1) both;
}
.login-welcome-title {
    color: #fff;
    font-size: clamp(29px, 4vw, 46px);
    font-weight: 800;
    letter-spacing: .08em;
    line-height: 1.22;
    text-align: center;
    text-shadow: 0 4px 16px rgba(0,0,0,.3);
}
@keyframes login-welcome-float {
    from { opacity: 0; transform: translateY(18px) scale(.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.badge { padding: .38em .62em; border-radius: 99px; font-size: 10.5px; font-weight: 650; letter-spacing: .05px; }

.modal-content { overflow: hidden; border: 1px solid rgba(218,230,222,.9); border-radius: var(--radius-lg); box-shadow: 0 16px 48px rgba(16,47,33,.20); }
.modal-header { padding: 15px 18px; border-bottom-color: var(--line); background: linear-gradient(135deg, #fcfefc, #f3faf5); }
.modal-title { color: var(--ink-950); font-size: 16px; font-weight: 750; }
.modal-body { padding: 18px; }
.modal-footer { border-top-color: var(--line); }
.dropdown-menu { border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-md); }
.alert { border: 0; border-radius: 10px; box-shadow: var(--shadow-sm); }

/* SKU 表单：按录入逻辑分组，错误字段使用醒目的 Bootstrap 红框提示。 */
.sku-form-fields .form-label { margin-bottom: 6px; color: var(--ink-800); font-size: 12.5px; font-weight: 700; }
.sku-form-fields .form-text { margin-top: 4px; font-size: 11px; }
.sku-form-section { padding: 14px; border: 1px solid #dce9e0; border-radius: 12px; background: linear-gradient(135deg, #fbfefc, #f3faf5); }
.sku-section-title { margin-bottom: 11px; color: var(--brand-800); font-size: 12px; font-weight: 750; letter-spacing: .2px; }
.sku-section-title i { margin-right: 5px; color: var(--gold-600); }
.sku-option-group .btn { min-height: 38px; padding-right: 8px; padding-left: 8px; }
.sku-form-fields .form-control.is-invalid, .sku-form-fields .form-select.is-invalid { border-width: 2px; background-color: #fff8f8; box-shadow: 0 0 0 3px rgba(220,53,69,.10); }
.sku-submit-alert { margin: 0; font-size: 13px; }
.sku-image-upload { padding: 10px 12px; border: 1px dashed #b8d2c0; border-radius: 12px; background: #fbfefc; }
.sku-compact-input { max-width: 230px; }
.sku-image-compact { max-width: 520px; }

@keyframes supplier-invalid-flash {
    0%, 100% { border-color: #d5e1da; background-color: #fff; box-shadow: none; }
    50% { border-color: #dc3545; background-color: #fff1f2; box-shadow: 0 0 0 3px rgba(220,53,69,.18); }
}
.supplier-invalid-flash { animation: supplier-invalid-flash .34s ease-in-out 2; }

/* 店铺订单分页：文字与每页条数选择器保持清晰间距，窄屏可自然换行。 */
.order-pagination-summary { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-left: auto; }
.order-page-size-control { display: inline-flex; align-items: center; flex: 0 0 auto; gap: 6px; white-space: nowrap; }
.order-page-size-control .form-select { width: 82px; min-width: 82px; }
@media (max-width: 575.98px) { .order-pagination-summary { width: 100%; justify-content: space-between; margin-left: 0; }.order-page-size-control { gap: 5px; } }

/* 从库存流水跳转至订单时，用三次高亮帮助快速定位。 */
@keyframes order-focus-flash {
    0%, 100% { background-color: transparent; box-shadow: inset 4px 0 0 transparent; }
    50% { background-color: #fff0a8; box-shadow: inset 4px 0 0 #f0a500; }
}
.order-focus-pulse { animation: order-focus-flash .72s ease-in-out 3; }

/* ==================== 登录页 ==================== */
.login-page { display: flex; flex-direction: column; position: relative; isolation: isolate; min-height: 100vh; min-height: 100svh; align-items: flex-start; justify-content: flex-start; padding: clamp(36px, 7vh, 80px) clamp(28px, 5vw, 88px) 68px; background: #eaf4fb; }
.login-scene, .login-overlay { position: absolute; z-index: -1; inset: 0; }
.login-scene img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.login-overlay { background: linear-gradient(115deg, rgba(240,248,255,.35), transparent 48%); pointer-events: none; }
.login-hero { position: relative; color: #133b60; text-align: left; margin-bottom: 28px; }
.login-eyebrow { margin: 0 0 12px; font-size: 16px; letter-spacing: 5px; font-weight: 600; }
.login-title { margin: 0; font-size: clamp(40px, 4.5vw, 64px); font-weight: 800; letter-spacing: 5px; line-height: 1.2; text-indent: -.055em; }
.login-title span { display: block; margin-top: 14px; font-size: clamp(19px, 2vw, 26px); font-weight: 500; letter-spacing: 7px; text-indent: 0; }
.login-card { position: relative; width: 360px; padding: 26px 28px 28px; border: 1px solid rgba(255,255,255,.9); border-radius: 22px; background: rgba(255,255,255,.95); box-shadow: 0 16px 48px rgba(34,66,98,.15); }
.login-header { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.login-logo { display: block; width: 48px; height: 48px; object-fit: contain; }
.login-header h2 { margin: 0; font-size: 22px; font-weight: 700; color: #17375e; }
.login-card .form-label { color: #29455f; font-weight: 600; }
.login-card .form-control { min-height: 46px; color: #17375e; border-color: #ccd9e5; background: #f8fbff; font-size: 16px; }
.login-card .form-control::placeholder { color: #677d90; }
.login-card .form-control:focus { border-color: #2563eb; background: #fff; box-shadow: 0 0 0 3px rgba(37,99,235,.15); }
.login-card .btn-primary { min-height: 48px; margin-top: 6px; border-color: #215bd1; background: #215bd1; color: #fff; font-size: 16px; font-weight: 600; }
.login-card .btn-primary:hover { border-color: #194baF; background: #194baf; }
.login-card .btn-primary:focus-visible { outline: 3px solid #17375e; outline-offset: 3px; }
.login-registration { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; justify-content: center; gap: 5px; width: max-content; max-width: calc(100% - 24px); padding: 5px 10px; border-radius: 8px; background: rgba(255,255,255,.86); color: #334e65; font-size: 12px; text-decoration: none; }
.login-registration:hover { color: #17375e; text-decoration: underline; }

/* ==================== 移动端 ==================== */
.mobile-header, .sidebar-overlay { display: none; }

@media (max-width: 1399.98px) {
    .upload-report-head { display: none; }
    .upload-report-row { grid-template-areas: "type status" "result result" "action action"; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; padding: 11px 13px; }
    .upload-report-type { grid-area: type; }
    .upload-report-status { grid-area: status; }
    .upload-report-result { grid-area: result; padding-left: 41px; }
    .upload-report-action { grid-area: action; padding-top: 8px; border-top: 1px dashed #e2e8f0; }
    .upload-report-actions { justify-content: flex-start; }
}

@media (max-width: 1199.98px) {
    .main-content { padding: 24px; }
    .upload-primary-toolbar { flex-wrap: wrap; }
    .upload-bulk-action { width: 100%; margin-left: 0; }
    .upload-files-field { width: min(440px, 55vw); }
}

@media (max-width: 991.98px) {
    .sidebar { width: 228px; }
    .main-content { width: calc(100% - 228px); margin-left: 228px; padding: 21px; }
    .sidebar-brand { min-height: 74px; padding: 15px; }
    .brand-logo { width: 36px; height: 36px; }
    .brand-text { font-size: 15px; }
    .workspace-hero { align-items: flex-start; }
    .workspace-hero-stats > div { min-width: 74px; padding-right: 11px; padding-left: 11px; }
    .workspace-toolbar { align-items: flex-start; flex-direction: column; }
    .workspace-filter-group, .workspace-toolbar-actions { width: 100%; }
    .workspace-toolbar-actions { justify-content: flex-start; }
    .sales-store-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 10px; }
    .sales-store-metrics > div:nth-child(3) { padding-left: 0; border-left: 0; }
    .upload-primary-toolbar { align-items: stretch; }
    .upload-scope-fields, .upload-bulk-action { width: 100%; }
    .upload-summary-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .upload-summary-strip > div:nth-child(3) { border-left: 0; }
    .upload-summary-strip > div:nth-child(n+3) { border-top: 1px solid #e8edf3; }
    .upload-guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .upload-process { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .upload-process > i { display: none; }
    .upload-process-step { grid-template-columns: 24px minmax(0, 1fr); }
    .upload-process-step > span { width: 24px; height: 24px; }
    .upload-process-step small { display: none; }
    .upload-guide-item + .upload-guide-item { border-left: 0; }
    .upload-guide-item:nth-child(even) { border-left: 1px solid #e8edf3; }
    .upload-guide-item:nth-child(n+3) { border-top: 1px solid #e8edf3; }
    .approval-summary-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .approval-summary-strip > div:nth-child(4) { border-left: 0; }
    .approval-summary-strip > div:nth-child(n+4) { border-top: 1px solid #e8edf3; }
    .operations-hero { flex-wrap: wrap; }
    .operations-hero .workspace-hero-copy { flex-basis: calc(100% - 250px); }
    .hr-hero, .audit-hero { flex-wrap: wrap; }
    .hr-hero .workspace-hero-copy, .audit-hero .workspace-hero-copy { flex-basis: 100%; }
    .hr-hero .workspace-hero-stats, .audit-hero .workspace-hero-stats { margin-left: 0; }
}

@media (max-width: 767.98px) {
    .login-page { align-items: flex-start; padding: 25px 16px 20px; }
    .login-scene { height: 380px; }
    .login-scene img { object-position: center; }
    .login-overlay { height: 380px; background: linear-gradient(180deg, rgba(240,248,255,.3), transparent 75%, #eaf4fb); }
    .login-hero { margin-bottom: 28px; }
    .login-eyebrow { margin-bottom: 8px; font-size: 13px; letter-spacing: 3px; }
    .login-title { font-size: 34px; letter-spacing: 3px; }
    .login-title span { margin-top: 8px; font-size: 17px; letter-spacing: 4px; }
    .login-card { width: 100%; max-width: 400px; padding: 22px; border-radius: 18px; }
    .login-registration { position: static; transform: none; margin-top: 22px; flex-shrink: 0; align-self: center; }
    body { overflow-x: hidden; font-size: 13.5px; background: var(--page-bg); }
    .mobile-header { display: flex; position: sticky; z-index: 150; top: 0; height: calc(58px + env(safe-area-inset-top)); align-items: center; padding: env(safe-area-inset-top) 13px 0; border-bottom: 1px solid #dce9e0; background: rgba(255,255,255,.95); box-shadow: 0 1px 9px rgba(16,51,34,.05); backdrop-filter: blur(12px); }
    .mobile-menu-btn, .mobile-feedback-btn { display: grid; width: 36px; height: 36px; place-items: center; color: var(--brand-800); border: 0; border-radius: 9px; background: var(--brand-50); font-size: 20px; }
    .mobile-menu-btn:active, .mobile-feedback-btn:active { background: var(--brand-100); }
    .mobile-brand { display: flex; min-width: 0; flex: 1; align-items: center; margin-left: 9px; color: var(--brand-900); text-decoration: none; }
    .mobile-brand-logo { width: 31px; height: 31px; margin-right: 7px; padding: 1px; object-fit: contain; border-radius: 8px; background: #fff; }
    .mobile-brand span { display: flex; min-width: 0; flex-direction: column; line-height: 1.05; }
    .mobile-brand strong { font-size: 14px; font-weight: 750; }
    .mobile-brand small { margin-top: 2px; color: var(--ink-500); font-size: 9px; letter-spacing: .9px; }
    .mobile-feedback-btn { color: var(--ink-600); background: transparent; font-size: 17px; }
    .sidebar-overlay { display: block; position: fixed; z-index: 155; inset: 0; visibility: hidden; background: rgba(8,31,21,.52); opacity: 0; transition: opacity .25s ease, visibility .25s ease; }
    .sidebar-overlay.show { visibility: visible; opacity: 1; }
    .sidebar { z-index: 160; width: min(82vw, 300px); padding-top: env(safe-area-inset-top); transform: translateX(-105%); transition: transform .27s cubic-bezier(.2,.7,.2,1); box-shadow: 10px 0 36px rgba(0,0,0,.25); }
    .sidebar.open { transform: translateX(0); }
    .sidebar-brand { min-height: 80px; }
    .sidebar-nav { padding-top: 12px; }
    .nav-item { min-height: 46px; padding: 11px 13px; font-size: 14px; }
    .nav-sub-item { padding-top: 8px; padding-bottom: 8px; font-size: 13px; }
    .main-content { width: 100%; min-height: calc(100vh - 58px - env(safe-area-inset-top)); margin-left: 0; padding: 16px 12px calc(30px + env(safe-area-inset-bottom)); }
    .page-header { margin-bottom: 16px; }
    .page-header h2, .main-content h4 { font-size: 18px; }
    .workspace-hero { min-height: 0; align-items: stretch; flex-direction: column; gap: 14px; padding: 15px; }
    .workspace-hero h2 { font-size: 18px; }
    .workspace-hero h2 small { font-size: 13px; }
    .workspace-hero p { line-height: 1.45; }
    .workspace-hero-stats { width: 100%; }
    .workspace-hero-stats > div { min-width: 0; flex: 1 1 0; }
    .workspace-hero-actions { justify-content: flex-start; }
    .workspace-toolbar { min-height: 0; padding: 10px; }
    .workspace-filter-group { align-items: stretch; }
    .workspace-search { width: 100%; }
    .workspace-select { width: min(190px, calc(100% - 82px)); }
    .workspace-toolbar-actions .btn-group { max-width: 100%; }
    .workspace-period-bar { align-items: flex-start; flex-direction: column; }
    .workspace-period-main { width: 100%; }
    .workspace-period-main select { flex: 1; width: auto; }
    .sales-kpi-card { min-height: 108px; padding: 13px; }
    .sales-kpi-card .stat-label { align-items: flex-start; line-height: 1.3; }
    .sales-store-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .page-header.d-flex, .main-content > .container-fluid > .d-flex { align-items: flex-start !important; gap: 10px; }
    .page-header > .d-flex { width: 100%; }
    .card, .stat-card { border-radius: 13px; }
    .card-header { min-height: 45px; padding: 12px 13px; font-size: 13px; }
    .card-body { padding: 13px; }
    .stat-card { min-height: 98px; padding: 14px; }
    .stat-label { margin-bottom: 5px; font-size: 11px; }
    .stat-value, .kpi-card .stat-value { font-size: 20px; }
    .stat-value.small-stat { font-size: 18px; }
    .row { --bs-gutter-x: .75rem; --bs-gutter-y: .75rem; }
    .nav-tabs { flex-wrap: nowrap; width: calc(100% + 24px); margin-right: -12px !important; margin-left: -12px; padding: 0 12px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
    .nav-tabs::-webkit-scrollbar { display: none; }
    .nav-tabs .nav-item { flex: 0 0 auto; min-height: auto; margin: 0; padding: 0; }
    .nav-tabs .nav-link { padding: 9px 10px; font-size: 12px; white-space: nowrap; }
    .table-responsive, table.table { -webkit-overflow-scrolling: touch; }
    .table-auto-tools { justify-content: flex-start; }
    .table-auto-filter { width: 100%; }
    .table-auto-summary { text-align: left; }
    .dashboard-filter-bar { align-items: stretch !important; gap: 8px !important; }
    .dashboard-filter-bar > :first-child { flex: 0 0 100%; }
    .dashboard-filter-field { flex: 1 1 calc(50% - 4px); min-width: 0; }
    .dashboard-filter-select { width: 100%; }
    .dashboard-date-range { flex: 1 0 100%; }
    .dashboard-date-range .form-control { width: calc((100% - 21px) / 2); min-width: 0; }
    .dashboard-filter-bar #btnReset { flex: 0 0 auto; }
    .dashboard-period-bar { align-items: flex-start; flex-direction: column; }
    .dashboard-period-bar .btn { width: 100%; }
    .login-welcome { padding: 18px; }
    .login-welcome-card { width: min(86vw, 480px); padding: 24px 18px; }
    .login-welcome-title { font-size: clamp(28px, 8.3vw, 40px); letter-spacing: .045em; }
    table.table { display: block; min-width: max-content; width: 100%; overflow-x: auto; }
    .table > :not(caption) > * > * { padding: 10px 9px; }
    .table th { font-size: 11px; }
    .table td { font-size: 12.5px; white-space: nowrap; }
    .btn { min-height: 36px; padding: 7px 10px; }
    .btn-sm { min-height: 32px; padding: 5px 8px; font-size: 12px; }
    .form-control, .form-select { min-height: 39px; font-size: 14px; }
    .form-control-sm, .form-select-sm { min-height: 34px; font-size: 13px; }
    .d-flex.justify-content-between, .d-flex.align-items-center { gap: 8px; }
    .d-flex.justify-content-between:not(.card-header) { flex-wrap: wrap; }
    /* 商品/库存等页面的固定宽度搜索框与下拉框在小屏自动换行，避免整页横向滚动 */
    .tab-pane > .d-flex.justify-content-between > .d-flex { flex-wrap: wrap; }
    .page-header .d-flex.gap-2 { justify-content: flex-start; }
    .modal-dialog { width: calc(100% - 20px); margin: 10px auto; }
    .modal-dialog.modal-lg, .modal-dialog.modal-xl { max-width: none; }
    /* 长表单统一采用固定标题/按钮、内容区独立滚动，避免手机上被键盘或底部按钮遮挡。 */
    .modal-dialog:not(.modal-dialog-scrollable) { max-height: calc(100dvh - 20px); }
    .modal-dialog:not(.modal-dialog-scrollable) .modal-content { display: flex; max-height: calc(100dvh - 20px); flex-direction: column; border-radius: 14px; }
    .modal-dialog:not(.modal-dialog-scrollable) .modal-content > form { display: flex; min-height: 0; flex: 1 1 auto; flex-direction: column; }
    .modal-dialog:not(.modal-dialog-scrollable) .modal-content > form .modal-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
    .modal-dialog.modal-fullscreen-sm-down { height: 100dvh; max-height: 100dvh; margin: 0; }
    .modal-dialog.modal-fullscreen-sm-down .modal-content { height: 100dvh; max-height: 100dvh; border-radius: 0; }
    .modal-header { padding: 14px; }
    .modal-body { padding: 14px; }
    .modal-footer { padding: 12px 14px; }
    .modal-footer { display: flex; flex-wrap: wrap; gap: 8px; }
    .modal-footer .btn { flex: 1 1 140px; min-height: 42px; margin: 0; }
    .modal-body .row > .col-6 { flex: 0 0 100%; max-width: 100%; }
    .modal .row { --bs-gutter-y: .7rem; }
    .dropdown-menu { max-width: calc(100vw - 24px); }
    .btn-group { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .btn-group .btn { flex: 0 0 auto; white-space: nowrap; }
    [style*="height:280px"], [style*="height:300px"], [style*="height:320px"] { min-width: 260px; }
    #feedbackModal .btn-group { display: flex; overflow: visible; }
    #feedbackModal .btn-group .btn { flex: 1 1 0; padding-right: 4px; padding-left: 4px; font-size: 11px; white-space: normal; }
    input[type="file"] { min-height: 44px; padding: 8px 9px; }
    input[type="file"]::file-selector-button { min-height: 32px; margin: -4px 9px -4px -4px; padding: 6px 10px; color: var(--brand-800); border: 1px solid #c9dfd0; border-radius: 7px; background: var(--brand-50); font-weight: 650; }
    input[type="file"]::-webkit-file-upload-button { min-height: 32px; margin: -4px 9px -4px -4px; padding: 6px 10px; color: var(--brand-800); border: 1px solid #c9dfd0; border-radius: 7px; background: var(--brand-50); font-weight: 650; }
    .mobile-upload-actions { display: flex; flex-wrap: wrap; gap: 8px; }
    .mobile-upload-actions .btn { flex: 1 1 150px; min-height: 42px; }
    .mobile-upload-actions input[type="file"] { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
    .mobile-upload-hint { margin-top: 6px; color: var(--ink-500); font-size: 11px; }
    .btn, .form-control, .form-select { touch-action: manipulation; }
    .upload-workbench-hero { position: relative; padding-right: 58px; }
    .upload-workbench-hero .workspace-hero-actions { position: absolute; top: 12px; right: 12px; }
    .upload-workbench-hero .workspace-hero-actions .btn { width: 36px; min-height: 36px; padding: 0; justify-content: center; }
    .upload-refresh-label { display: none; }
    .upload-scope-fields { display: grid; width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
    .upload-bulk-action { align-items: stretch; flex-direction: column; }
    .upload-date-field, .upload-shop-field { width: auto; }
    .upload-files-field { width: 100%; }
    .upload-bulk-action > .btn { width: 100%; min-height: 38px; }
    .upload-process { overflow: visible; grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 9px 5px; }
    .upload-process-step { display: flex; min-width: 0; min-height: 48px; align-items: center; flex-direction: column; justify-content: flex-start; gap: 4px; text-align: center; }
    .upload-process-step > span { flex: 0 0 24px; }
    .upload-process-step strong { width: 100%; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
    .upload-next-action { grid-template-columns: 36px minmax(0, 1fr); align-items: start; padding: 11px; }
    .upload-next-icon { width: 36px; height: 36px; }
    .upload-next-button, .upload-next-state { grid-column: 1 / -1; width: 100%; }
    .upload-next-button .btn { width: 100%; min-height: 42px; }
    .upload-guide-grid { grid-template-columns: 1fr; }
    .upload-guide-item:nth-child(even) { border-left: 0; }
    .upload-guide-item:nth-child(n+2) { border-top: 1px solid #e8edf3; }
    .upload-classification-guide > summary > span { align-items: flex-start; flex-wrap: wrap; }
    .upload-classification-guide > summary small { flex-basis: 100%; padding-left: 21px; }
    .upload-shop-header { align-items: flex-start; flex-wrap: wrap; }
    .upload-shop-progress { order: 3; max-width: none; flex-basis: 100%; }
    .upload-shop-header > .btn { margin-left: auto; }
    .upload-tab-toolbar { align-items: stretch; }
    .upload-product-actions { width: 100%; grid-template-columns: 1fr; }
    .workflow-toolbar-copy { width: 100%; min-width: 0; }
    .workflow-toolbar .workspace-select { width: min(210px, 100%); }
    .workflow-table-scroll-hint { display: flex; align-items: center; gap: 6px; padding: 8px 10px; color: #64748b; border-bottom: 1px solid #e8edf3; background: #f8fafc; font-size: 10.5px; }
    .workflow-list-panel .table-responsive, .operations-panel .table-responsive { overflow: visible; }
    table.workflow-table, table.operations-table { display: table; min-width: 0 !important; width: 100%; overflow: visible; }
    .workflow-table thead, .operations-table thead { display: none; }
    .workflow-table tbody, .operations-table tbody { display: block; padding: 10px; }
    .workflow-table tbody .workflow-record-row { display: grid; grid-template-areas: "id status" "title title" "amount owner" "step step" "time action"; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; margin-bottom: 9px; padding: 12px; border: 1px solid #dbe5ef; border-radius: 8px; background: #fff; }
    .workflow-table tbody .workflow-record-row:last-child { margin-bottom: 0; }
    .workflow-record-row > td { display: block; min-width: 0; padding: 0 !important; white-space: normal !important; border: 0 !important; }
    .workflow-record-id { grid-area: id; }
    .workflow-record-title { grid-area: title; padding-top: 2px !important; font-size: 13px !important; }
    .workflow-record-amount { grid-area: amount; }
    .workflow-record-owner { grid-area: owner; text-align: right; }
    .workflow-record-step { grid-area: step; padding: 8px 0 !important; border-top: 1px dashed #e2e8f0 !important; border-bottom: 1px dashed #e2e8f0 !important; }
    .workflow-record-status { grid-area: status; text-align: right; }
    .workflow-record-time { grid-area: time; align-self: center; }
    .workflow-record-action { grid-area: action; text-align: right; }
    .workflow-record-row td[data-label]::before, .operations-record-row td[data-label]::before { display: block; margin-bottom: 2px; color: #94a3b8; content: attr(data-label); font-size: 9.5px; font-weight: 700; }
    .workflow-table tbody .workflow-empty-row, .operations-table tbody .operations-empty-row { display: block; border: 0; }
    .workflow-empty-row > td, .operations-empty-row > td { display: block; white-space: normal !important; border: 0 !important; }
    .workflow-action-panel { align-items: stretch; flex-direction: column; }
    .workflow-action-buttons { width: 100%; }
    .workflow-action-buttons .btn { flex: 1 1 0; min-height: 42px; }
    .workflow-form-actions { align-items: stretch; flex-direction: column-reverse; }
    .workflow-form-actions .btn { width: 100%; min-height: 42px; }
    .approval-section .table-responsive::before, .operations-panel .table-responsive::before { display: flex; align-items: center; gap: 6px; padding: 7px 10px; color: #64748b; border-bottom: 1px solid #e8edf3; background: #f8fafc; content: "左右滑动查看完整信息"; font-size: 10px; }
    .approval-section .list-group-item { align-items: flex-start !important; flex-direction: column; }
    .approval-section .list-group-item .btn { align-self: stretch; }
    .operations-hero .workspace-hero-copy { flex-basis: auto; }
    .operations-hero .workspace-hero-stats { margin-left: 0; }
    .operations-panel .table-responsive::before { content: "记录已按手机屏幕重排"; }
    .operations-table tbody .operations-record-row { display: grid; grid-template-areas: "primary primary" "amount date" "status action"; grid-template-columns: minmax(0, 1fr) auto; gap: 9px 12px; margin-bottom: 9px; padding: 12px; border: 1px solid #dbe5ef; border-radius: 8px; background: #fff; }
    .operations-table tbody .operations-record-row:last-child { margin-bottom: 0; }
    .operations-record-row > td { display: block; min-width: 0; padding: 0 !important; white-space: normal !important; border: 0 !important; }
    .operations-primary { grid-area: primary; min-width: 0; padding-bottom: 8px !important; border-bottom: 1px dashed #e2e8f0 !important; }
    .operations-amount { grid-area: amount; }
    .operations-date { grid-area: date; text-align: right; }
    .operations-status { grid-area: status; align-self: end; }
    .operations-action { grid-area: action; align-self: end; text-align: right; }
    .operations-status .text-truncate { max-width: 210px; white-space: normal; }
    .hr-employee-toolbar, .hr-task-toolbar, .hr-attendance-toolbar, .audit-toolbar { align-items: stretch; }
    .hr-search, .audit-search { width: 100%; }
    .hr-panel .table-responsive, .audit-panel .table-responsive { overflow: visible; }
    table.hr-employee-table, table.hr-position-table, table.hr-task-table, table.hr-attendance-table, table.audit-log-table { display: table; min-width: 0 !important; width: 100%; overflow: visible; }
    .hr-employee-table thead, .hr-position-table thead, .hr-task-table thead, .hr-attendance-table thead, .audit-log-table thead { display: none; }
    .hr-employee-table tbody, .hr-position-table tbody, .hr-task-table tbody, .hr-attendance-table tbody, .audit-log-table tbody { display: block; padding: 10px; }
    .hr-employee-table tbody .hr-employee-row, .hr-position-table tbody .hr-position-row, .hr-task-table tbody .hr-task-row, .hr-attendance-table tbody .hr-attendance-row, .audit-log-table tbody .audit-log-row { margin-bottom: 9px; padding: 12px; border: 1px solid #dbe5ef; border-radius: 8px; background: #fff; }
    .hr-employee-table tbody .hr-employee-row:last-of-type, .hr-position-table tbody .hr-position-row:last-of-type, .hr-task-table tbody .hr-task-row:last-of-type, .hr-attendance-table tbody .hr-attendance-row:last-of-type, .audit-log-table tbody .audit-log-row:last-of-type { margin-bottom: 0; }
    .hr-employee-row > td, .hr-position-row > td, .hr-task-row > td, .hr-attendance-row > td, .audit-log-row > td { display: block; min-width: 0; max-width: none; padding: 0 !important; white-space: normal !important; border: 0 !important; }
    .hr-employee-row td[data-label]::before, .hr-position-row td[data-label]::before, .hr-task-row td[data-label]::before, .hr-attendance-row td[data-label]::before, .audit-log-row td[data-label]::before { display: block; margin-bottom: 2px; color: #94a3b8; content: attr(data-label); font-size: 9.5px; font-weight: 700; }
    .hr-employee-table tbody .hr-employee-row { display: grid; grid-template-areas: "identity status" "org org" "position position" "account account" "join payday" "salary action"; grid-template-columns: minmax(0, 1fr) auto; gap: 9px 12px; }
    .hr-employee-identity { grid-area: identity; }
    .hr-employee-org { grid-area: org; padding-top: 8px !important; border-top: 1px dashed #e2e8f0 !important; }
    .hr-employee-position { grid-area: position; }
    .hr-employee-account { grid-area: account; padding: 8px 0 !important; border-top: 1px dashed #e2e8f0 !important; border-bottom: 1px dashed #e2e8f0 !important; }
    .hr-employee-join { grid-area: join; }
    .hr-employee-payday { grid-area: payday; text-align: right; }
    .hr-employee-salary { grid-area: salary; align-self: end; }
    .hr-employee-status { grid-area: status; text-align: right; }
    .hr-employee-action { grid-area: action; align-self: end; text-align: right; }
    .hr-position-table tbody .hr-position-row { display: grid; grid-template-areas: "name people" "department role" "salary action" "permissions permissions"; grid-template-columns: minmax(0, 1fr) auto; gap: 9px 12px; }
    .hr-position-name { grid-area: name; }
    .hr-position-department { grid-area: department; }
    .hr-position-role { grid-area: role; text-align: right; }
    .hr-position-salary { grid-area: salary; }
    .hr-position-permissions { grid-area: permissions; padding-top: 8px !important; border-top: 1px dashed #e2e8f0 !important; }
    .hr-position-people { grid-area: people; text-align: right; }
    .hr-position-action { grid-area: action; text-align: right; }
    .hr-task-table tbody .hr-task-row { display: grid; grid-template-areas: "task task" "owner status" "due priority" "action action"; grid-template-columns: minmax(0, 1fr) auto; gap: 9px 12px; }
    .hr-task-main { grid-area: task; padding-bottom: 8px !important; border-bottom: 1px dashed #e2e8f0 !important; }
    .hr-task-owner { grid-area: owner; }
    .hr-task-due { grid-area: due; }
    .hr-task-priority { grid-area: priority; text-align: right; }
    .hr-task-status { grid-area: status; text-align: right; }
    .hr-task-action { grid-area: action; padding-top: 8px !important; text-align: right; border-top: 1px dashed #e2e8f0 !important; }
    .hr-attendance-table tbody .hr-attendance-row { display: grid; grid-template-areas: "person status" "date date" "in out" "remark remark"; grid-template-columns: minmax(0, 1fr) auto; gap: 9px 12px; }
    .hr-attendance-person { grid-area: person; font-weight: 700; }
    .hr-attendance-date { grid-area: date; padding: 8px 0 !important; border-top: 1px dashed #e2e8f0 !important; border-bottom: 1px dashed #e2e8f0 !important; }
    .hr-attendance-in { grid-area: in; }
    .hr-attendance-out { grid-area: out; text-align: right; }
    .hr-attendance-status { grid-area: status; text-align: right; }
    .hr-attendance-remark { grid-area: remark; }
    .audit-log-table tbody .audit-log-row { display: grid; grid-template-areas: "time action" "user module" "target target" "detail detail"; grid-template-columns: minmax(0, 1fr) auto; gap: 9px 12px; }
    .audit-time { grid-area: time; }
    .audit-user { grid-area: user; }
    .audit-action { grid-area: action; text-align: right; }
    .audit-module { grid-area: module; text-align: right; }
    .audit-target { grid-area: target; padding: 8px 0 !important; border-top: 1px dashed #e2e8f0 !important; border-bottom: 1px dashed #e2e8f0 !important; }
    .audit-detail { grid-area: detail; }
    .hr-empty-row:not(.d-none), .audit-empty-row:not(.d-none) { display: block; }
    .hr-empty-row > td, .audit-empty-row > td { display: block; white-space: normal !important; border: 0 !important; }
}

@media (max-width: 575.98px) {
    .main-content { padding-right: 10px; padding-left: 10px; }
    .nav-tabs { width: calc(100% + 20px); margin-right: -10px !important; margin-left: -10px; padding-right: 10px; padding-left: 10px; }
    .page-header h2, .main-content h4 { font-size: 17px; }
    .card-body { padding: 12px; }
    .modal-dialog { width: calc(100% - 16px); margin: 8px auto; }
    .modal-footer .btn { flex-basis: 100%; }
    .modal-body { padding: 13px; }
    .workspace-hero-stats strong { font-size: 18px; }
    .workspace-hero-stats > div { padding: 9px 8px; }
    .workspace-tabs .nav-link { min-height: 38px; }
    .workspace-toolbar-actions { gap: 7px; }
    .workspace-toolbar-actions > .d-flex { width: 100%; justify-content: flex-start !important; }
    .product-toolbar .workspace-toolbar-actions .btn-group { width: 100%; }
    .product-toolbar .workspace-toolbar-actions .btn-group .btn { flex: 1 1 auto; }
    .workspace-empty { padding-top: 34px !important; padding-bottom: 34px !important; }
    .approval-summary-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .approval-summary-strip > div { grid-template-columns: 29px minmax(0, 1fr); gap: 7px; padding: 10px; }
    .approval-summary-strip > div:nth-child(even) { border-left: 1px solid #e8edf3; }
    .approval-summary-strip > div:nth-child(odd) { border-left: 0; }
    .approval-summary-strip > div:nth-child(n+3) { border-top: 1px solid #e8edf3; }
    .approval-summary-strip i { width: 29px; height: 29px; font-size: 13px; }
    .approval-summary-strip strong { font-size: 18px; }
    .approval-state-chip { min-height: 36px; }
    .operations-panel .card-header small { display: none; }
    .sales-kpi-row { --bs-gutter-x: .55rem; --bs-gutter-y: .55rem; }
    .sales-kpi-card { min-height: 105px; }
    .sales-kpi-card .stat-label i { width: 24px; height: 24px; flex: 0 0 24px; font-size: 12px; }
    .sales-kpi-card .stat-value { font-size: 18px; letter-spacing: 0; }
    .sales-store-card .card-body { padding: 13px; }
    .sales-store-metrics > div { padding-right: 7px; padding-left: 7px; }
    .sales-store-metrics strong { font-size: 12px; }
    .order-pagination-summary { align-items: flex-start; }
    .v2-metric-card, .v2-task-card { min-height: 102px; padding: 12px; }
    .v2-metric-card strong, .v2-task-card strong { font-size: 19px; }
    .v2-mapping-control { min-width: 245px; }
    .upload-summary-strip > div { grid-template-columns: 28px minmax(0, 1fr) auto; gap: 7px; padding: 10px; }
    .upload-summary-strip i { width: 28px; height: 28px; font-size: 13px; }
    .upload-summary-strip small { display: none; }
    .upload-summary-strip strong { font-size: 19px; }
    .upload-shop-identity { min-width: 0; }
    .upload-shop-header > .btn { width: 100%; margin-left: 0; }
    .upload-report-result { padding-left: 0; }
    .upload-report-actions { display: grid; width: 100%; grid-template-columns: minmax(0, 1fr); align-items: stretch; }
    .upload-report-actions > .btn { width: 100%; min-height: 42px; }
    .upload-inline-control { grid-template-areas: "pick upload nodata" "filename filename filename"; grid-template-columns: minmax(0, 1fr) auto auto; }
    .upload-inline-control > label { grid-area: pick; }
    .upload-inline-control > [data-file-name] { grid-area: filename; }
    .upload-inline-control > [data-upload-for] { grid-area: upload; }
    .upload-inline-control > .upload-no-data-action { grid-area: nodata; }
    .upload-report-actions .upload-inline-control > .btn { min-height: 42px; }
    .hr-hero .workspace-hero-stats { display: grid; width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hr-hero .workspace-hero-stats > div { min-width: 0; }
    .hr-hero .workspace-hero-stats > div:nth-child(odd) { border-left: 0; }
    .hr-hero .workspace-hero-stats > div:nth-child(even) { border-left: 1px solid #e2e8f0; }
    .hr-hero .workspace-hero-stats > div:nth-child(n+3) { border-top: 1px solid #e2e8f0; }
    .hr-employee-toolbar .workspace-toolbar-actions, .audit-toolbar .workspace-toolbar-actions { align-items: stretch; }
    .hr-employee-toolbar .workspace-select, .audit-toolbar .workspace-select { flex: 1 1 150px; width: auto; }
    .hr-task-toolbar .btn { width: 100%; }
    .hr-attendance-form .col-md-1 .btn { min-height: 42px; }
}

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