/* 新辰论文管理 · 3.1 轻量化工作台主题
 * 参考 Element 风格的清爽蓝白布局，保留原 PHP 表单、权限和数据库逻辑。
 */
:root {
    --nav: #fff; --nav-2: #fff; --nav-text: #606f85;
    --bg: #f3f6fa; --surface: #fff; --text: #263248;
    --muted: #8190a5; --line: #e8edf4;
    --primary: #409eff; --primary-dark: #2388f4;
    --primary-soft: #edf6ff; --accent: #409eff; --accent-soft: #e9f3ff;
    --shadow: 0 5px 20px rgba(34, 59, 95, .035);
    --radius: 10px; --sidebar-width: 232px; --topbar-height: 62px; --control-h: 36px;
}
html, body { background: var(--bg); }
body { font-size: 13px; background-image: none; }
a { color: var(--primary); }
a:hover { color: var(--primary-dark); }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.sidebar {
    background: #fff; color: #5d6b7e; border-right: 1px solid #e7ecf3;
    box-shadow: 1px 0 7px rgba(18,40,77,.015); transition: width .22s, flex-basis .22s, transform .22s;
}
.main { transition: margin-left .22s, width .22s; }
.brand { min-height: 68px; padding: 12px 18px; border-bottom: 1px solid #f0f2f6; }
.brand-link { color: #25354b; }
.brand-link:hover { color: #25354b; }
.brand-mark { width: 38px; height: 38px; border-radius: 10px; background: #409eff; box-shadow: 0 5px 12px rgba(64,158,255,.19); }
.brand-mark i { font-size: 18px; }
.brand-copy strong { color: #25354b; font-size: 15px; letter-spacing: .2px; }
.brand-copy small { color: #9aa5b5; font-size: 10px; letter-spacing: .03em; }
.sidebar-create {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    margin: 17px 15px 9px; padding: 10px 12px; border-radius: 7px;
    background: #409eff; color: white; font-weight: 700; font-size: 13px;
    transition: background .15s;
}
.sidebar-create:hover { background: #248cf4; color: white; }
.sidebar-create-symbol { font-size: 19px; font-weight: 400; line-height: 16px; }
.menu { padding: 8px 10px 18px; scrollbar-width: thin; }
.menu-section { margin-bottom: 10px; }
.menu-group-title { color: #a4adbb; padding: 15px 14px 5px; font-size: 11px; font-weight: 650; letter-spacing: .03em; }
.menu-item { min-height: 42px; margin: 2px 0; padding: 10px 13px; gap: 11px; border-radius: 7px; color: #607083; }
.menu-item:hover { background: #f4f8fd; color: #409eff; }
.menu-item.active { color: #248dfe; background: #edf6ff; box-shadow: inset 3px 0 0 #409eff; }
.menu-icon { width: 19px; }
.menu-label { font-size: 13px; font-weight: 550; }
.menu-badge { background: #f56c6c; }
.sidebar-footer { border-top: 1px solid #e9edf5; }
.system-status { background: #f7f9fd; border-radius: 7px; }
.system-status b { color: #44546b; }
.system-status small { color: #9eaabb; }
.system-status > span { background: #67c23a; }
.sidebar-footer > a { color: #7b8a9e; }
.sidebar-footer > a:hover { color: #409eff; background: #eef6ff; }
.topbar {
    min-height: var(--topbar-height); padding: 8px 24px; background: rgba(255,255,255,.98);
    box-shadow: 0 1px 2px rgba(25,55,92,.025); border-bottom-color: #edf0f5; backdrop-filter: none;
}
.topbar-left, .topbar-right { gap: 12px; }
.top-icon {
    background: transparent; border: 1px solid transparent; border-radius: 7px; color: #78879a;
    width: 34px; height: 34px; display: inline-flex; justify-content: center; align-items: center; cursor: pointer;
    transition: background .15s, color .15s;
}
.top-icon:hover { background: #f0f7ff; color: #409eff; }
.topbar-breadcrumb { display: flex; align-items: center; gap: 9px; color: #9ba7b5; white-space: nowrap; margin-right: 8px; }
.topbar-breadcrumb a { color: #788699; }
.topbar-breadcrumb strong { color: #35465b; font-weight: 600; }
.global-search { height: 36px; width: min(350px, 27vw); background: #f6f8fc; border: 1px solid #edf0f5; border-radius: 7px; }
.global-search:focus-within { border-color: #91caff; box-shadow: 0 0 0 3px rgba(64,158,255,.09); }
.global-search kbd { background: #fff; color: #98a6b5; }
.account-chip { border: 0; padding: 4px 0 4px 10px; }
.account-chip .avatar { background: #d9eeff; color: #2388e8; border-radius: 8px; }
.top-create-btn { border-radius: 7px !important; box-shadow: none !important; }
.workspace-tabs {
    height: 43px; display: flex; align-items: center; gap: 8px; padding: 0 23px;
    border-bottom: 1px solid #edf0f5; background: #fff;
}
.workspace-tabs-track { display: flex; align-items: end; flex: 1; min-width: 0; height: 100%; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.workspace-tabs-track::-webkit-scrollbar { display: none; }
.workspace-tab {
    align-self: stretch; flex: 0 0 auto; display: inline-flex; align-items: center;
    border-bottom: 2px solid transparent; padding: 0 6px 0 13px; gap: 8px; color: #6e7a8c;
}
.workspace-tab:hover { background: #f7faff; }
.workspace-tab.is-active { color: #409eff; background: #fafdff; border-bottom-color: #409eff; }
.workspace-tab-link { color: inherit; font-size: 12px; white-space: nowrap; }
.workspace-tab-link:hover { color: #409eff; }
.workspace-tab-close { padding: 1px 4px; font-size: 15px; border: 0; border-radius: 4px; background: none; cursor: pointer; color: #a0abba; }
.workspace-tab-close:hover { background: #fbe9e9; color: #e74c4c; }
.tabs-more { color: #8090a3; border: 0; background: none; cursor: pointer; font-size: 11px; white-space: nowrap; }
.tabs-more:hover { color: #409eff; }
.page-header { padding: 20px 26px 0; }
.page-header-text, .content, .app-footer { max-width: none; }
.page-header h1 { font-size: 22px; font-weight: 680; letter-spacing: 0; }
.page-header p { font-size: 12px; margin-top: 5px; }
.page-kicker, .panel-kicker { color: #7e91a9; letter-spacing: .07em; font-size: 10px; }
.page-kicker::before, .panel-kicker::before { content: ''; display: inline-block; width: 4px; height: 10px; background: #409eff; border-radius: 3px; }
.content { padding: 17px 26px 35px; }
.app-footer { padding-left: 26px; padding-right: 26px; }
.card, .panel, .chart-shell { background: #fff; border: 1px solid #e9edf4; border-radius: 10px; box-shadow: var(--shadow); }
.panel { margin-bottom: 16px; }
.panel-head h2, .section-head h3 { font-weight: 680; }
.btn { min-height: 35px; border-radius: 6px; background: #409eff; box-shadow: none; font-weight: 600; padding: 8px 14px; }
.btn:hover { background: #2388f4; }
.btn.gray { background: #fff; color: #64748b; border-color: #dcdfe6; }
.btn.gray:hover { color: #409eff; background: #f7fbff; border-color: #c6e2ff; }
.btn.light { background: #ecf5ff; color: #409eff; }
.btn.light:hover { background: #d9edff; color: #2388f4; }
.input, .select, textarea, .login-input { min-height: 36px; border-color: #dcdfe6; border-radius: 6px; }
.input:focus, .select:focus, textarea:focus, .login-input:focus { border-color: #409eff; box-shadow: 0 0 0 2px rgba(64,158,255,.08); }
.filter-toolbar, .toolbar.filter-toolbar, form.toolbar { border-radius: 7px; background: #fafcfe; padding: 12px; }
.filter-toolbar::before, form.toolbar.filter-toolbar::before { color: #8694a7; letter-spacing: 0; }
.table-wrap { border-radius: 6px; border-color: #ebeef5; }
.table th, .table td { height: 42px; padding: 8px 12px; border-bottom-color: #ebeef5; }
.table thead th { background: #f7f9fc; color: #5a697d; font-weight: 650; }
.table tbody tr:nth-child(2n) td { background: #fafbfd; }
.table tbody tr:hover td { background: #ecf6ff; }
.table th.is-sortable { cursor: pointer; user-select: none; }
.table th.is-sortable:hover { color: #409eff; }
.table th.is-sortable::after { content: '↕'; margin-left: 6px; opacity: .36; }
.table th.is-sortable[data-sort-direction='asc']::after { content: '↑'; opacity: 1; }
.table th.is-sortable[data-sort-direction='desc']::after { content: '↓'; opacity: 1; }
.badge { border-radius: 5px; font-weight: 600; }
.pagination a.active { background: #409eff; }
.kpi, .metric-card, .stat, .todo-item { border-radius: 8px; box-shadow: none; }
.todo-item { transition: transform .12s, border-color .12s, box-shadow .12s; }
.todo-item:hover { transform: translateY(-2px); border-color: #b5d9fd; background: #f7fbff; box-shadow: 0 5px 14px rgba(32,80,130,.06); }
.todo-item.is-hot { background: #edf6ff; border-color: #d5e9ff; }
.todo-item.is-danger strong { color: #f56c6c; }
.overview-strip .metric-card { background: #fff; }
.workspace-welcome {
    display: flex; justify-content: space-between; align-items: center; gap: 18px;
    padding: 22px 26px; margin-bottom: 16px; border: 1px solid #dceafb; border-radius: 10px;
    background: linear-gradient(110deg, #edf6ff, #fff 78%);
}
.welcome-eyebrow { display: block; margin-bottom: 7px; color: #409eff; font-size: 10px; letter-spacing: .11em; font-weight: 700; }
.workspace-welcome h2 { font-size: 21px; line-height: 1.3; margin: 0 0 6px; font-weight: 700; }
.workspace-welcome p { margin: 0; font-size: 12px; color: #8694a8; }
.welcome-actions { display: flex; flex-wrap: wrap; gap: 8px; flex: 0 0 auto; }
.order-workflow-bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 9px; margin: 0 0 12px; }
.workflow-links { display: flex; gap: 5px; flex-wrap: wrap; }
.workflow-chip { background: #fff; padding: 8px 12px; color: #6d7b8b; border: 1px solid #e8edf3; border-radius: 6px; font-size: 12px; }
.workflow-chip:hover { background: #f4f9ff; border-color: #c8e3ff; }
.workflow-chip.is-current { background: #eaf5ff; border-color: #b7daff; color: #248cff; font-weight: 700; }
.workflow-count { color: #8493a6; font-size: 12px; }
.workflow-count strong { color: #409eff; }
.table-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 14px 0 10px; }
.table-tools-label { font-weight: 700; color: #34445a; margin-right: auto; }
.table-tools-label span { font-weight: 400; color: #a0aab9; font-size: 11px; }
.table-local-search { display: inline-flex; align-items: center; border: 1px solid #dcdfe6; border-radius: 6px; padding: 0 10px; height: 34px; gap: 6px; background: #fff; color: #95a3b5; }
.table-local-search:focus-within { border-color: #409eff; }
.table-local-search svg { width: 15px; height: 15px; }
.table-local-search input { width: 176px; border: 0; outline: 0; color: #42536b; }
.table-filter-count { color: #8190a4; font-size: 11px; }
.order-draft-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 11px 13px; margin: 0 0 18px; border: 1px solid #dbeaf9; background: #f4f9ff; border-radius: 7px; }
.order-draft-bar strong { display: block; font-size: 13px; }
.order-draft-bar small { display: block; margin-top: 2px; color: #8695a9; font-size: 11px; }
.order-draft-state { color: #409eff; font-size: 12px; }
.order-draft-state button { margin-left: 7px; background: #fff; border: 1px solid #b8d9fd; color: #2388f4; border-radius: 5px; padding: 4px 8px; cursor: pointer; }
.order-profit-preview { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; background: #f7f9fc; border-radius: 7px; margin: 5px 0 15px; padding: 12px 14px; }
.order-profit-preview span { color: #64748b; font-size: 12px; }
.order-profit-preview strong { color: #409eff; margin-left: 4px; font-size: 17px; }
.order-profit-preview .muted { margin-left: auto; color: #a0adbe; font-size: 11px; }
body.workspace-compact .table th, body.workspace-compact .table td { height: 33px; padding-top: 5px; padding-bottom: 5px; font-size: 12px; }
body.workspace-compact .todo-item { padding: 10px; }
body.workspace-compact .panel { margin-bottom: 10px; }
/* Collapsed sidebar is intentionally desktop only; mobile drawer remains accessible. */
@media (min-width: 1201px) {
    body.workspace-sidebar-collapsed { --sidebar-width: 70px; }
    body.workspace-sidebar-collapsed .brand { padding: 12px 15px; }
    body.workspace-sidebar-collapsed .brand-copy, body.workspace-sidebar-collapsed .menu-label,
    body.workspace-sidebar-collapsed .menu-group-title, body.workspace-sidebar-collapsed .menu-badge,
    body.workspace-sidebar-collapsed .sidebar-footer, body.workspace-sidebar-collapsed .sidebar-create-text { display: none; }
    body.workspace-sidebar-collapsed .sidebar-create { margin: 17px 12px 8px; padding: 10px; }
    body.workspace-sidebar-collapsed .menu-item { justify-content: center; padding: 11px; }
    body.workspace-sidebar-collapsed .menu-icon { width: 20px; }
    body.workspace-sidebar-collapsed .menu-section { border-top: 1px solid #f0f3f7; padding-top: 6px; }
}
/* Works without additional remote libraries. */
.command-dialog {
    width: min(540px, calc(100vw - 32px)); max-height: min(660px, 85vh); padding: 0;
    border-radius: 12px; border: 1px solid #dfe8f2; box-shadow: 0 24px 80px rgba(22,48,82,.22); color: #273950;
}
.command-dialog::backdrop { background: rgba(22,36,57,.36); backdrop-filter: blur(2px); }
.command-input-row { display: flex; align-items: center; gap: 10px; padding: 15px 18px; border-bottom: 1px solid #e8edf3; }
.command-input-row svg { width: 19px; color: #409eff; }
.command-input-row input { outline: 0; border: 0; min-width: 0; flex: 1; font-size: 15px; }
.command-input-row button { background: #f5f7fb; border: 1px solid #e8edf4; color: #7d8fa3; border-radius: 5px; cursor: pointer; }
.command-dialog h3 { margin: 0; padding: 12px 16px 4px; color: #8996a7; font-size: 11px; font-weight: 600; }
.command-list { padding: 6px 10px 12px; max-height: 440px; overflow-y: auto; }
.command-item { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 12px; text-align: left; border: 0; border-radius: 7px; background: #fff; padding: 10px 12px; cursor: pointer; color: #354963; }
.command-item:hover, .command-item:focus { background: #edf6ff; }
.command-item small { color: #98a6b7; }
.command-empty { padding: 24px; text-align: center; color: #9daabc; }
.command-tip { border-top: 1px solid #eff2f6; padding: 10px 16px; color: #98a8ba; font-size: 11px; }
.toast-stack { position: fixed; top: 116px; right: 20px; z-index: 90; pointer-events: none; }
.workspace-toast { padding: 11px 14px; border-radius: 8px; background: #26384e; color: #fff; box-shadow: 0 7px 22px rgba(20,40,65,.16); font-size: 12px; }
@media (max-width: 1200px) {
    .desktop-sidebar-toggle { display: none; }
    .topbar-breadcrumb { display: none; }
    .workspace-tabs { padding: 0 14px; }
    .workspace-welcome { align-items: flex-start; }
}
@media (max-width: 900px) {
    .topbar .command-trigger, .topbar .refresh-trigger { display: inline-flex; }
    .topbar .density-trigger, .tabs-more { display: none; }
    .workspace-tabs { height: 38px; }
    .workspace-tab { padding: 0 9px; }
    .page-header { display: block; padding: 15px 16px 0; }
    .page-header h1 { font-size: 20px; }
    .page-header p, .page-kicker { display: none; }
    .content { padding: 14px 16px 80px; }
}
@media (max-width: 768px) {
    .topbar { padding: 8px 12px; }
    .brand { padding: 12px 18px; }
    .mobile-bottom-nav { background: #fff; border: 1px solid #e1eaf5; box-shadow: 0 8px 28px rgba(24,60,100,.15); border-radius: 12px; }
    .mobile-bottom-nav a { color: #8696a9; border-radius: 8px; }
    .mobile-bottom-nav a.active { background: #edf6ff; color: #409eff; }
    .workspace-welcome { padding: 17px; display: block; }
    .workspace-welcome h2 { font-size: 18px; }
    .workspace-welcome .welcome-actions { margin-top: 16px; }
    .workflow-links { flex-wrap: nowrap; max-width: 100%; overflow-x: auto; width: 100%; padding-bottom: 4px; }
    .workflow-chip { flex: 0 0 auto; }
    .table-tools { align-items: stretch; }
    .table-tools-label { width: 100%; }
    .table-local-search { flex: 1; }
    .table-local-search input { width: 100%; }
    .mobile-stack-table tbody tr { border-color: #e2eaf4; box-shadow: 0 3px 10px rgba(20,40,65,.035); }
    .mobile-stack-table tbody td { font-size: 13px; }
    .order-profit-preview .muted { margin-left: 0; }
    .toast-stack { right: 12px; top: 100px; }
}

.order-pagination { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 15px; }
.page-size-switch { display: inline-flex; align-items: center; }
.page-size-switch label { display: flex; align-items: center; gap: 8px; color: #8492a6; font-size: 12px; }
.page-size-switch select { width: 96px; min-height: 32px; }
.order-pager-links { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.order-pager-links a { display: inline-flex; justify-content: center; align-items: center; min-width: 30px; min-height: 32px; padding: 5px 10px; border: 1px solid #e4ebf3; background: #fff; color: #6e8196; border-radius: 5px; }
.order-pager-links a:hover { border-color: #acd5ff; color: #409eff; }
.order-pager-links a.is-active { color: #fff; background: #409eff; border-color: #409eff; }
/* The hidden attribute must beat display:grid/flex for filtered rows and controls. */
[hidden], .order-table-v25 tbody tr[hidden] { display: none !important; }

/* 写手端沿用统一蓝白视觉，但维持原有写手权限和业务入口。 */
.writer-sidebar { background: #fff; }
.writer-sidebar .brand-mark { background: #409eff; }
.writer-sidebar .menu-item.active { background: #edf6ff; color: #248dfe; box-shadow: inset 3px 0 0 #409eff; }
.writer-profile-card { border: 1px solid #e6eef8; background: #f7faff; }
.writer-profile-card strong { color: #34465c; }
.writer-profile-card small { color: #8295ac; }
.writer-body .avatar { background: #d9eeff; color: #2388e8; }
.writer-body .brand-copy strong { color: #25354b; }
/* 登录入口与管理端视觉一致。 */
.login-body { background: #f3f6fa; }
.login-showcase { background: linear-gradient(155deg, #1975cf, #409eff 62%, #7cbeff); }
.login-showcase::after { opacity: .28; }
.login-brand .brand-mark { color: #409eff; background: #fff; box-shadow: none; }
.login-copy p { color: #dbeeff; }
.login-feature { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.14); }
.login-feature span { color: #e5f3ff; }
.role-tabs { background: #edf3f9; border-radius: 7px; }
.role-tabs span { border-radius: 5px; }
.login-submit { border-radius: 7px; background: #409eff; cursor: pointer; }
.login-submit:hover { background: #258cf3; }
.login-title h2 { color: #27384d; }
@media (max-width: 768px) {
    .writer-mobile-nav { background: #fff; border: 1px solid #e1eaf5; }
    .writer-mobile-nav a.active { background: #edf6ff; color: #409eff; }
}

@media (min-width: 1201px) {
    .order-filter-toolbar { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .order-filter-toolbar > input[name="q"] { grid-column: span 2; }
}

.filter-toggle { display: none; }
@media (max-width: 768px) {
    .filter-toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 10px 12px; border: 1px solid #e8edf4; border-radius: 6px; background: #f8fbff; color: #409eff; font-size: 12px; cursor: pointer; margin-bottom: 8px; }
    .order-filter-toolbar:not(.filters-expanded) > :not(input[name="q"]):not(button[type="submit"]) { display: none !important; }
    .order-filter-toolbar:not(.filters-expanded) { grid-template-columns: minmax(0,1fr) auto; }
    .order-filter-toolbar:not(.filters-expanded)::before { display: none; }
    .order-filter-toolbar:not(.filters-expanded) > input[name="q"] { grid-column: auto; }
    .order-filter-toolbar:not(.filters-expanded) > button[type="submit"] { width: 72px; min-width: 72px; }
    .page-actions { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
    .page-actions a.btn { min-width: 0; font-size: 12px; }
    .order-table-v25.mobile-stack-table tbody tr { grid-template-columns: repeat(2,minmax(0,1fr)); position: relative; }
    .order-table-v25.mobile-stack-table tbody td { min-height: 42px; }
    .order-table-v25.mobile-stack-table tbody td.title-cell, .order-table-v25.mobile-stack-table tbody td.order-actions,
    .order-table-v25.mobile-stack-table tbody td.empty-table-cell { grid-column: 1 / -1; }
    .order-table-v25.mobile-stack-table tbody td.order-actions { flex-direction: row; }
    .order-table-v25.mobile-stack-table tbody td.selection-col { top: 12px; }
    .order-pagination { justify-content: center; }
}

/* V3.1 设备适配 / 键盘操作 / 可读性 */
:focus-visible { outline: 2px solid #2378dc; outline-offset: 2px; }
.workspace-tab-link:focus-visible, .workflow-chip:focus-visible, .order-pager-links a:focus-visible { border-radius: 3px; }
.order-copy-no { margin-left: 5px; padding: 3px 5px; background: #f0f7ff; border: 1px solid #dae8fa; color: #3c86dc; border-radius: 4px; cursor: pointer; font-size: 13px; }
.order-copy-no:hover { color: #1452b8; background: #dbeeff; }
.command-dialog { box-sizing: border-box; margin: auto; overflow: hidden; }
.command-list { overscroll-behavior: contain; }
.app-shell, .main, .content, .card, .panel, .table-wrap { min-width: 0; }
textarea.input { width: 100%; }
@media (max-width: 1200px) and (min-width: 769px) {
    .topbar { padding: 8px 16px; }
    .global-search { width: min(330px, 38vw); }
    .page-header { padding-left: 18px; padding-right: 18px; }
    .content { padding-left: 18px; padding-right: 18px; }
}
@media (max-width: 768px) {
    input, select, textarea, .input, .select, .login-input, .command-input-row input { font-size: 16px; } /* iOS no auto-zoom */
    .content { padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px)); }
    .mobile-bottom-nav { bottom: calc(8px + env(safe-area-inset-bottom, 0px)); }
    .topbar-right { gap: 5px; }
    .workspace-welcome .welcome-actions .btn { min-height: 40px; }
    .workflow-chip, .order-pager-links a { min-height: 39px; display: inline-flex; align-items: center; }
    .command-dialog { max-height: calc(100dvh - 20px); }
    .command-list { max-height: min(50dvh, 390px); }
    .command-item { min-height: 44px; }
    .order-copy-no { min-width: 30px; min-height: 30px; }
}
@media (max-width: 390px) {
    .content { padding-left: 10px; padding-right: 10px; }
    .page-header { padding-left: 12px; }
    .topbar { gap: 4px; padding: 8px 9px; }
    .topbar-left, .topbar-right { gap: 5px; }
    .top-icon { width: 32px; height: 34px; }
    .workspace-tabs { padding-left: 7px; padding-right: 7px; }
    .workspace-tab-link { max-width: 115px; overflow: hidden; text-overflow: ellipsis; }
    .order-pagination { gap: 9px; }
    .order-pager-links { justify-content: center; }
    .order-profit-preview { gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Unified palette for actions originating in the pre-V3 styles. */
.bulk-action-bar { background: #e9f5ff; border: 1px solid #b9dcff; color: #2367a9; border-radius: 8px; }
.bulk-selection strong { color: #2168b0; background: #fff; }
.bulk-action-bar .btn.gray, .bulk-action-bar .btn.light { color: #1c6ebf; border-color: #b9dcff; }
.check-control input:checked + span { background: #409eff; border-color: #409eff; }
.transfer-summary { background: #edf6ff; color: #275786; }
.transfer-dialog { border: 1px solid #dce8f7; border-radius: 10px; }
.dialog-kicker { color: #409eff; }
/* More comfortable touch targets without making desktop tables oversized. */
@media (max-width: 768px) {
  .bulk-actions .btn, .bulk-action-bar button { min-height: 40px; }
  .order-actions > a, .order-actions > button { min-height: 36px; display: inline-flex; align-items: center; }
  .mobile-bottom-nav { padding-bottom: max(4px, env(safe-area-inset-bottom, 0px)); }
}

/* V3.2: compact responsive order intake and financial KPI panels */
.order-entry-tabs { display:flex; flex-wrap:wrap; gap:8px; margin:0 0 15px; }
.order-entry-tabs a { padding:10px 16px; border-radius:9px; border:1px solid #dde7f3; background:#fff; color:#596b83; text-decoration:none; font-size:13px; font-weight:600; transition:background .12s,border-color .12s; }
.order-entry-tabs a.is-active { background:#edf5ff; color:#2563eb; border-color:#9dc6ff; }
.order-entry-tabs a:hover { border-color:#409eff; color:#2563eb; }
.batch-intro .section-head { align-items:flex-start; gap:12px; }
.batch-help { background:#f6f9fe; color:#34455b; border:1px solid #e6edf6; border-radius:9px; padding:13px; font-size:12px; line-height:1.85; overflow-wrap:anywhere; }
.batch-help p { margin:6px 0 0; }
.batch-paste { font:12px/1.6 ui-monospace,SFMono-Regular,Consolas,monospace; width:100%; min-height:185px; white-space:pre; resize:vertical; }
.batch-divider { text-align:center; margin:13px 0; font-size:12px; color:#8794a5; }
.batch-divider span { padding:0 12px; background:#fff; }
.batch-totals { margin:15px 0; }
.dashboard-summary-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin:12px 0 14px; }
.summary-tile { border:1px solid #e9edf5; border-radius:11px; padding:16px; min-width:0; display:flex; flex-direction:column; gap:8px; background:#fff; }
.summary-tile-primary { background:linear-gradient(135deg,#f1f8ff 0%,#f8fbff 100%); border-color:#c8dffc; }
.summary-tile span { font-size:12px; color:#69798f; }
.summary-tile strong { font-size:clamp(18px,1.6vw,26px); font-weight:700; line-height:1.25; font-variant-numeric:tabular-nums; word-break:break-word; }
.summary-tile small { font-size:11px; color:#96a3b5; }
.dashboard-mini-comparison { display:flex; gap:12px; border-top:1px solid #edf1f6; padding-top:14px; flex-wrap:wrap; }
.dashboard-mini-comparison > div { flex:1; min-width:140px; display:flex; flex-direction:column; gap:5px; }
.dashboard-mini-comparison span { font-size:12px; color:#8291a5; }
.dashboard-mini-comparison strong { font-size:16px; }
@media (max-width:1000px) { .dashboard-summary-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:540px) { .dashboard-summary-grid { gap:8px; } .summary-tile { padding:12px; } .summary-tile strong { font-size:18px; } .batch-intro .section-head { display:flex; flex-direction:column; } .order-entry-tabs a { flex:1; text-align:center; padding:10px 9px; } }
@media (max-width:360px) { .dashboard-summary-grid { grid-template-columns:1fr; } }
@media (prefers-reduced-motion:reduce) { .order-entry-tabs a { transition:none; } }
