:root {
  --v2-blue: #1769e0;
  --v2-blue-dark: #0f4fae;
  --v2-blue-soft: #eaf2ff;
  --v2-navy: #152238;
  --v2-text: #24324a;
  --v2-muted: #6b7890;
  --v2-line: #dce4ef;
  --v2-bg: #FFFFFF;
  --v2-card: #ffffff;
  --v2-success: #1a9b67;
  --v2-danger: #d64045;
  --v2-warning: #d58a00;
  --v2-sidebar: 208px;
  --v2-sidebar-collapsed: 68px;
  --v2-topbar: 50px;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--v2-bg); }
html.sidebar-collapsed { --v2-sidebar: var(--v2-sidebar-collapsed); }
body.v2-shell { margin: 0; color: var(--v2-text); background: var(--v2-bg); font-family: Inter, "Segoe UI", "Microsoft YaHei", sans-serif; font-size: 13px; }
body.erp-shell { margin: 0; color: var(--v2-text); background: var(--v2-bg); font-family: Inter, "Segoe UI", "Microsoft YaHei", sans-serif; font-size: 12px; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }

.v2-sidebar { position: fixed; inset: 0 auto 0 0; width: var(--v2-sidebar); z-index: 30; display: flex; flex-direction: column; color: #d8e2f2; background: #17243a; border-right: 1px solid #233553; transition: width .18s ease; }
.v2-sidebar-head { position: relative; flex: 0 0 72px; border-bottom: 1px solid rgba(255,255,255,.08); }
.v2-brand { height: 72px; display: flex; align-items: center; gap: 11px; min-width: 0; padding: 0 54px 0 18px; color: #fff; }
.v2-brand img { width: 36px; height: 36px; object-fit: contain; border-radius: 8px; background: #fff; padding: 4px; }
.v2-brand span { display: grid; line-height: 1.2; }
.v2-brand strong { font-size: 15px; letter-spacing: .2px; }
.v2-brand small { margin-top: 4px; color: #8fa5c5; font-size: 10px; text-transform: uppercase; letter-spacing: 1.3px; }
.v2-sidebar-toggle { position: absolute; top: 50%; right: 12px; width: 28px; height: 28px; display: grid; place-items: center; padding: 0; color: #9fb2cf; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 7px; cursor: pointer; transform: translateY(-50%); transition: color .12s ease, background .12s ease, right .18s ease; }
.v2-sidebar-toggle:hover { color: #fff; background: rgba(255,255,255,.12); }
.v2-sidebar-toggle:focus-visible { outline: 2px solid #78b0ff; outline-offset: 2px; }
.v2-sidebar-toggle i { font-size: 17px; }
.v2-nav { flex: 1; padding: 12px 10px 24px; overflow-y: auto; scrollbar-width: thin; }
.v2-nav section + section { margin-top: 15px; }
.v2-nav h2 { margin: 0 10px 5px; color: #7f94b3; font-size: 10px; font-weight: 700; letter-spacing: 1.1px; }
.v2-nav a { min-height: 34px; display: flex; align-items: center; gap: 10px; padding: 7px 10px; color: #c5d0e1; border-radius: 6px; transition: background .12s ease, color .12s ease; }
.v2-nav a i { width: 18px; font-size: 17px; color: #8fa5c5; }
.v2-nav a:hover { color: #fff; background: rgba(255,255,255,.06); }
.v2-nav a.active { color: #fff; background: #236eda; box-shadow: inset 3px 0 #78b0ff; }
.v2-nav a.active i { color: #fff; }
.v2-sidebar-footer { padding: 12px 14px; border-top: 1px solid rgba(255,255,255,.08); background: #142035; }
.v2-user { display: flex; align-items: center; gap: 9px; }
.v2-user > span, .v2-user > img { width: 30px; height: 30px; flex: 0 0 auto; border-radius: 50%; }
.v2-user > span { display: grid; place-items: center; color: #fff; background: #3479dc; font-weight: 700; }
.v2-user > img { display: block; object-fit: cover; background: #3479dc; border: 1px solid rgba(255,255,255,.24); }
.v2-user-identity { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; line-height: 1.2; }
.v2-user-name { display: block; overflow: hidden; max-width: 150px; color: #f6f8fc; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.v2-user-role { display: block; color: #91a4c1; font-size: 10px; white-space: nowrap; }
.v2-user-actions { display: flex; gap: 14px; margin-top: 9px; color: #9fb0c9; font-size: 11px; }
.v2-user-actions form { margin: 0; }
.v2-user-actions button { color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

.v2-main { min-height: 100vh; margin-left: var(--v2-sidebar); transition: margin-left .18s ease; }
.sidebar-collapsed .v2-brand { justify-content: flex-start; gap: 0; padding: 0 0 0 8px; }
.sidebar-collapsed .v2-brand img { width: 32px; height: 32px; padding: 3px; }
.sidebar-collapsed .v2-brand span { display: none; }
.sidebar-collapsed .v2-sidebar-toggle { right: 5px; width: 22px; height: 26px; color: #b8c7dc; background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.1); border-radius: 5px; }
.sidebar-collapsed .v2-sidebar-toggle i { font-size: 14px; }
.sidebar-collapsed .v2-nav { padding-inline: 8px; }
.sidebar-collapsed .v2-nav h2 { display: none; }
.sidebar-collapsed .v2-nav section + section { margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.08); }
.sidebar-collapsed .v2-nav a { justify-content: center; gap: 0; padding-inline: 0; font-size: 0; }
.sidebar-collapsed .v2-nav a i { width: auto; font-size: 20px; }
.sidebar-collapsed .v2-sidebar-footer { padding-inline: 8px; }
.sidebar-collapsed .v2-user { justify-content: center; gap: 0; }
.sidebar-collapsed .v2-user div,
.sidebar-collapsed .v2-user-actions { display: none; }
.v2-topbar { position: sticky; top: 0; z-index: 20; height: var(--v2-topbar); display: flex; align-items: center; justify-content: space-between; padding: 0 24px; color: var(--v2-muted); background: rgba(255,255,255,.96); border-bottom: 1px solid var(--v2-line); backdrop-filter: blur(8px); }
.environment-dot { width: 7px; height: 7px; display: inline-block; margin-right: 7px; border-radius: 50%; background: var(--v2-success); box-shadow: 0 0 0 3px rgba(26,155,103,.12); }
.v2-top-actions { display: flex; align-items: center; gap: 18px; font-size: 12px; }
.v2-top-actions a { color: var(--v2-blue); }
.v2-content { padding: 20px 24px 36px; }

.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.page-heading h1 { margin: 2px 0 0; color: var(--v2-navy); font-size: 24px; line-height: 1.25; }
.page-heading p { margin: 5px 0 0; color: var(--v2-muted); }
.page-eyebrow { color: var(--v2-blue); font-size: 10px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; }
.page-actions { display: flex; gap: 8px; align-items: center; }

.filter-bar, .panel, .stat-card { background: var(--v2-card); border: 1px solid var(--v2-line); border-radius: 8px; box-shadow: 0 2px 8px rgba(20,42,75,.035); }
.filter-bar { display: flex; align-items: flex-end; gap: 10px; padding: 12px; margin-bottom: 14px; }
.filter-bar .field { min-width: 130px; }
.filter-spacer { flex: 1; }
.panel { margin-bottom: 14px; overflow: hidden; }
.panel-header { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 14px; border-bottom: 1px solid var(--v2-line); }
.panel-header h2 { margin: 0; font-size: 15px; color: var(--v2-navy); }
.panel-header p { margin: 3px 0 0; color: var(--v2-muted); font-size: 11px; }
.panel-body { padding: 14px; }

.stat-grid { display: grid; grid-template-columns: repeat(5, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.stat-card { position: relative; min-height: 108px; padding: 14px; overflow: hidden; }
.stat-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--tone, var(--v2-blue)); }
.stat-card-head { display: flex; align-items: center; justify-content: space-between; color: var(--v2-muted); }
.stat-card-head i { font-size: 18px; color: var(--tone, var(--v2-blue)); }
.stat-card > strong { display: block; margin-top: 10px; color: var(--v2-navy); font-size: 22px; line-height: 1; font-variant-numeric: tabular-nums; }
.stat-card > small { display: block; margin-top: 8px; color: var(--v2-muted); }
.tone-green { --tone: var(--v2-success); }
.tone-red { --tone: var(--v2-danger); }
.tone-amber { --tone: var(--v2-warning); }
.tone-cyan { --tone: #168aad; }
.tone-purple { --tone: #7258c8; }

.data-table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; min-width: 1000px; border-collapse: collapse; font-size: 12px; }
.data-table th { position: sticky; top: 0; z-index: 1; height: 38px; padding: 7px 10px; color: #5c6b82; background: #f6f8fb; border-bottom: 1px solid var(--v2-line); text-align: left; font-size: 11px; font-weight: 700; white-space: nowrap; }
.data-table td { height: 42px; padding: 7px 10px; border-bottom: 1px solid #e8edf4; white-space: nowrap; vertical-align: middle; }
.data-table tbody tr:hover { background: #f8fbff; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table .numeric { text-align: right; font-variant-numeric: tabular-nums; }
.data-table .negative { color: var(--v2-danger); font-weight: 700; }
.data-table .missing-cell { background: #fff8df; color: #8d6100; }
.table-link { color: var(--v2-blue); font-weight: 600; }

.status-badge { display: inline-flex; align-items: center; min-height: 22px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.status-success { color: #0d7950; background: #e5f7ef; }
.status-danger { color: #b52d35; background: #fdebed; }
.status-warning { color: #8b6100; background: #fff4d2; }
.status-info { color: #126d91; background: #e5f6fc; }
.status-neutral { color: #59677b; background: #eef1f5; }

.field { display: grid; gap: 4px; }
.field > span, .field > label { color: #5f6c7f; font-size: 11px; font-weight: 700; }
.form-control, .form-select, .field input, .field select, .field textarea { min-height: 34px; border: 1px solid #cfd8e5; border-radius: 5px; background: #fff; color: var(--v2-text); padding: 6px 9px; outline: none; }
.field textarea { resize: vertical; }
.form-control:focus, .form-select:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: #74a7ee; box-shadow: 0 0 0 3px rgba(23,105,224,.10); }
.form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.span-2 { grid-column: span 2; }
.span-4 { grid-column: 1 / -1; }
.form-section { padding: 16px; border-bottom: 1px solid var(--v2-line); }
.form-section:last-child { border-bottom: 0; }
.form-section h2 { margin: 0 0 12px; font-size: 14px; color: var(--v2-navy); }
.required > span::after { content: " *"; color: var(--v2-danger); }
.help-text { color: var(--v2-muted); font-size: 11px; }

.btn { min-height: 34px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 5px; font-size: 12px; font-weight: 700; padding: 6px 12px; border: 1px solid transparent; cursor: pointer; }
.btn-primary { color: #fff; background: var(--v2-blue); border-color: var(--v2-blue); }
.btn-primary:hover { background: var(--v2-blue-dark); }
.btn-outline-secondary { color: #526078; background: #fff; border-color: #cfd8e5; }
.btn-outline-danger { color: var(--v2-danger); background: #fff; border-color: #efb6ba; }
.btn-sm { min-height: 28px; padding: 4px 9px; font-size: 11px; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(330px, .8fr); gap: 14px; }
.chart-box { min-height: 280px; }
.alert-list { display: grid; gap: 8px; padding: 12px; }
.alert-row { display: grid; grid-template-columns: 28px 1fr auto; gap: 9px; align-items: center; padding: 9px; border: 1px solid var(--v2-line); border-radius: 6px; }
.alert-row > i { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 5px; color: var(--v2-danger); background: #fdebed; }
.alert-row strong { display: block; font-size: 12px; }
.alert-row small { color: var(--v2-muted); }

.pagination-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-top: 1px solid var(--v2-line); color: var(--v2-muted); }
.pagination { display: flex; gap: 4px; margin: 0; }
.pagination a, .pagination span { min-width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--v2-line); border-radius: 4px; background: #fff; }
.pagination .current { color: #fff; background: var(--v2-blue); border-color: var(--v2-blue); }

.empty-state { min-height: 220px; display: grid; place-items: center; align-content: center; color: var(--v2-muted); text-align: center; }
.empty-state i { font-size: 36px; color: #9badc4; }
.empty-state strong { margin-top: 8px; color: var(--v2-text); font-size: 14px; }
.empty-state p { margin: 4px 0 0; }
.error-panel { min-height: 560px; display: grid; place-items: center; align-content: center; text-align: center; }
.error-panel > span { color: #cbd5e2; font-size: 92px; font-weight: 800; line-height: 1; }
.error-panel h1 { margin: 10px 0 0; color: var(--v2-navy); }
.error-panel p { color: var(--v2-muted); }
.flash-stack { display: grid; gap: 8px; margin-bottom: 12px; }
.alert { margin: 0; padding: 9px 12px; border-radius: 5px; }

/* 2026-08 information architecture: one global header and one contextual sidebar. */
:root { --erp-header-height: 54px; --erp-sidebar-width: 194px; }
.erp-global-header { position: fixed; inset: 0 0 auto 0; z-index: 1040; height: var(--erp-header-height); display: grid; grid-template-columns: var(--erp-sidebar-width) minmax(0,1fr) auto; align-items: stretch; color: var(--v2-text); background: #fff; border-bottom: 1px solid #e5eaf3; box-shadow: 0 2px 8px rgba(20,42,75,.06); }
.erp-brand { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 0 14px; color: var(--v2-navy); border-right: 1px solid #e5eaf3; }
.erp-brand img { width: 32px; height: 32px; padding: 3px; object-fit: contain; border-radius: 7px; background: #fff; }
.erp-brand span { min-width: 0; display: grid; line-height: 1.15; }
.erp-brand strong { font-size: 14px; white-space: nowrap; }
.erp-brand small { max-width: 125px; margin-top: 3px; overflow: hidden; color: var(--v2-muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.erp-top-modules { min-width: 0; display: flex; align-items: stretch; padding: 0 8px; overflow-x: auto; scrollbar-width: none; }
.erp-top-modules::-webkit-scrollbar { display: none; }
.erp-top-modules a { position: relative; min-width: 66px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 0 10px; color: #526078; font-size: 12px; white-space: nowrap; }
.erp-top-modules a::after { content: ""; position: absolute; inset: auto 12px 0; height: 3px; border-radius: 2px 2px 0 0; background: transparent; }
.erp-top-modules a:hover { color: var(--v2-blue); background: #f4f8ff; }
.erp-top-modules a.active { color: var(--v2-blue); background: var(--v2-blue-soft); }
.erp-top-modules a.active::after { background: var(--v2-blue); }
.erp-top-modules i { font-size: 16px; }
.erp-top-modules em { min-width: 16px; height: 16px; display: grid; place-items: center; padding: 0 4px; color: #fff; background: #df4149; border-radius: 999px; font-size: 9px; font-style: normal; }
.erp-header-actions { display: flex; align-items: center; gap: 6px; padding: 0 12px; border-left: 1px solid #e5eaf3; }
.erp-exception-button { position: relative; width: 34px; height: 34px; display: grid; place-items: center; color: #526078; border-radius: 6px; }
.erp-exception-button:hover { color: var(--v2-blue); background: #f4f8ff; }
.erp-exception-button i { font-size: 18px; }
.erp-exception-button span { position: absolute; top: 1px; right: 0; min-width: 15px; height: 15px; display: grid; place-items: center; padding: 0 3px; color: #fff; background: #df4149; border: 2px solid #fff; border-radius: 999px; font-size: 8px; }
.erp-account-dropdown { position: relative; }
.erp-account-dropdown > summary { list-style: none; cursor: pointer; }
.erp-account-dropdown > summary::-webkit-details-marker { display: none; }
.erp-user-menu { height: 38px; display: flex; align-items: center; gap: 7px; padding: 0 7px; color: var(--v2-text); background: transparent; border: 0; border-radius: 6px; }
.erp-user-menu:hover { background: #f4f8ff; }
.erp-user-menu > span,.erp-user-menu > img { width: 27px; height: 27px; display: grid; place-items: center; object-fit: cover; color: #fff; background: #3479dc; border-radius: 50%; font-weight: 700; }
.erp-user-menu b { max-width: 76px; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.erp-account-dropdown[open] .erp-user-menu > .ti-chevron-down { transform: rotate(180deg); }
.erp-account-menu { min-width: 210px; padding: 7px; }
.erp-account-dropdown[open] > .erp-account-menu { position: absolute; top: calc(100% + 2px); right: 0; left: auto; z-index: 1100; display: block; }
.erp-account-summary { display: grid; padding: 8px 10px; border-bottom: 1px solid var(--v2-line); }
.erp-account-summary small { margin-top: 2px; color: var(--v2-muted); }
.erp-account-menu .dropdown-item { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 4px; }
.erp-account-menu form { margin: 0; }
.erp-mobile-menu { display: none; color: var(--v2-blue); background: transparent; border: 0; }
.erp-body { min-height: 100vh; padding-top: var(--erp-header-height); }
.erp-module-sidebar { position: fixed; inset: var(--erp-header-height) auto 0 0; z-index: 1025; width: var(--erp-sidebar-width); display: flex; flex-direction: column; color: #526078; background: #fff; border-right: 1px solid #e5eaf3; box-shadow: 2px 0 8px rgba(20,42,75,.035); }
.erp-sidebar-title { min-height: 44px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; color: var(--v2-navy); border-bottom: 1px solid #e5eaf3; }
.erp-sidebar-title strong { font-size: 13px; }
.erp-sidebar-title button { display: none; color: var(--v2-blue); background: transparent; border: 0; }
.erp-module-sidebar nav { flex: 1; padding: 8px; overflow-y: auto; scrollbar-width: thin; }
.erp-module-sidebar section + section { margin-top: 10px; }
.erp-module-sidebar h2 { margin: 0 8px 4px; color: #8995a8; font-size: 9px; letter-spacing: .8px; }
.erp-module-sidebar a { min-height: 31px; display: flex; align-items: center; gap: 8px; padding: 6px 8px; color: #46566f; border-radius: 5px; line-height: 1.25; }
.erp-module-sidebar a i { width: 17px; flex: 0 0 auto; color: #6b7890; font-size: 15px; }
.erp-module-sidebar a:hover { color: var(--v2-blue); background: #f4f8ff; }
.erp-module-sidebar a.active { color: #fff; background: #246dd3; box-shadow: inset 3px 0 #7cb1ff; }
.erp-module-sidebar a.active i { color: #fff; }
.erp-sidebar-backdrop { display: none; }
.erp-content { min-height: calc(100vh - var(--erp-header-height)); margin-left: var(--erp-sidebar-width); padding: 14px 16px 28px; }
.erp-content .page-heading { margin-bottom: 10px; }
.erp-content .page-heading h1 { font-size: 21px; }
.erp-content .page-heading p { margin-top: 3px; font-size: 11px; }
.erp-content .filter-bar { padding: 9px 10px; margin-bottom: 10px; }
.erp-content .panel { margin-bottom: 10px; }
.erp-content .panel-header { min-height: 42px; padding: 8px 11px; }
.erp-content .panel-body { padding: 11px; }
.erp-content .stat-grid { gap: 8px; margin-bottom: 10px; }
.erp-content .stat-card { min-height: 88px; padding: 11px; }
.erp-content .stat-card > strong { margin-top: 7px; font-size: 19px; }
.erp-content .stat-card > small { margin-top: 6px; font-size: 10px; }
.erp-content .data-table th { height: 33px; padding: 5px 8px; }
.erp-content .data-table td { height: 36px; padding: 5px 8px; }
.erp-detail-drawer { width: min(980px, 82vw) !important; border-left: 1px solid var(--v2-line); }
.erp-detail-drawer .offcanvas-header { min-height: 58px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--v2-line); }
.erp-detail-drawer .offcanvas-header small { color: var(--v2-blue); font-size: 9px; font-weight: 800; letter-spacing: 1px; }
.erp-detail-drawer .offcanvas-header h2 { margin: 1px 0 0; color: var(--v2-navy); font-size: 17px; }
.erp-drawer-actions { display: flex; align-items: center; gap: 10px; }
.erp-detail-drawer .offcanvas-body { padding: 12px 14px 24px; background: #f5f7fb; }
.erp-detail-drawer .page-heading { margin-bottom: 10px; }
.erp-detail-drawer .page-heading .page-actions { display: none; }
.erp-detail-drawer .dashboard-grid { grid-template-columns: 1fr; }
.erp-detail-drawer .catalog-detail-grid { grid-template-columns: 1fr; }
.erp-detail-drawer .data-table { min-width: 760px; }
.erp-detail-error { min-height: 260px; display: grid; place-items: center; align-content: center; gap: 8px; color: var(--v2-muted); text-align: center; }
.erp-detail-error i { color: var(--v2-danger); font-size: 34px; }
.dashboard-tabs { display: flex; gap: 4px; margin-bottom: 10px; border-bottom: 1px solid var(--v2-line); }
.dashboard-tabs a { padding: 8px 13px; color: var(--v2-muted); border-bottom: 2px solid transparent; font-weight: 700; }
.dashboard-tabs a.active { color: var(--v2-blue); border-bottom-color: var(--v2-blue); }
.all-functions-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.all-functions-group { padding: 12px; background: #fff; border: 1px solid var(--v2-line); border-radius: 7px; }
.all-functions-group h2 { margin: 0 0 9px; color: var(--v2-navy); font-size: 14px; }
.all-functions-group nav { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 5px; }
.all-functions-group a { min-height: 31px; display: flex; align-items: center; gap: 7px; padding: 6px 8px; color: #40516b; background: #f7f9fc; border-radius: 4px; }
.all-functions-group a:hover { color: var(--v2-blue); background: var(--v2-blue-soft); }
.all-functions-group i { color: #6c83a4; font-size: 15px; }
@media (max-width: 1365px) {
  :root { --erp-sidebar-width: 180px; }
  .erp-top-modules a { min-width: 58px; padding-inline: 7px; }
  .erp-top-modules a i { display: none; }
  .erp-user-menu b { display: none; }
  .all-functions-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 980px) {
  .erp-global-header { grid-template-columns: 154px minmax(0,1fr) auto; }
  .erp-brand { padding-inline: 9px; }
  .erp-brand small { display: none; }
  .erp-top-modules a { min-width: 52px; padding-inline: 6px; }
  .erp-module-sidebar { transform: translateX(-100%); transition: transform .18s ease; }
  .sidebar-open .erp-module-sidebar { transform: translateX(0); }
  .sidebar-open .erp-sidebar-backdrop { position: fixed; inset: var(--erp-header-height) 0 0; z-index: 1020; display: block; background: rgba(13,25,43,.35); border: 0; }
  .erp-sidebar-title button,.erp-mobile-menu { display: grid; place-items: center; }
  .erp-content { margin-left: 0; }
  .erp-detail-drawer { width: min(940px, 94vw) !important; }
}
@media (max-width: 680px) {
  .erp-global-header { grid-template-columns: 52px minmax(0,1fr) auto; }
  .erp-brand { justify-content: center; padding: 0; }
  .erp-brand img { width: 30px; height: 30px; }
  .erp-brand span,.erp-exception-button { display: none; }
  .erp-top-modules a { min-width: 45px; font-size: 11px; }
  .erp-content { padding: 10px; }
  .erp-detail-drawer { width: 100vw !important; }
  .all-functions-grid { grid-template-columns: 1fr; }
}

/* Compact page-level status navigation used by high-volume business lists. */
.erp-status-tabs {
  display: flex;
  align-items: stretch;
  gap: 4px;
  width: max-content;
  max-width: 100%;
  margin: 0 0 12px;
  padding: 4px;
  overflow-x: auto;
  border: 1px solid #dfe6ef;
  border-radius: 9px;
  background: #fff;
}

.erp-status-tabs a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 6px;
  color: #526173;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.erp-status-tabs a:hover,
.erp-status-tabs a.active {
  color: #0b5fd7;
  background: #eaf3ff;
}

.erp-status-tabs strong {
  min-width: 20px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #edf1f6;
  color: #344054;
  font-size: 11px;
  text-align: center;
}

.erp-status-tabs a.active strong {
  background: #0b5fd7;
  color: #fff;
}

@media (max-width: 1280px) {
  .stat-grid { grid-template-columns: repeat(4, minmax(145px, 1fr)); }
  .form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .span-4 { grid-column: 1 / -1; }
}

.login-shell { min-width: 1180px; min-height: 100vh; margin: 0; color: var(--v2-text); background: #eef3f9; font-family: Inter, "Segoe UI", "Microsoft YaHei", sans-serif; }
.login-layout { min-height: 100vh; display: grid; grid-template-columns: minmax(540px, 1.15fr) minmax(500px, .85fr); }
.login-intro { position: relative; display: flex; flex-direction: column; padding: 42px 58px; color: #dce8f8; background: #16253d; overflow: hidden; }
.login-intro::after { content: ""; position: absolute; width: 540px; height: 540px; right: -210px; bottom: -250px; border: 90px solid rgba(77,137,220,.12); border-radius: 50%; }
.login-brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; }
.login-brand img { width: 42px; height: 42px; object-fit: contain; padding: 5px; background: #fff; border-radius: 8px; }
.login-brand span { display: grid; }
.login-brand strong { color: #fff; font-size: 16px; }
.login-brand small { margin-top: 3px; color: #89a3c7; font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; }
.login-copy { position: relative; z-index: 1; margin: auto 0; max-width: 720px; }
.login-copy .page-eyebrow { color: #6aa8ff; }
.login-copy h1 { margin: 18px 0 0; color: #fff; font-size: 42px; line-height: 1.34; letter-spacing: -.8px; }
.login-copy p { max-width: 610px; margin: 22px 0 0; color: #9fb1cb; font-size: 15px; line-height: 1.8; }
.login-features { display: flex; gap: 10px; margin-top: 32px; }
.login-features span { display: inline-flex; align-items: center; gap: 7px; padding: 9px 12px; color: #c7d8ee; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.09); border-radius: 5px; }
.login-features i { color: #6aa8ff; font-size: 17px; }
.login-foot { position: relative; z-index: 1; color: #657e9f; font-size: 10px; letter-spacing: 1.3px; }
.login-panel { display: grid; place-items: center; padding: 60px; background: #f6f8fb; }
.login-card { width: 390px; display: grid; gap: 16px; padding: 34px; background: #fff; border: 1px solid var(--v2-line); border-radius: 9px; box-shadow: 0 18px 45px rgba(28,48,80,.10); }
.login-card header { margin-bottom: 5px; text-align: center; }
.login-card h2 { margin: 12px 0 0; color: var(--v2-navy); font-size: 24px; }
.login-card header p { margin: 7px 0 0; color: var(--v2-muted); }
.login-mark { width: 46px; height: 46px; display: inline-grid; place-items: center; color: #fff; background: var(--v2-blue); border-radius: 8px; font-size: 23px; }
.login-submit { width: 100%; margin-top: 4px; }
.login-hint { color: var(--v2-muted); text-align: center; }
.setup-layout .login-intro { min-height: 100vh; }

/* Login page: scoped white enterprise sign-in; other pages are unaffected. */
.login-page-root { min-width: 0; background: #fff; }
.login-page {
  min-width: 0;
  min-height: 100vh;
  margin: 0;
  overflow: auto;
  color: #1f2937;
  background: #fff;
  font-family: Inter, "Segoe UI", "Microsoft YaHei", sans-serif;
}
.login-page-stage {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 36px 20px;
}
.login-page-card {
  width: min(458px, calc(100vw - 32px));
  display: grid;
  gap: 26px;
  padding: 38px 42px 40px;
  background: #fff;
  border: 1px solid #edf0f4;
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(30, 50, 80, .08);
}
.login-page-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-width: 0;
}
.login-page-brand img {
  width: 66px;
  height: 52px;
  flex: 0 0 auto;
  object-fit: contain;
}
.login-page-brand h1 {
  margin: 0;
  color: #172033;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: .1px;
  white-space: nowrap;
}
.login-page-card .flash-stack { margin: -4px 0 -6px; }
.login-page-card .alert {
  margin: 0;
  padding: 10px 12px;
  color: #b42318;
  background: #fff4f3;
  border: 1px solid #fecdca;
  border-radius: 8px;
  font-size: 12px;
}
.login-page-fields { display: grid; gap: 20px; }
.login-page-field { display: grid; gap: 9px; }
.login-page-label {
  color: #344054;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .1px;
}
.login-page-input {
  height: 52px;
  display: flex;
  align-items: center;
  color: #667085;
  background: #fff;
  border: 1px solid #d8dee8;
  border-radius: 8px;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.login-page-input:focus-within {
  border-color: #1769d2;
  box-shadow: 0 0 0 3px rgba(23, 105, 210, .12);
}
.login-page-input > i {
  width: 48px;
  flex: 0 0 48px;
  color: #8995a8;
  font-size: 21px;
  text-align: center;
}
.login-page-input input {
  min-width: 0;
  height: 100%;
  flex: 1;
  padding: 0 14px 0 0;
  color: #1f2937;
  caret-color: #1769d2;
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 15px;
}
.login-page-input input::placeholder { color: #98a2b3; opacity: 1; }
.login-password-toggle {
  width: 48px;
  height: 100%;
  display: grid;
  place-items: center;
  flex: 0 0 48px;
  padding: 0;
  color: #7f8b9d;
  background: transparent;
  border: 0;
  border-radius: 0 7px 7px 0;
  cursor: pointer;
}
.login-password-toggle:hover { color: #1769d2; background: #f7f9fc; }
.login-password-toggle:focus-visible { outline: 2px solid #1769d2; outline-offset: -5px; }
.login-password-toggle i { font-size: 21px; }
.login-page-submit {
  width: 100%;
  min-height: 52px;
  margin: 2px 0 0;
  padding: 0 20px;
  color: #fff;
  background: #1769d2;
  border: 1px solid #1769d2;
  border-radius: 8px;
  box-shadow: 0 6px 14px rgba(23, 105, 210, .18);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 2px;
  cursor: pointer;
  transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.login-page-submit:hover {
  background: #125fbd;
  border-color: #125fbd;
  box-shadow: 0 8px 18px rgba(23, 105, 210, .22);
}
.login-page-submit:active { background: #0f55aa; border-color: #0f55aa; }
.login-page-submit:focus-visible { outline: 3px solid rgba(23, 105, 210, .22); outline-offset: 3px; }
@media (max-width: 560px) {
  .login-page-stage { padding: 24px 16px; }
  .login-page-card {
    width: 100%;
    gap: 24px;
    padding: 30px 24px 32px;
    border-color: transparent;
    box-shadow: none;
  }
  .login-page-brand { gap: 11px; }
  .login-page-brand img { width: 58px; height: 46px; }
  .login-page-brand h1 { font-size: clamp(18px, 5vw, 21px); white-space: normal; }
}
@media (max-height: 620px) and (min-width: 561px) {
  .login-page-stage { padding-block: 20px; }
  .login-page-card { gap: 20px; padding-block: 28px 30px; }
  .login-page-fields { gap: 16px; }
}
.compact-form-panel { max-width: 820px; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; background: #f8fafc; border-top: 1px solid var(--v2-line); }
.dashboard-stats { grid-template-columns: repeat(5, minmax(150px, 1fr)); }
.wide-table { min-width: 1650px; }
.weight-list { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 14px; }
.weight-list span { min-width: 150px; display: flex; justify-content: space-between; gap: 16px; padding: 8px 10px; background: #f5f8fc; border: 1px solid var(--v2-line); border-radius: 5px; color: var(--v2-muted); }
.weight-list strong { color: var(--v2-blue); }
.score-cell { color: var(--v2-blue); font-size: 14px; font-weight: 800; }
.chart-box-large { min-height: 360px; }
[hidden] { display: none !important; }
.product-filter { flex-wrap: wrap; }
.product-filter .filter-search { min-width: 250px; }
.import-strip { margin: -4px 0 14px; padding: 10px 12px; background: #eef5ff; border: 1px solid #cedff7; border-radius: 6px; }
.import-strip form { display: flex; align-items: flex-end; gap: 10px; }
.import-strip .field { min-width: 320px; }
.product-table { min-width: 3100px; }
.duplicate-id { color: var(--v2-danger); background: #fff1f2; }
.mono { font-family: Consolas, "SFMono-Regular", monospace; letter-spacing: .25px; }
.thumb-link { color: var(--v2-blue); text-decoration: underline; text-underline-offset: 2px; }
.product-summary { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 8px; margin-bottom: 12px; }
.product-summary > div { min-height: 62px; display: grid; align-content: center; gap: 5px; padding: 10px 12px; background: #fff; border: 1px solid var(--v2-line); border-radius: 6px; }
.product-summary span { color: var(--v2-muted); font-size: 10px; font-weight: 700; }
.product-summary strong { color: var(--v2-navy); }
.product-summary .danger-summary { background: #fff2f3; border-color: #f1c4c7; }
.product-summary .danger-summary strong { color: var(--v2-danger); }
.product-form .check-field { min-height: 34px; display: flex; align-items: center; gap: 8px; padding-top: 18px; }
.file-current { display: flex; gap: 14px; color: var(--v2-muted); font-size: 11px; }
.file-current a { color: var(--v2-blue); }
.image-upload-field { align-content: start; padding: 9px; border: 1px dashed #bdcadb; border-radius: 6px; background: #f8fbff; transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease; }
.image-upload-field:focus { outline: 0; }
.image-upload-field:hover, .image-upload-field.is-active { border-color: #74a7ee; background: #f2f7ff; box-shadow: 0 0 0 3px rgba(23,105,224,.08); }
.image-upload-field.drag-active { border-color: var(--v2-blue); background: #eaf3ff; box-shadow: inset 0 0 0 2px rgba(23,105,224,.10); }
.image-upload-field.upload-ready { border-color: #73b99c; background: #f3fbf7; }
.image-upload-dropzone { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.image-upload-copy { display: grid; gap: 2px; min-width: 0; }
.image-upload-copy strong { color: var(--v2-text); font-size: 12px; }
.image-upload-copy small, .image-upload-meta small { color: var(--v2-muted); font-size: 10px; }
.image-upload-select { position: relative; flex: 0 0 auto; cursor: pointer; }
.image-upload-select input[data-upload-input] { position: absolute; width: 1px; height: 1px; min-height: 1px; padding: 0; opacity: 0; pointer-events: none; }
.image-upload-preview { display: flex; align-items: center; gap: 9px; padding-top: 8px; border-top: 1px solid var(--v2-line); }
.image-upload-preview[hidden] { display: none; }
.image-upload-preview img { width: 58px; height: 46px; flex: 0 0 auto; object-fit: cover; border: 1px solid var(--v2-line); border-radius: 5px; background: #fff; }
.image-upload-meta { display: grid; gap: 2px; min-width: 0; margin-right: auto; }
.image-upload-meta strong { max-width: 260px; overflow: hidden; color: var(--v2-text); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.image-upload-preview .btn { flex: 0 0 auto; }
.image-upload-field .file-current { align-items: center; padding-top: 6px; border-top: 1px solid var(--v2-line); }
.calculation-preview { display: grid; grid-template-columns: repeat(6,1fr); gap: 1px; padding: 1px; background: var(--v2-line); border-top: 1px solid var(--v2-line); }
.calculation-preview > div { display: grid; gap: 5px; padding: 12px 14px; background: #f7f9fc; }
.calculation-preview span { color: var(--v2-muted); font-size: 10px; }
.calculation-preview strong { color: var(--v2-navy); font-size: 15px; }
.duplicate-input { border-color: var(--v2-danger) !important; background: #fff5f5 !important; }
.gtin-search { max-width: 900px; }
.gtin-search textarea { font-family: Consolas, monospace; line-height: 1.65; }
.gtin-bulk-copy-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.gtin-bulk-copy-button {
  min-height: 30px;
  padding: 5px 10px;
  color: var(--v2-blue);
  background: #f4f8ff;
  border: 1px solid #cbd9ec;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}
.gtin-bulk-copy-button:hover { color: #0f5ec7; background: #fff; border-color: #74a7ee; }
.gtin-bulk-copy-button:focus-visible { outline: 2px solid rgba(23, 105, 224, .28); outline-offset: 2px; }
.gtin-bulk-copy-button:disabled { cursor: default; opacity: .72; }
.four-stats { grid-template-columns: repeat(4, minmax(160px, 1fr)); }
.five-stats { grid-template-columns: repeat(5, minmax(150px, 1fr)); }
.two-stats { grid-template-columns: repeat(2, minmax(180px, 260px)); }
.order-table { min-width: 2050px; }
.order-summary { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.cost-ledger { display: grid; padding: 8px 14px 14px; }
.cost-ledger > div { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--v2-line); }
.cost-ledger span { color: var(--v2-muted); }
.cost-ledger .total { margin-top: 3px; color: var(--v2-navy); border-bottom: 0; font-size: 14px; }
.cost-table { min-width: 1700px; }
.exception-list { display: grid; gap: 8px; padding: 12px; }
.exception-card { display: grid; grid-template-columns: 38px minmax(0,1fr) minmax(240px,auto); gap: 12px; align-items: start; padding: 12px; background: #fff; border: 1px solid var(--v2-line); border-left: 3px solid #d58a00; border-radius: 6px; }
.exception-card.severity-danger { border-left-color: var(--v2-danger); }
.exception-card.severity-info { border-left-color: #168aad; }
.exception-icon { width: 36px; height: 36px; display: grid; place-items: center; color: #a56b00; background: #fff4d2; border-radius: 6px; font-size: 19px; }
.severity-danger .exception-icon { color: var(--v2-danger); background: #fdebed; }
.exception-title { display: flex; align-items: center; gap: 7px; }
.exception-title strong { color: var(--v2-navy); font-size: 13px; }
.exception-main p { margin: 6px 0; color: #536178; line-height: 1.55; }
.exception-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--v2-muted); font-size: 10px; }
.exception-meta a { color: var(--v2-blue); }
.exception-actions form { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.exception-actions input { min-width: 180px; height: 30px; border: 1px solid #cfd8e5; border-radius: 4px; padding: 4px 7px; }
.provider-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-bottom: 14px; }
.provider-card { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px; background: #fff; border: 1px solid var(--v2-line); border-radius: 7px; }
.provider-card > div:first-child { display: flex; align-items: center; gap: 10px; }
.provider-logo { width: 38px; height: 38px; display: grid; place-items: center; color: #fff; background: var(--v2-blue); border-radius: 7px; font-weight: 800; }
.provider-card strong { display: block; color: var(--v2-navy); }
.provider-card small { display: block; margin-top: 4px; color: var(--v2-muted); }
.inline-form { display: inline-flex; align-items: center; gap: 5px; margin: 0; }
.inline-form input,.inline-form select { min-height: 29px; border: 1px solid #cfd8e5; border-radius: 4px; padding: 4px 7px; }
.sync-log { display: grid; padding: 12px 14px; }
.sync-log > div { display: grid; grid-template-columns: 150px 70px 180px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--v2-line); align-items: start; }
.sync-log span,.sync-log code { color: var(--v2-muted); font-size: 11px; }
.sync-log p { margin: 0; }
.sync-log .log-error strong { color: var(--v2-danger); }
.sync-log .log-warning strong { color: var(--v2-warning); }
.admin-split { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(350px,.65fr); gap: 14px; }
.admin-form-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.avatar-account-body { display: grid; grid-template-columns: 250px minmax(420px, 680px); gap: 24px; align-items: center; padding: 20px; }
.avatar-current { display: flex; align-items: center; gap: 14px; }
.avatar-current > div:last-child { display: grid; gap: 4px; }
.avatar-current strong { color: var(--v2-navy); font-size: 15px; }
.avatar-current small { color: var(--v2-muted); }
.avatar-display { position: relative; display: grid; place-items: center; flex: 0 0 auto; overflow: hidden; color: #fff; background: linear-gradient(145deg, #1769e0, #704fd1); border: 1px solid #ccdaed; border-radius: 50%; font-weight: 800; box-shadow: 0 2px 7px rgba(24,66,120,.12); }
.avatar-display img { width: 100%; height: 100%; display: block; object-fit: cover; }
.avatar-display img[hidden], .avatar-display span[hidden] { display: none; }
.avatar-display-xl { width: 92px; height: 92px; font-size: 30px; }
.avatar-display-sm { width: 48px; height: 48px; font-size: 16px; }
.avatar-upload-form { display: grid; gap: 10px; }
.avatar-dropzone { min-height: 104px; display: flex; align-items: center; justify-content: center; gap: 14px; padding: 18px; color: #465b76; background: #f8fbff; border: 1px dashed #aebfd5; border-radius: 8px; cursor: pointer; transition: .16s ease; }
.avatar-dropzone:hover, .avatar-dropzone.is-dragging { color: var(--v2-blue); background: #edf5ff; border-color: var(--v2-blue); box-shadow: 0 0 0 3px rgba(23,105,224,.08); }
.avatar-dropzone.has-file { background: #f1faf6; border-color: #69af91; }
.avatar-dropzone.has-error { color: var(--v2-danger); background: #fff5f5; border-color: #df8d91; }
.avatar-dropzone > input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.avatar-dropzone > i { font-size: 30px; }
.avatar-dropzone > span { display: grid; gap: 4px; }
.avatar-dropzone strong { color: inherit; font-size: 13px; }
.avatar-dropzone small { color: var(--v2-muted); font-size: 10px; }
.avatar-selected-preview { display: flex; align-items: center; gap: 10px; padding: 9px 11px; background: #f8fafc; border: 1px solid var(--v2-line); border-radius: 6px; }
.avatar-selected-preview[hidden] { display: none; }
.avatar-selected-preview img { width: 50px; height: 50px; object-fit: cover; border-radius: 50%; border: 1px solid var(--v2-line); }
.avatar-selected-preview div { min-width: 0; display: grid; gap: 3px; }
.avatar-selected-preview strong { max-width: 460px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar-selected-preview small { color: var(--v2-muted); font-size: 10px; }
.avatar-upload-error { min-height: 16px; margin: 0; color: var(--v2-danger); font-size: 11px; }
.user-account-table { min-width: 1840px; }
.user-account-table td { vertical-align: middle; }
.avatar-admin-cell { min-width: 172px; display: flex; align-items: center; gap: 9px; }
.avatar-quick-form { display: grid; grid-template-columns: minmax(70px, 1fr) auto; gap: 4px; align-items: center; }
.avatar-quick-form label { max-width: 116px; overflow: hidden; }
.avatar-quick-form label span { display: inline-block; max-width: 70px; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; white-space: nowrap; }
.rule-sequence { display: grid; gap: 7px; margin: 0; padding-left: 24px; color: #4b5a70; }
.tier-table { max-width: 760px; display: grid; gap: 6px; }
.tier-head,.tier-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.tier-head { color: var(--v2-muted); font-size: 11px; font-weight: 700; }
.tier-row input { min-height: 32px; border: 1px solid #cfd8e5; border-radius: 4px; padding: 5px 8px; }
.weight-editor { display: grid; gap: 7px; }
.weight-editor label { display: grid; grid-template-columns: 170px 1fr 120px; gap: 12px; align-items: center; padding: 9px 10px; background: #f7f9fc; border: 1px solid var(--v2-line); border-radius: 5px; }
.weight-editor code { color: var(--v2-muted); }
.weight-editor input { min-height: 32px; border: 1px solid #cfd8e5; border-radius: 4px; padding: 5px 8px; }
.api-provider-grid { grid-template-columns: repeat(2,minmax(420px,1fr)); }
.provider-card-large { display: grid; align-items: stretch; }
.provider-card dl { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin: 12px 0 0; }
.provider-card dl div { padding: 8px; background: #f6f8fb; border-radius: 4px; }
.provider-card dt { color: var(--v2-muted); font-size: 10px; }
.provider-card dd { margin: 4px 0 0; color: var(--v2-navy); font-weight: 700; }
.prose { color: #4f5e74; line-height: 1.7; }

.ledger-note { display: inline-flex; align-items: center; gap: 6px; color: var(--v2-muted); font-size: 11px; }
.ledger-note i { color: var(--v2-success); font-size: 16px; }
.net-amount-button { min-width: 88px; display: inline-grid; justify-items: end; gap: 1px; padding: 3px 7px; color: var(--v2-blue); background: #edf5ff; border: 1px solid #c8ddf8; border-radius: 5px; cursor: pointer; }
.net-amount-button.provisional { color: #8d6100; background: #fff8df; border-color: #ecd78d; }
.net-amount-button small { font-size: 9px; font-weight: 700; }
.billing-state { display: inline-flex; align-items: center; min-height: 22px; padding: 2px 8px; border-radius: 999px; font-size: 10px; font-weight: 800; white-space: nowrap; }
.billing-state-classified { color: #087a50; background: #e5f7ef; }
.billing-state-pending_classification { color: #8b5d00; background: #fff2c9; }
.billing-state-missing_exchange_rate { color: #a3343b; background: #fdebed; }
.billing-state-duplicate_review { color: #a3343b; background: #fff0e8; }
.billing-state-empty { color: #68768a; background: #eef1f5; }
.duplicate-dot { width: 18px; height: 18px; display: inline-grid; place-items: center; margin-left: 4px; color: #fff; background: var(--v2-danger); border-radius: 50%; font-size: 10px; font-weight: 900; }
.bill-detail-drawer { width: min(1540px, 96vw) !important; border-left: 1px solid var(--v2-line); }
.bill-detail-drawer .offcanvas-header { align-items: flex-start; padding: 18px 20px 14px; border-bottom: 1px solid var(--v2-line); }
.bill-detail-drawer .offcanvas-header h2 { margin: 3px 0; color: var(--v2-navy); font-size: 20px; }
.bill-detail-drawer .offcanvas-header p { margin: 0; color: var(--v2-muted); font-size: 11px; }
.bill-detail-drawer .offcanvas-body { padding: 16px 20px 24px; background: #f7f9fc; }
.drawer-loading { min-height: 300px; display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--v2-muted); }
.bill-shipment-meta { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; margin-bottom: 12px; }
.bill-shipment-meta div { display: grid; gap: 4px; padding: 10px 12px; background: #fff; border: 1px solid var(--v2-line); border-radius: 6px; }
.bill-shipment-meta span { color: var(--v2-muted); font-size: 10px; }
.bill-shipment-meta strong { color: var(--v2-navy); }
.drawer-alert { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; padding: 9px 11px; border: 1px solid; border-radius: 5px; font-size: 11px; }
.drawer-alert.warning { color: #795200; background: #fff8df; border-color: #ecd78d; }
.drawer-alert.danger { color: #9b2f36; background: #fff0f1; border-color: #efbec1; }
.bill-entry-table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--v2-line); border-radius: 6px; }
.bill-entry-table { min-width: 1400px; }
.bill-entry-table td { height: 54px; vertical-align: top; }
.bill-entry-table td small { display: block; margin-top: 3px; color: var(--v2-muted); font-size: 9px; }
.bill-entry-table code { color: var(--v2-blue); }
.bill-entry-duplicate { background: #fff6f0; }
.duplicate-warning { display: inline-flex !important; align-items: center; gap: 3px; margin-top: 5px; color: var(--v2-danger) !important; font-weight: 800; }
.bill-summary { margin-top: 12px; padding: 14px; background: #fff; border: 1px solid var(--v2-line); border-radius: 6px; }
.bill-summary h3 { margin: 0 0 10px; color: var(--v2-navy); font-size: 14px; }
.bill-summary-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 1px; background: var(--v2-line); border: 1px solid var(--v2-line); }
.bill-summary-grid > div { min-height: 55px; display: grid; align-content: center; gap: 4px; padding: 9px 11px; background: #f9fbfd; }
.bill-summary-grid span,.bill-summary-grid small { color: var(--v2-muted); font-size: 10px; }
.bill-summary-grid strong { color: var(--v2-navy); font-variant-numeric: tabular-nums; }
.bill-summary-grid .negative { color: var(--v2-danger); }
.bill-summary-grid .bill-net-total { color: #fff; background: var(--v2-navy); }
.bill-summary-grid .bill-net-total span,.bill-summary-grid .bill-net-total small,.bill-summary-grid .bill-net-total strong { color: #fff; }
.bill-summary-grid .bill-net-total strong { font-size: 17px; }
.manual-entry-notice { display: flex; gap: 8px; margin-bottom: 14px; padding: 10px 12px; color: #765200; background: #fff7dc; border: 1px solid #ecd58a; border-radius: 5px; }
.billing-check { min-height: 58px; display: flex; align-items: center; gap: 8px; padding: 20px 10px 0; color: #4f5e74; }
.billing-check input { width: 16px; height: 16px; }
.rate-period-list { display: grid; gap: 6px; }
.rate-period-list > div { display: grid; grid-template-columns: 120px 220px 90px 1fr; gap: 10px; align-items: center; padding: 8px 10px; background: #f7f9fc; border: 1px solid var(--v2-line); border-radius: 5px; }
.rate-period-list span,.rate-period-list small { color: var(--v2-muted); }
.modal-header p { margin: 4px 0 0; color: var(--v2-muted); font-size: 11px; }

.entry-status { display: inline-flex; align-items: center; min-height: 22px; padding: 2px 8px; border-radius: 999px; font-size: 10px; font-weight: 800; white-space: nowrap; }
.entry-status-pending { color: #8b5d00; background: #fff2c9; }
.entry-status-current_confirmed { color: #225fb1; background: #e8f1ff; }
.entry-status-mapped,.entry-status-classified { color: #087a50; background: #e5f7ef; }
.entry-status-missing_exchange_rate,.entry-status-duplicate_review { color: #a3343b; background: #fdebed; }
.bill-entry-actions { display: flex; flex-wrap: wrap; gap: 5px; min-width: 118px; }
.classification-safety-note { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; padding: 10px 12px; color: #765200; background: #fff8df; border: 1px solid #ecd78d; border-radius: 6px; }
.classification-safety-note i { flex: 0 0 auto; color: #9b6a00; font-size: 18px; }
.classification-form-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.classification-cost-check { min-height: 58px; display: flex; align-items: center; gap: 9px; padding: 19px 11px 0; color: #4f5e74; }
.classification-cost-check input { width: 17px; height: 17px; }
.classification-cost-check span { display: grid; gap: 2px; }
.classification-cost-check strong { color: var(--v2-navy); font-size: 12px; }
.classification-cost-check small { color: var(--v2-muted); font-size: 10px; }
.classification-actions { flex-wrap: wrap; }

.rule-safety-note { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; padding: 13px 15px; color: #654700; background: #fff9e7; border: 1px solid #ecd78d; border-radius: 7px; }
.rule-safety-note > i { margin-top: 1px; color: #9b6a00; font-size: 22px; }
.rule-safety-note strong { color: #614500; }
.rule-safety-note p { margin: 4px 0 0; line-height: 1.6; }
.rule-check { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.rule-check input { width: 16px; height: 16px; }
.rule-disabled { opacity: .66; background: #f4f6f8; }

/* Profit share and settlement workspace */
.settlement-policy-note,.settlement-gate { display:flex; align-items:flex-start; gap:12px; margin-bottom:14px; padding:13px 15px; border:1px solid #c9dcf7; border-radius:7px; color:#34536f; background:#eef5ff; }
.settlement-policy-note > i,.settlement-gate > i { flex:0 0 auto; color:var(--v2-blue); font-size:22px; }
.settlement-policy-note strong,.settlement-gate strong { color:var(--v2-navy); }
.settlement-policy-note p,.settlement-gate p { margin:4px 0 0; line-height:1.6; }
.settlement-gate.warning { color:#795200; background:#fff8df; border-color:#ecd78d; }
.settlement-gate.warning > i { color:#a66f00; }
.settlement-gate.success { color:#176645; background:#eaf8f1; border-color:#b9e6cf; }
.settlement-gate.success > i { color:var(--v2-success); }
.three-stats { grid-template-columns:repeat(3,minmax(180px,1fr)); }
.settlement-table { min-width:1700px; }
.settlement-items-table { min-width:1900px; }
.loss-table { min-width:1700px; }
.responsibility-table { min-width:1300px; }
.component-grid { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:1px; padding:1px; background:var(--v2-line); }
.component-grid > div { display:grid; gap:6px; padding:13px; background:#f9fbfd; }
.component-grid span { color:var(--v2-muted); font-size:10px; }
.component-grid strong { color:var(--v2-navy); font-size:14px; }
.snapshot-strip { display:flex; flex-wrap:wrap; gap:8px 20px; padding:12px 14px; color:var(--v2-muted); background:#f4f7fb; border-top:1px solid var(--v2-line); }
.snapshot-strip strong { color:var(--v2-navy); }
.settlement-action-grid,.configuration-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.action-stack { display:grid; gap:10px; }
.action-stack form { display:flex; align-items:flex-end; gap:8px; }
.handover-form { display:grid; grid-template-columns:150px 180px 200px auto; gap:5px; }
.handover-form select,.handover-form input { min-height:29px; border:1px solid #cfd8e5; border-radius:4px; padding:4px 7px; }
.plan-item-editor { display:grid; gap:7px; padding:14px 16px; border-bottom:1px solid var(--v2-line); }
.plan-item-editor > div { display:grid; grid-template-columns:1fr 120px; gap:7px; }
.plan-item-editor select,.plan-item-editor input { min-height:34px; border:1px solid #cfd8e5; border-radius:5px; padding:6px 9px; }

/* Product entry: layout ported from the legacy product_form.html, scoped to V2. */
.legacy-product-heading { min-height:74px; align-items:center; margin-bottom:12px; }
.legacy-product-heading h1 { margin:3px 0 4px; }
.legacy-product-heading > div > p:last-child { font-size:12.5px; }
.legacy-product-form { display:grid; grid-template-columns:minmax(0,1fr) 290px; gap:16px; align-items:start; overflow:visible; border:0; background:transparent; box-shadow:none; margin-bottom:0; }
.legacy-product-form .form-main { min-width:0; }
.legacy-product-form .product-entry-panel { overflow:clip; border:1px solid var(--v2-line); border-radius:9px; background:#fff; box-shadow:0 2px 8px rgba(20,42,75,.045); }
.legacy-product-form .record-owner-bar { display:grid; grid-template-columns:minmax(190px,.65fr) minmax(0,1.35fr); align-items:center; gap:18px; border-bottom:1px solid var(--v2-line); padding:12px 18px; }
.legacy-product-form .record-owner-tools { display:grid; gap:8px; min-width:0; }
.legacy-product-form .record-owner-fields { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.legacy-product-form .record-owner-fields .field { align-self:end; }
.legacy-product-form .ownership-transfer-panel { border-top:1px solid var(--v2-line); padding-top:7px; }
.legacy-product-form .ownership-transfer-panel > summary { display:inline-flex; align-items:center; gap:5px; color:var(--v2-blue); font-size:11px; font-weight:700; cursor:pointer; }
.legacy-product-form .ownership-transfer-fields { display:grid; grid-template-columns:minmax(160px,.8fr) minmax(220px,1.2fr) auto; align-items:end; gap:8px; margin-top:8px; }
.import-owner-hint { align-self:center; min-width:180px; color:var(--v2-muted); font-size:11px; }
.import-owner-hint strong { color:var(--v2-navy); }
.legacy-product-form .form-section { margin:0; border:0; border-bottom:1px solid var(--v2-line); border-radius:0; background:transparent; box-shadow:none; padding:14px 18px 16px; }
.legacy-product-form .section-title { display:flex; align-items:center; gap:10px; margin-bottom:11px; }
.legacy-product-form .record-owner-bar .section-title { margin:0; }
.legacy-product-form .section-title > span,
.legacy-product-form .section-number { display:grid; place-items:center; flex:0 0 auto; width:32px; height:32px; border:1px solid #d8e5f8; border-radius:8px; background:linear-gradient(145deg,#3184f4,#1769dd); color:#fff; box-shadow:0 5px 12px rgba(40,120,234,.16); font-size:12px; font-weight:800; }
.legacy-product-form .section-title h2 { margin:0; color:var(--v2-navy); font-size:15px; font-weight:800; }
.legacy-product-form .section-title p { margin:2px 0 0; color:var(--v2-muted); font-size:11px; }
.legacy-product-form .form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.legacy-product-form .walmart-fields { grid-template-columns:1.4fr 1fr 1fr .9fr; }
.legacy-product-form .supplier-fields { grid-template-columns:2fr 1fr 1fr; }
.legacy-product-form .field { display:block; min-width:0; }
.legacy-product-form .field > span { display:block; margin-bottom:6px; color:#5f6c7f; font-size:11px; font-weight:700; }
.legacy-product-form .field small { display:block; margin-top:5px; color:var(--v2-muted); font-size:10px; line-height:1.45; }
.legacy-product-form .field.required > span::after,
.legacy-product-form .upload-field.required .image-upload-copy strong::after { content:" 必填"; color:#a36f00; font-size:10px; font-weight:700; }
.legacy-product-form .field.required input,
.legacy-product-form .field.required select,
.legacy-product-form .upload-field.required { background-color:#fffaf0; }
.legacy-product-form .span-2 { grid-column:1 / -1; }
.legacy-product-form .inline-upload-section { display:grid; grid-template-columns:minmax(190px,280px) minmax(0,1fr); align-items:center; gap:16px; }
.legacy-product-form .inline-upload-section .section-title,
.legacy-product-form .inline-upload-section .compact-upload { margin:0; }
.legacy-product-form .upload-field { display:flex; flex-wrap:wrap; align-items:center; gap:10px; min-height:58px; margin-top:10px; border:1px solid #dae4f0; border-radius:7px; background:#f8fbff; padding:7px 10px; transition:border-color .16s ease,background-color .16s ease,box-shadow .16s ease; }
.legacy-product-form .upload-field:hover { border-color:#a9c5eb; background:#f5f9ff; }
.legacy-product-form .upload-field:focus,
.legacy-product-form .upload-field:focus-within,
.legacy-product-form .upload-field.is-active { outline:0; border-color:#74a7ee; box-shadow:0 0 0 3px rgba(23,105,224,.08); }
.legacy-product-form .upload-field.drag-active { border-color:var(--v2-blue); background:#eaf3ff; box-shadow:inset 0 0 0 2px rgba(23,105,224,.1); }
.legacy-product-form .upload-field.upload-ready { border-color:#73b99c; background:#f3fbf7; }
.legacy-product-form .image-upload-copy { flex:1 1 180px; min-width:160px; }
.legacy-product-form .image-upload-copy strong { display:block; color:var(--v2-text); font-size:12px; font-weight:700; }
.legacy-product-form .image-upload-copy small { display:block; margin-top:4px; color:var(--v2-muted); font-size:10px; }
.legacy-product-form .upload-button,
.legacy-product-form .wipo-query-button { min-height:34px; display:inline-flex; align-items:center; justify-content:center; flex:0 0 auto; border:1px solid #cbd8e8; border-radius:5px; background:#fff; color:var(--v2-blue); padding:5px 11px; font-size:11px; font-weight:700; text-decoration:none; cursor:pointer; }
.legacy-product-form .upload-button:hover,
.legacy-product-form .wipo-query-button:hover { border-color:var(--v2-blue); background:#eef5ff; }
.legacy-product-form .upload-button { position:relative; }
.legacy-product-form .upload-button input { position:absolute; width:1px; min-height:1px; height:1px; padding:0; opacity:0; pointer-events:none; }
.legacy-product-form .legacy-existing-upload { display:flex; align-items:center; gap:7px; padding:0; border:0; }
.legacy-product-form .legacy-existing-actions { display:grid; gap:3px; white-space:nowrap; }
.legacy-product-form .legacy-existing-actions > a { color:var(--v2-blue); font-size:10px; }
.legacy-product-form .remove-upload { display:flex; align-items:center; gap:4px; color:var(--v2-danger); font-size:10px; }
.legacy-product-form .remove-upload input { width:auto; min-height:auto; }
.legacy-product-form .image-preview { width:48px; height:42px; overflow:hidden; border:1px solid #d1dce9; border-radius:5px; background:#edf2f7; }
.legacy-product-form .image-preview img { width:100%; height:100%; object-fit:cover; }
.legacy-product-form .image-upload-preview { display:flex; align-items:center; flex:1 1 100%; gap:9px; min-width:0; padding-top:7px; border-top:1px solid var(--v2-line); }
.legacy-product-form .image-upload-preview[hidden] { display:none; }
.legacy-product-form .image-upload-preview img { width:58px; height:46px; flex:0 0 auto; object-fit:cover; border:1px solid var(--v2-line); border-radius:5px; background:#fff; }
.legacy-product-form .image-upload-meta { display:grid; gap:2px; min-width:0; margin-right:auto; }
.legacy-product-form .image-upload-meta strong { max-width:260px; overflow:hidden; color:var(--v2-text); font-size:11px; text-overflow:ellipsis; white-space:nowrap; }
.legacy-product-form .image-upload-meta small { color:var(--v2-muted); font-size:10px; }
.legacy-product-form .image-upload-preview .btn { flex:0 0 auto; }
.legacy-product-form .dropship-row { display:grid; grid-template-columns:minmax(360px,.9fr) minmax(0,1.15fr); align-items:stretch; gap:12px; }
.legacy-product-form .dropship-row .upload-field { margin:0; }
.legacy-product-form .decision-grid { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.legacy-product-form .decision-option { position:relative; display:grid; grid-template-columns:34px 1fr; align-items:center; gap:9px; min-height:58px; border:1px solid #dce4ef; border-radius:7px; background:#fbfcfe; padding:7px 9px; cursor:pointer; transition:border-color .16s ease,background-color .16s ease,transform .16s ease; }
.legacy-product-form .decision-option:hover { border-color:#b7ccec; background:#f5f9ff; }
.legacy-product-form .decision-option:active { transform:translateY(1px); }
.legacy-product-form .decision-option input { position:absolute; opacity:0; pointer-events:none; }
.legacy-product-form .decision-symbol { display:grid; place-items:center; width:34px; height:34px; border-radius:7px; background:#eef2f7; color:var(--v2-muted); font-weight:800; }
.legacy-product-form .decision-option strong { display:block; color:var(--v2-navy); font-size:11px; }
.legacy-product-form .decision-option small { display:block; margin-top:3px; color:var(--v2-muted); font-size:10px; }
.legacy-product-form .decision-option.support:has(input:checked) { border-color:rgba(37,154,102,.5); background:#eaf8f1; }
.legacy-product-form .decision-option.support:has(input:checked) .decision-symbol { background:var(--v2-success); color:#fff; }
.legacy-product-form .decision-option.reject:has(input:checked) { border-color:rgba(211,63,73,.5); background:#fdebed; }
.legacy-product-form .decision-option.reject:has(input:checked) .decision-symbol { background:var(--v2-danger); color:#fff; }
.legacy-product-form .optional-section { background:#fafcff; }
.legacy-product-form .optional-details > summary { display:flex; align-items:center; gap:10px; list-style:none; cursor:pointer; }
.legacy-product-form .optional-details > summary::-webkit-details-marker { display:none; }
.legacy-product-form .optional-summary-copy { display:grid; gap:2px; min-width:0; }
.legacy-product-form .optional-summary-copy strong { color:var(--v2-navy); font-size:15px; font-weight:800; }
.legacy-product-form .optional-summary-copy small { color:var(--v2-muted); font-size:11px; }
.legacy-product-form .details-toggle { display:inline-flex; align-items:center; gap:7px; margin-left:auto; color:var(--v2-blue); font-size:11px; font-weight:700; }
.legacy-product-form .details-open { display:none; }
.legacy-product-form .optional-details[open] .details-open { display:inline; }
.legacy-product-form .optional-details[open] .details-closed { display:none; }
.legacy-product-form .optional-details[open] .details-toggle i { transform:rotate(180deg); }
.legacy-product-form .optional-details .optional-fields { margin-top:14px; }
.legacy-product-form .calculation-card { position:sticky; top:18px; margin:0; padding:18px; border-color:#dce6f1; background:linear-gradient(160deg,#f7fbff,#fff); box-shadow:0 2px 8px rgba(20,42,75,.05); }
.legacy-product-form .calculation-card h2 { margin:4px 0 16px; color:var(--v2-navy); font-size:16px; font-weight:800; }
.legacy-product-form .live-status { border:1px solid #ecd78d; border-radius:7px; background:#fff8df; color:#795200; padding:9px 11px; text-align:center; font-size:12px; font-weight:800; }
.legacy-product-form .live-status.status-qualified { border-color:#b9e6cf; background:#eaf8f1; color:#176645; }
.legacy-product-form .live-status.status-rejected { border-color:#f1c4c7; background:#fdebed; color:#a3343b; }
.legacy-product-form .live-status.status-pending { border-color:#c9dcf7; background:#eef5ff; color:#24598c; }
.legacy-product-form .live-status-detail { margin:8px 0 12px; border:1px solid #f0d5a9; border-radius:6px; background:#fff8df; padding:8px 9px; color:#9d671e; font-size:10px; font-weight:700; line-height:1.55; }
.legacy-product-form .calculation-card dl { margin:14px 0; }
.legacy-product-form .calculation-card dl > div { display:flex; align-items:center; justify-content:space-between; gap:16px; min-height:40px; border-bottom:1px dashed #dfe7f0; padding:8px 0; }
.legacy-product-form .calculation-card dt { color:var(--v2-muted); font-size:11px; }
.legacy-product-form .calculation-card dd { margin:0; color:var(--v2-text); font-size:12px; font-weight:700; }
.legacy-product-form .calculation-card .total,
.legacy-product-form .calculation-card .roi { border-bottom-style:solid; }
.legacy-product-form .calculation-card .total dd,
.legacy-product-form .calculation-card .roi dd { color:var(--v2-blue); font-size:16px; font-weight:800; }
.legacy-product-form .formula-note { border:1px solid #e1e8f1; border-radius:6px; background:#f3f7fb; color:var(--v2-muted); padding:10px; font-size:10px; line-height:1.55; }
.legacy-product-form .form-actions-sticky { position:sticky; bottom:0; z-index:5; min-height:60px; margin:0; border-top:1px solid var(--v2-line); background:rgba(255,255,255,.95); padding:11px 18px; backdrop-filter:blur(12px); }

@media (max-width:1450px) and (min-width:901px) {
  .legacy-product-form .walmart-fields { grid-template-columns:1.4fr 1fr; }
  .legacy-product-form .dropship-row { grid-template-columns:1fr; }
  .legacy-product-form .inline-upload-section { grid-template-columns:minmax(180px,230px) minmax(0,1fr); }
  .legacy-product-form .record-owner-fields { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .legacy-product-form .ownership-transfer-fields { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .legacy-product-form .ownership-transfer-fields .btn { grid-column:1 / -1; justify-self:end; }
}
@media (max-width:1180px) {
  .legacy-product-form { grid-template-columns:minmax(0,1fr) 285px; }
}
@media (max-width:900px) {
  .legacy-product-form { display:block; }
  .legacy-product-form .calculation-card { position:static; margin-bottom:18px; }
  .legacy-product-form .record-owner-bar,
  .legacy-product-form .inline-upload-section,
  .legacy-product-form .dropship-row { grid-template-columns:1fr; }
  .legacy-product-form .record-owner-fields { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .legacy-product-form .ownership-transfer-fields { grid-template-columns:1fr; }
  .legacy-product-form .ownership-transfer-fields .btn { grid-column:auto; justify-self:stretch; }
}
@media (max-width:680px) {
  .legacy-product-form .form-grid,
  .legacy-product-form .walmart-fields,
  .legacy-product-form .supplier-fields,
  .legacy-product-form .decision-grid,
  .legacy-product-form .record-owner-fields { grid-template-columns:1fr; }
  .legacy-product-form .span-2 { grid-column:auto; }
  .legacy-product-form .upload-field { align-items:flex-start; }
  .legacy-product-form .image-upload-copy { flex-basis:100%; }
  .legacy-product-form .form-actions { flex-wrap:wrap; }
  .legacy-product-form .form-actions > * { flex:1; min-width:130px; }
}

/* Shared file upload component: click, drag/drop and clipboard paste. */
.unified-upload.upload-field { position:relative; display:block; min-width:0; margin:0; padding:0; overflow:hidden; background:#f8fbff; border:1px dashed #aebfd5; border-radius:8px; transition:border-color .16s ease,background-color .16s ease,box-shadow .16s ease; }
.unified-upload:focus { outline:0; }
.unified-upload:hover,
.unified-upload:focus-within,
.unified-upload.is-active { background:#f2f7ff; border-color:#74a7ee; box-shadow:0 0 0 3px rgba(23,105,224,.08); }
.unified-upload.is-dragging { background:#eaf3ff; border-color:var(--v2-blue); box-shadow:inset 0 0 0 2px rgba(23,105,224,.10); }
.unified-upload.upload-ready { background:#f3fbf7; border-color:#73b99c; }
.unified-upload.has-error { background:#fff5f5; border-color:#df8d91; }
.unified-upload.is-uploading { background:#f5f8ff; border-color:#8eaee0; }
.unified-upload-main { display:grid; grid-template-columns:38px minmax(160px,1fr) auto; align-items:center; gap:11px; min-height:78px; padding:12px; cursor:pointer; }
.unified-upload-icon,
.unified-upload-file-icon { display:grid; place-items:center; flex:0 0 auto; color:var(--v2-blue); background:var(--v2-blue-soft); border:1px solid #cfe0fb; border-radius:7px; }
.unified-upload-icon { width:38px; height:38px; font-size:20px; }
.unified-upload-file-icon { width:52px; height:46px; font-size:23px; }
.unified-upload-copy { display:grid; gap:3px; min-width:0; }
.unified-upload-copy strong { color:var(--v2-text); font-size:12px; font-weight:750; }
.unified-upload-copy span { display:flex; align-items:center; flex-wrap:wrap; gap:6px; color:#49627f; font-size:11px; }
.unified-upload-copy span b { color:var(--v2-blue); font-weight:750; }
.unified-upload-copy span i { color:#9aabba; font-style:normal; }
.unified-upload-copy small { color:var(--v2-muted); font-size:10px; line-height:1.45; }
.unified-upload-main-actions,
.unified-upload-selected-actions { display:flex; align-items:center; flex-wrap:wrap; justify-content:flex-end; gap:6px; }
.unified-upload-existing,
.unified-upload-selected { display:flex; align-items:center; gap:10px; min-width:0; padding:10px 12px; background:rgba(255,255,255,.72); border-top:1px solid var(--v2-line); }
.unified-upload-existing[hidden],
.unified-upload-selected[hidden] { display:none !important; }
.unified-upload-thumb { width:58px; height:46px; display:block; flex:0 0 auto; overflow:hidden; object-fit:cover; background:#fff; border:1px solid var(--v2-line); border-radius:6px; }
.unified-upload-thumb img { width:100%; height:100%; display:block; object-fit:cover; }
.unified-upload-meta { display:grid; gap:3px; min-width:0; margin-right:auto; }
.unified-upload-meta strong { max-width:420px; overflow:hidden; color:var(--v2-text); font-size:11px; text-overflow:ellipsis; white-space:nowrap; }
.unified-upload-meta small { display:flex; align-items:center; flex-wrap:wrap; gap:5px; color:var(--v2-muted); font-size:10px; }
.unified-upload-meta small i { color:#9aabba; font-style:normal; }
.unified-upload-error { display:none; margin:0; padding:7px 12px; color:var(--v2-danger); background:#fff1f1; border-top:1px solid #f0c7c9; font-size:11px; }
.unified-upload-error:not(:empty) { display:block; }
.unified-upload-replace-hint { padding:7px 12px; color:#315a89; background:#eef6ff; border-top:1px solid #cfe0fb; font-size:11px; }
.unified-upload-replace-hint[hidden] { display:none !important; }
.unified-upload.is-replacing { background:#f5f9ff; border-color:#74a7ee; box-shadow:0 0 0 3px rgba(23,105,224,.08); }
.unified-upload.requirement-satisfied { background:#f3fbf7; border-color:#73b99c; }
.unified-upload.requirement-satisfied .unified-upload-copy strong::after { content:" 已满足"; color:#087443; font-size:10px; font-weight:700; }
.unified-upload.existing-removed .unified-upload-main { background:#fffaf0; }
.unified-upload--compact { min-width:280px; }
.unified-upload--compact .unified-upload-main { grid-template-columns:minmax(150px,1fr) auto; min-height:60px; padding:8px; }
.unified-upload--compact .unified-upload-icon { display:none; }
.unified-upload--compact .unified-upload-copy small { display:none; }
.unified-upload--compact .unified-upload-existing,
.unified-upload--compact .unified-upload-selected { padding:7px 8px; }
.unified-upload--compact .unified-upload-thumb { width:44px; height:38px; }
.legacy-product-form .unified-upload.upload-field { display:block; min-height:0; margin-top:10px; padding:0; background:#f8fbff; border:1px dashed #aebfd5; }
.legacy-product-form .inline-upload-section .unified-upload,
.legacy-product-form .dropship-row .unified-upload { margin:0; }
.legacy-product-form .unified-upload.required { background:#fffaf0; }
.legacy-product-form .unified-upload.required .unified-upload-copy strong::after { content:" 必填"; color:#a36f00; font-size:10px; font-weight:700; }
.user-avatar-cell { align-items:flex-start; }
.user-avatar-cell form { min-width:280px; }
.user-avatar-upload-form { display:grid; gap:6px; }
.user-avatar-upload-form > .btn { justify-self:start; }
.avatar-upload-form .unified-upload { width:min(680px,100%); }

@media (max-width:680px) {
  .unified-upload-main,
  .unified-upload--compact .unified-upload-main { grid-template-columns:1fr; }
  .unified-upload-icon { display:none; }
  .unified-upload-main-actions { justify-content:flex-start; }
  .unified-upload-existing,
  .unified-upload-selected { align-items:flex-start; flex-wrap:wrap; }
  .unified-upload-selected-actions { width:100%; justify-content:flex-start; }
}


/* Shared long-table viewport: internal scrolling with a native bottom-right vertical resize grip. */
[data-v2-resizable-table="true"] {
  position: relative;
  width: 100%;
  min-height: 220px;
  max-height: var(--v2-table-max-height, 70vh);
  overflow: auto !important;
  resize: vertical;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  background: #fff;
  border-bottom: 1px solid var(--v2-line);
}

[data-v2-resizable-table="true"]:focus-visible {
  outline: 2px solid #78b0ff;
  outline-offset: -2px;
}

[data-v2-resizable-table="true"] table.data-table thead th,
[data-v2-resizable-table="true"] table.legacy-product-table thead th {
  position: sticky;
  top: 0;
  z-index: 6;
  box-shadow: 0 1px 0 var(--v2-line);
}

[data-v2-resizable-table="true"]::-webkit-scrollbar-corner {
  background: linear-gradient(135deg, #f6f8fb 0 45%, #9badc4 46% 52%, #f6f8fb 53% 65%, #9badc4 66% 72%, #f6f8fb 73% 100%);
}

@media (max-height: 700px) {
  [data-v2-resizable-table="true"] { min-height: 180px; }
}


/* Shared list pagination controls. */
.filter-bar .standard-page-size-field {
  flex: 0 0 110px;
  min-width: 110px;
}

.pagination-filter-bar {
  justify-content: flex-start;
  padding-block: 10px;
}

.standard-pagination-row {
  justify-content: flex-start;
  gap: 10px;
  min-height: 50px;
}

.standard-pagination {
  flex-wrap: wrap;
  justify-content: flex-start;
}

.standard-pagination .pagination-nav {
  width: auto;
  padding: 0 9px;
}

.standard-pagination .pagination-ellipsis {
  border-color: transparent;
  background: transparent;
}

.pagination-page-summary {
  color: #73839b;
  font-size: 12px;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .standard-pagination-row { align-items: flex-start; flex-direction: column; }
}
.product-workspace-drawer{display:grid;gap:12px}.product-workspace-drawer>header{display:grid;grid-template-columns:auto minmax(0,1fr);gap:12px;align-items:center}.product-workspace-drawer>header img{width:72px;height:72px;border-radius:9px;object-fit:cover;border:1px solid var(--v2-line)}.product-workspace-drawer>header h3{margin:2px 0 4px;font-size:18px}.product-workspace-drawer>header p{margin:0;color:var(--v2-muted)}.product-workspace-drawer>section{padding:13px;border:1px solid var(--v2-line);border-radius:9px;background:#fff}.product-workspace-drawer h4{margin:0 0 10px;font-size:14px}.product-workspace-drawer dl{display:grid;grid-template-columns:minmax(108px,.7fr) minmax(0,1.3fr);gap:7px 11px;margin:0}.product-workspace-drawer dt{color:var(--v2-muted);font-size:12px}.product-workspace-drawer dd{min-width:0;margin:0;overflow-wrap:anywhere}.product-workspace-drawer .business-dimension-field{margin-top:12px}.product-workspace-audits{display:grid;gap:8px;margin:0;padding-left:18px}.product-workspace-audits li span,.product-workspace-audits li small{display:block;color:var(--v2-muted);font-size:11px}.drawer-restricted{padding:9px;border-radius:6px;background:#f4f6f8;color:var(--v2-muted)}[data-product-drawer-url]{cursor:pointer}[data-product-drawer-url]:focus-visible{outline:2px solid var(--v2-blue);outline-offset:-2px}
.business-dimension-field{grid-column:1/-1;display:grid;gap:5px;min-width:0}.business-dimension-label{font-size:12px;font-weight:700;color:#344054}.business-dimension-row{display:flex;align-items:center;gap:7px;min-width:0;white-space:nowrap}.business-dimension-part{display:grid;grid-template-columns:auto minmax(72px,1fr);align-items:center;gap:5px;min-width:0;flex:1 1 0}.business-dimension-part>span,.business-dimension-part label>span{font-size:12px;color:#667085}.business-dimension-part label{display:contents}.business-dimension-part input{width:100%;min-width:72px}.business-dimension-row>b{flex:0 0 auto;color:#98a2b3;font-weight:600}.business-dimension-field>small{color:#667085;font-size:11px}.product-workspace-table-wrap,.candidate-workspace-table-wrap,.amiba-follow-table-shell>.data-table-wrap{overflow-x:auto!important;overscroll-behavior-inline:contain;scrollbar-gutter:stable}.product-workspace-table-wrap table,.candidate-workspace-table-wrap table{contain:layout style}
@media(max-width:620px){.business-dimension-row{flex-wrap:wrap;white-space:normal}.business-dimension-part{flex:1 1 calc(50% - 20px)}.business-dimension-row>b{display:none}}
[data-product-drawer-url],
[data-row-drawer-url] {
  cursor: pointer;
}
