:root {
	--text: #edf1f8;
	--muted: #b2bbcb;
	--input: #12161e;
	--accent-ink: #173321;
	font-family: "Segoe UI Variable Text", "Segoe UI", Arial, "DejaVu Sans", sans-serif;
	font-size: 16px;
	font-weight: 450;
	font-stretch: normal;
	line-height: 1.5;
	letter-spacing: .005em;
}
:root[data-theme="cream"] {
	color-scheme: light;
	--bg: #f2f1eb;
	--panel: #f8f7f2;
	--raised: #ebece5;
	--line: #d9dcd4;
	--text: #363b37;
	--muted: #686d68;
	--accent: #46634f;
	--accent-ink: #fafaf5;
	--danger: #9b4741;
	--input: #fbfaf6;
}
body, input, textarea, select, button { font-family: inherit; }
.btn { min-height: 42px; font-size: 14px; font-weight: 600; }
.btn.small { font-size: 13px; min-height: 36px; }
.btn.primary { color: var(--accent-ink); }
.btn.primary:hover { color: var(--accent-ink); filter: brightness(1.08); background: var(--accent); }
.icon-btn { width: 35px; height: 35px; color: var(--muted); }
h1 { font-size: 32px; letter-spacing: -.3px; font-weight: 650; }
.subtitle { font-size: 15px; color: var(--muted); line-height: 1.65; }
.topbar { font-size: 14px; }
.topbar-right { gap: 12px; }
.keyboard { font-size: 12px; }
.nav a { font-size: 15px; color: var(--muted); }
.tiny-label { font-size: 12px; letter-spacing: .07em; color: var(--muted); }
.sidebar .brand { padding-bottom: 30px; }
.workspace-box { font-size: 13px; }
.workspace-box p { color: var(--muted); }
.user-name { font-size: 14px; }
.user-role { font-size: 12px; }
.stat-top { font-size: 14px; color: var(--muted); }
.stat strong { font-size: 31px; }
.stat small { font-size: 12px; color: var(--muted); }
.tab { font-size: 14px; }
.tab .counter { font-size: 12px; }
.search input { font-size: 14px; }
.search { width: 290px; }
.feed-card { display: flex; flex-direction: column; }
.feed-alerts { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.feed-alert { border: 0; font-family: inherit; cursor: pointer; }
.feed-alert:hover { filter: brightness(1.1); }
.feed-alert:disabled { opacity: 1; cursor: default; }
.mapping-profile { margin-bottom: 24px; padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.text-parser { margin: 18px 0; padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.text-parser-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.text-preview-actions { margin: 18px 0 25px; }
.field-alert-box { padding: 16px 18px; margin: 18px 0; border: 1px solid var(--danger); border-radius: 9px; }
.field-alert-box ul { padding-left: 22px; columns: 2; }
.feed-title { font-size: 17px; line-height: 1.35; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.feed-supplier { font-size: 13px; color: var(--muted); }
.source-icon { width: 43px; height: 43px; font-size: 12px; }
.badge { font-size: 12px; font-weight: 600; padding: 5px 8px; }
.source-url { font-size: 13px; color: var(--muted); }
.feed-meta small { font-size: 13px; color: var(--muted); }
.feed-meta b { font-size: 15px; }
.feed-card-footer { margin-top: auto; flex-wrap: wrap; }
.feed-card-footer .last-time { font-size: 12px; color: var(--muted); }
.section-title h2 { font-size: 18px; font-weight: 650; }
table { font-size: 15px; line-height: 1.5; }
th { font-size: 13px; font-weight: 600; color: var(--muted); }
td .secondary { font-size: 13px; }
.mono { font-family: "Cascadia Code", Consolas, monospace; font-size: 13px; }
.empty p, .empty { font-size: 15px; }
.empty h2 { font-size: 20px; }
.pager { font-size: 14px; }
.settings-card h3 { font-size: 16px; }
.settings-card p { font-size: 14px; }
.dialog-head h2 { font-size: 22px; }
.dialog.wide { width: min(1240px,100%); }
.dialog.mapping-dialog { width: min(1400px,100%); }
.dialog-foot { bottom: 0; z-index: 10; flex-wrap: wrap; }
.field > label { font-size: 14px; font-weight: 600; color: var(--text); }
.field input:not([type="checkbox"]), .field textarea, .field select, .control { font-size: 15px; min-height: 44px; line-height: 1.5; background: var(--input); color: var(--text); }
.field input::placeholder, .field textarea::placeholder, .control::placeholder { color: var(--muted); opacity: .8; }
.field small, .help { font-size: 13px; line-height: 1.65; color: var(--muted); }
.switch { font-size: 15px; color: var(--text); }
input[type="checkbox"] { width: 17px; height: 17px; }
.form-divider { font-size: 16px; }
.form-divider, .target-row .part { color: var(--text); }
.form-section-title { font-size: 18px; margin: 12px 0 0; padding: 14px 0 2px; border-top: 1px solid var(--line); color: var(--text); font-weight: 650; }
.form-section-title:first-child { border-top: 0; padding-top: 0; }
summary { font-size: 15px; color: var(--text); }
.mapping-intro { align-items: flex-start; }
.mapping-intro p { font-size: 14px; }
.mapping-intro strong { font-size: 16px; }
.identity-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; align-items: start; margin: 24px 0; }
.mapping-legend { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); padding-top: 5px; }
.preview-details { margin-bottom: 26px; padding: 16px; }
.sample-table-scroll { overflow: auto; max-height: 390px; margin-top: 16px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); }
.sample-table th { position: sticky; top: 0; z-index: 2; }
.sample-table th, .sample-table td { min-width: 160px; max-width: 320px; vertical-align: top; padding: 12px 15px; overflow-wrap: anywhere; }
.sample-table th:first-child, .sample-table td:first-child { min-width: 70px; position: sticky; left: 0; background: var(--raised); z-index: 1; }
.sample-table th:first-child { z-index: 3; }
.mapping-toolbar { padding: 16px 0 22px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; align-items: flex-start; }
.mapping-toolbar strong { font-size: 17px; }
.mapping-toolbar .actions { flex: 1; justify-content: flex-end; max-width: 700px; }
.mapping-search { max-width: 300px; }
.mapping-view { max-width: 230px; }
.map-row { border: 1px solid var(--line); border-left: 4px solid transparent; background: var(--panel); border-radius: 10px; margin-bottom: 15px; padding: 18px; }
.map-row.needs-mapping { border-left-color: #c9a66c; }
.map-row-header { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.map-row-header > .icon-btn { margin-left: auto; }
.map-operation { display: flex; align-items: center; gap: 9px; margin-left: auto; }
.map-operation > label { font-size: 13px; color: var(--muted); }
.map-operation > select, .map-operation > .search-select { width: 240px; }
.map-row-grid { display: grid; grid-template-columns: minmax(0,1fr) 30px minmax(0,1fr); gap: 16px; align-items: start; }
.map-arrow { color: var(--muted); padding-top: 38px; text-align: center; }
.map-extra { margin-top: 15px; padding: 12px 14px; background: color-mix(in srgb,var(--raised) 35%,transparent); }
.value-processing { display: flex; align-items: flex-start; gap: 16px; margin-top: 18px; }
.value-processing > .help { flex: 1; overflow-wrap: anywhere; padding-top: 6px; }
.value-step { border: 1px solid var(--line); border-radius: 10px; padding: 18px; margin: 16px 0; background: var(--panel); }
.value-step.is-disabled { opacity: .65; }
.value-step-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.value-step-head > .field { flex: 1; min-width: 140px; }
.value-step-head > .actions { margin-left: auto; }
.value-step-number { font-weight: 700; color: var(--muted); }
.value-manual-sample { margin: 22px 0; padding-top: 15px; border-top: 1px solid var(--line); }
.value-preview-cell { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; max-width: 480px; font: inherit; }
.value-preview-error { color: var(--danger); overflow-wrap: anywhere; }
.value-preview-trace { margin: 14px 0; padding: 12px; }
.map-extra summary { font-size: 13px; color: var(--muted); }
.map-extra .form-grid { margin-top: 15px; }
.mapping-ignore-note { color: var(--muted); font-size: 14px; padding: 15px 0; }
.target-row { align-items: flex-start; }
.target-row .part { padding-top: 12px; font-size: 13px; }
.target-row .search-select { flex: 1; }
.mapping-empty { padding: 30px; }
.help-tip { width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid var(--muted); color: var(--muted); font-size: 13px; font-weight: 700; line-height: 1; cursor: help; position: relative; vertical-align: middle; flex-shrink: 0; }
.help-bubble { display: none; position: absolute; width: 350px; right: 0; top: calc(100% + 9px); color: var(--text); background: var(--raised); border: 1px solid var(--line); border-radius: 10px; padding: 16px; box-shadow: 0 8px 32px #0004; font-size: 14px; font-weight: 450; line-height: 1.65; z-index: 800; }
.help-tip:hover .help-bubble, .help-tip:focus .help-bubble { display: block; }
.select-native { display: none !important; }
.search-select { display: flex; align-items: center; position: relative; gap: 5px; padding: 2px 31px 2px 6px; min-height: 44px; min-width: 0; width: 100%; border: 1px solid var(--line); border-radius: 8px; background: var(--input); color: var(--text); }
.search-select:focus-within { border-color: var(--accent); }
.search-select.is-multiple { flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }
.search-select.is-disabled { opacity: .6; }
.field .search-select .select-search, .search-select .select-search { flex: 1; min-width: 90px; width: auto; max-width: 100%; border: 0; outline: 0; box-shadow: none; color: var(--text); background: transparent; font-size: 15px; line-height: 1.5; padding: 7px 5px; min-height: 34px; border-radius: 4px; }
.select-search:focus-visible { outline: none; }
.select-arrow { position: absolute; right: 6px; top: 7px; width: 23px; height: 28px; background: transparent; border: 0; padding: 0; color: var(--muted); font-size: 20px; line-height: 1; }
.select-chips { display: contents; }
.select-chip { display: inline-flex; align-items: center; gap: 7px; background: color-mix(in srgb,var(--accent) 16%,var(--input)); border: 1px solid color-mix(in srgb,var(--accent) 45%,var(--line)); color: var(--text); border-radius: 6px; padding: 4px 7px; font-size: 14px; max-width: 100%; cursor: grab; }
.select-chip > span { overflow-wrap: anywhere; }
.select-chip button { border: 0; padding: 0; width: 18px; min-width: 18px; background: none; color: var(--muted); font-size: 20px; line-height: 1; }
.select-menu { position: fixed; overflow: auto; padding: 6px; background: var(--raised); color: var(--text); border: 1px solid var(--line); border-radius: 9px; box-shadow: 0 14px 40px #0005; z-index: 2000; font-size: 15px; line-height: 1.5; }
.select-option { padding: 10px 12px; border-radius: 6px; overflow-wrap: anywhere; cursor: pointer; }
.select-option.is-highlighted { background: color-mix(in srgb,var(--accent) 15%,var(--raised)); }
.select-option.is-selected { color: var(--accent); font-weight: 650; }
.select-option.is-selected::after { content: " ✓"; }
.select-empty { padding: 12px; font-size: 13px; color: var(--muted); }
.filter-group { border: 1px solid var(--line); background: var(--panel); border-radius: 10px; padding: 16px; margin: 16px 0; }
.filter-group.is-nested { background: color-mix(in srgb,var(--raised) 45%,var(--panel)); margin: 14px 0; }
.filter-group-head { display: flex; align-items: flex-start; gap: 16px; justify-content: space-between; margin-bottom: 16px; }
.filter-group-head > .search-select { max-width: 430px; }
.filter-condition { display: grid; grid-template-columns: minmax(150px,1fr) minmax(150px,.85fr) minmax(160px,1fr) 35px; gap: 12px; align-items: start; padding: 14px 0; border-top: 1px solid var(--line); }
.filter-condition > .icon-btn { margin-top: 27px; }
.rule-no-value { min-height: 44px; padding: 11px 0; color: var(--muted); font-size: 14px; }
.filter-empty { margin: 0; }
.json-preview { white-space: pre-wrap; overflow-wrap: anywhere; overflow: auto; max-height: 410px; padding: 18px; border: 1px solid var(--line); border-radius: 9px; background: var(--input); color: var(--text); font: 14px/1.65 "Cascadia Code",Consolas,monospace; tab-size: 4; }
.history-item b { font-size: 14px; }
.history-item span { font-size: 13px; }
.diff-table td { font-size: 14px; }
.run-metric span { font-size: 13px; }
.login-theme { display: flex; justify-content: flex-end; margin-bottom: 35px; }
.login-form .btn { width: auto; margin-top: 0; }
.login-form > .btn { width: 100%; margin-top: 28px; }
.login-form .help { font-size: 13px; }
#toast { font-size: 15px; }
.source-warning, #toast.is-warning { color: #f0dbad; background: #3b3527; border: 1px solid #9c8150; }
.source-warning { border-radius: 8px; padding: 10px 12px; margin: 10px 0; overflow-wrap: anywhere; }
.source-warning p { margin: 0; }
.source-warning p + p { margin-top: 6px; }
#toast.is-error { background: #49272b; border-color: #b85760; color: #ffe1e4; white-space: pre-line; max-width: min(430px,calc(100vw - 36px)); max-height: 40vh; overflow: auto; }
[data-theme="cream"] .sidebar, [data-theme="cream"] .topbar { background: #eeeee7; }
[data-theme="cream"] .crumb b { color: var(--text); }
[data-theme="cream"] .nav a { color: var(--muted); }
[data-theme="cream"] .nav a.active { color: #385540; background: #e3eadf; }
[data-theme="cream"] .nav a:hover { color: var(--text); background: #e8eae1; }
[data-theme="cream"] .nav a.active:hover { color: #385540; background: #dce5d8; }
[data-theme="cream"] .btn { background: #eeeee7; color: var(--text); }
[data-theme="cream"] .btn.subtle { background: transparent; }
[data-theme="cream"] .btn.primary { background: var(--accent); color: var(--accent-ink); }
[data-theme="cream"] .btn:hover { border-color: #a9b0a5; }
[data-theme="cream"] .btn.danger { background: #f3e6e0; color: #93483d; }
[data-theme="cream"] .brand-mark { background: #dde6d8; color: #405c46; }
[data-theme="cream"] .workspace-box { background: linear-gradient(140deg,#e8ede4,#efefe7); border-color: #d5dbce; }
[data-theme="cream"] .workspace-box strong { color: #465e49; }
[data-theme="cream"] .avatar { background: #e4e4da; color: #5c6256; }
[data-theme="cream"] .stat, [data-theme="cream"] .feed-card, [data-theme="cream"] .settings-card, [data-theme="cream"] .table-wrap { background: var(--panel); }
[data-theme="cream"] .empty { background: #eeeee7; color: var(--muted); }
[data-theme="cream"] .empty h2 { color: var(--text); }
[data-theme="cream"] th { background: #eeeee8; }
[data-theme="cream"] tbody tr:hover { background: #f0f1e9; }
[data-theme="cream"] .search input { background: var(--input); color: var(--text); }
[data-theme="cream"] .tab.active { color: var(--text); }
[data-theme="cream"] .tab .counter { background: #e1e4d9; color: #59604f; }
[data-theme="cream"] .source-icon { background: #eeebf1; border-color: #d5d0dc; color: #655b70; }
[data-theme="cream"] .source-icon.green { background: #e5ebde; border-color: #c6d2bb; color: #4a6146; }
[data-theme="cream"] .badge { background: #ebece3; color: #616650; }
[data-theme="cream"] .badge.green { background: #e1ebdc; color: #466242; }
[data-theme="cream"] .badge.gold { background: #f0ecd8; color: #726538; }
[data-theme="cream"] .badge.blue { background: #e5eaf0; color: #506274; }
[data-theme="cream"] .badge.red { background: #f3e3dc; color: #914c40; }
[data-theme="cream"] .overlay { background: #343b344d; }
[data-theme="cream"] .dialog { background: var(--panel); border-color: var(--line); box-shadow: 0 25px 80px #323c2f24; }
[data-theme="cream"] .dialog-foot { background: #eeeee8; }
[data-theme="cream"] .mapping-intro { background: #eaf0e4; border-color: #d0d9c4; }
[data-theme="cream"] .mapping-intro p { color: #5e6b54; }
[data-theme="cream"] .field-error { background: #f6e8e1; color: #91483d; border-color: #ddc1b7; }
[data-theme="cream"] .field input:not([type="checkbox"]), [data-theme="cream"] .field textarea, [data-theme="cream"] .field select, [data-theme="cream"] .control { border-color: var(--line); }
[data-theme="cream"] .icon-btn:hover { background: #e6e9df; color: var(--text); }
[data-theme="cream"] .permission-grid th:first-child, [data-theme="cream"] .permission-grid td:first-child { background: #eeeee8; }
[data-theme="cream"] .history-item.active { background: #e5eddf; border-color: #c3d1b8; }
[data-theme="cream"] .history-item { color: var(--text); }
[data-theme="cream"] .diff-table td:nth-child(2) { color: #89574c; background: #eeded633; }
[data-theme="cream"] .diff-table td:nth-child(3) { color: #53694d; background: #e2edda44; }
[data-theme="cream"] .run-metric { background: #eeefe6; }
[data-theme="cream"] .progress { background: #e0e4d8; }
[data-theme="cream"] #toast { background: #e5eedf; border-color: #c5d2ba; color: #4a6247; }
[data-theme="cream"] .source-warning, [data-theme="cream"] #toast.is-warning { background: #f0ecd8; color: #65572c; border-color: #cebd8c; }
[data-theme="cream"] #toast.is-error { background: #f9e3e3; border-color: #d29494; color: #912d37; }
[data-theme="cream"] .login-page { background: var(--bg); }
[data-theme="cream"] .login-art { background: radial-gradient(ellipse at 25% 40%,#dce5d02b,transparent 65%),linear-gradient(145deg,#f1f2e9,#efeee5); }
[data-theme="cream"] .login-copy p { color: var(--muted); }
[data-theme="cream"] .format-line span { border-color: #d0d6c5; color: #5c6d53; }
[data-theme="cream"] .login-art footer { color: #6b765f; }
@media (max-width:1000px) {
	.map-operation > .search-select { width: 210px; }
	.identity-grid { grid-template-columns: 1fr; }
	.filter-condition { grid-template-columns: 1fr 1fr; }
	.filter-condition > .field:nth-child(3) { grid-column: 1; }
	.filter-condition > .icon-btn { margin-top: 30px; }
	.topbar-right .keyboard { display: none; }
}
@media (max-width:760px) {
	.value-processing, .value-step-head { flex-wrap: wrap; }
	.value-processing > .help { min-width: 100%; }
	.value-step { padding: 13px; }
	.field-alert-box ul { columns: 1; }
	.sidebar { padding: 10px 12px; }
	.sidebar .nav { flex-wrap: wrap; justify-content: center; overflow: visible; }
	.nav a { font-size: 13px; padding: 9px 7px; }
	.topbar { font-size: 12px; }
	.topbar-right { gap: 7px; }
	.topbar-right > span:first-child { display: none; }
	.topbar .crumb { gap: 9px; }
	.page-title { flex-wrap: wrap; }
	.page-title .actions .btn { font-size: 13px; }
	.subtitle { font-size: 14px; }
	.search { width: 100%; }
	.map-row { padding: 14px; }
	.map-row-header { flex-wrap: wrap; gap: 10px; }
	.map-operation { margin-left: 0; }
	.map-operation > label { display: none; }
	.map-operation > .search-select { width: 200px; }
	.map-row-grid { grid-template-columns: 1fr; }
	.map-arrow { display: none; }
	.mapping-toolbar .actions { justify-content: flex-start; }
	.mapping-search { max-width: none; }
	.mapping-legend { grid-template-columns: auto minmax(0,1fr); }
	.filter-group { padding: 12px; }
	.filter-group-head { flex-wrap: wrap; }
	.filter-condition { grid-template-columns: 1fr 35px; }
	.filter-condition > .field { grid-column: 1 / -1; }
	.filter-condition > .field:nth-child(3) { grid-column: 1; }
	.help-bubble { position: fixed; width: auto; left: 12px; right: 12px; bottom: 20px; top: auto; }
	.dialog-foot .btn { font-size: 13px; }
}


.slug-control { display: flex; gap: 10px; align-items: center; }
.slug-control input { flex: 1; min-width: 0; }
.slug-control .btn { flex-shrink: 0; }
.map-row.has-conflict { border-color: var(--danger); }
.field-error { white-space: pre-line; }
@media (max-width: 520px) {
	.slug-control { flex-wrap: wrap; }
	.slug-control input { flex-basis: 100%; }
}

.theme-switch { display: inline-flex; position: relative; align-items: center; flex-shrink: 0; gap: 8px; min-height: 38px; padding: 5px 2px; cursor: pointer; user-select: none; }
.theme-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; z-index: 1; cursor: pointer; }
.theme-switch .theme-icon { width: 18px; height: 18px; color: var(--muted); transition: color .18s ease; }
.theme-switch .theme-moon { color: var(--text); }
.theme-switch.is-light .theme-moon { color: var(--muted); }
.theme-switch.is-light .theme-sun { color: var(--accent); }
.theme-track { position: relative; width: 46px; height: 26px; border: 1px solid var(--line); border-radius: 20px; background: var(--raised); transition: background .18s ease; }
.theme-thumb { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--text); box-shadow: 0 1px 3px #0002; transition: transform .18s ease, background .18s ease; }
.theme-switch input:checked + .theme-track { background: #dde7d6; border-color: #bbcbb1; }
.theme-switch input:checked + .theme-track .theme-thumb { transform: translateX(20px); background: #496248; }
.theme-switch input:focus-visible + .theme-track { border-color: var(--accent); }
.theme-switch:hover .theme-track { border-color: var(--muted); }
@media (prefers-reduced-motion: reduce) {
	.theme-track, .theme-thumb, .theme-switch .theme-icon { transition: none; }
}

.attribute-inline-toolbar { display: flex; align-items: flex-start; gap: 20px; justify-content: space-between; margin-bottom: 18px; }
.column-slug { display: block; color: var(--muted); font-size: 13px; font-weight: 450; overflow-wrap: anywhere; }
.column-bulk-actions { margin: 18px 0; }
.column-groups { display: flex; flex-wrap: wrap; gap: 12px 24px; margin: 16px 0; padding: 14px 0; border-block: 1px solid var(--line); }
.column-group { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.column-group input, .column-option > input { width: 18px; height: 18px; flex: 0 0 18px; accent-color: var(--accent); }
.column-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; max-height: 420px; overflow: auto; padding: 3px; }
.column-option { display: flex; align-items: flex-start; gap: 12px; border: 1px solid var(--line); border-radius: 9px; padding: 13px; cursor: pointer; background: var(--input); }
.column-option > input { margin: 3px 0 0; }
.column-option > span { min-width: 0; }
.column-option strong { display: block; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.column-option small { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.column-option:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb,var(--accent) 8%,var(--input)); }
.column-option:focus-within { outline: none; }
.product-list-wrap { max-width: 100%; }
.product-list-table { table-layout: fixed; width: max-content; min-width: 100%; }
.product-list-table.has-column-widths { min-width: 0; }
.product-list-table [data-product-column] {
	--product-column-default: 190px;
	width: var(--product-column-width,var(--product-column-default));
	min-width: var(--product-column-width,var(--product-column-default));
	max-width: var(--product-column-width,var(--product-column-default));
	white-space: normal;
	vertical-align: top;
}
.product-list-table [data-product-column="price"] { --product-column-default: 150px; }
.product-list-table .product-row-number { width: 60px; min-width: 60px; color: var(--muted); }
.product-column-value { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 6.5em; overflow: auto; }
.product-list-table td > .badge { margin-top: 7px; }
.product-full-value { max-height: 65vh; }
.product-columns-note { margin: 0 0 14px; }
.column-found-actions[hidden] { display: none; }
@media (max-width: 760px) {
	.column-options { grid-template-columns: minmax(0,1fr); max-height: 380px; }
	.product-columns-dialog .dialog-foot { gap: 8px; }
}
.attribute-inline-toolbar input { max-width: 330px; }
.product-attr-row { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(0,1fr) 35px; align-items: start; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.product-attr-row > .icon-btn { margin-top: 30px; }
.attribute-inline-empty { padding: 24px 0; }
.required-mark { color: var(--danger); }
@media (max-width: 760px) {
	.attribute-inline-toolbar { flex-wrap: wrap; }
	.attribute-inline-toolbar input { max-width: none; }
	.product-attr-row { grid-template-columns: minmax(0,1fr) 35px; }
	.product-attr-row > .field:first-child { grid-column: 1 / -1; }
}

/* Section navigation and data update controls */
.section-menu[hidden] { display: none; }
.layout.has-submenu { grid-template-columns: 238px 206px minmax(0,1fr); }
.has-submenu .main { grid-column: 3; }
.section-menu { position: fixed; left: 238px; top: 0; bottom: 0; width: 206px; padding: 104px 13px 24px; border-right: 1px solid var(--line); background: var(--panel); overflow: auto; }
.section-menu .tiny-label { margin: 0 10px 20px; line-height: 1.6; }
.section-menu nav { display: flex; flex-direction: column; gap: 5px; }
.section-menu a { color: var(--muted); text-decoration: none; padding: 12px 11px; border-radius: 8px; font-size: 13px; line-height: 1.5; }
.section-menu a:hover, .section-menu a.active { color: var(--text); background: var(--line); }
.section-menu a.active { box-shadow: inset 3px 0 0 var(--accent); }
.feed-card.is-active, .feed-card.is-active:hover { border-color: var(--accent); }
.weekday-choices { display: flex; flex-wrap: wrap; gap: 12px; }
.weekday-choices label { display: flex; align-items: center; gap: 7px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; }
.success-assignments .product-attr-row:last-child { margin-bottom: 14px; }
.error-text { color: #e78c80; }
@media (max-height: 850px) and (min-width: 761px) {
	.workspace-box { display: none; }
	.sidebar > .nav { overflow-y: auto; }
}
@media (max-width: 1450px) and (min-width: 761px) {
	.has-submenu .feed-grid, .has-submenu .settings-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
	.has-submenu .stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 1150px) and (min-width: 761px) {
	.layout.has-submenu { grid-template-columns: 205px 185px minmax(0,1fr); }
	.section-menu { left: 205px; width: 185px; }
	.has-submenu .feed-grid, .has-submenu .settings-grid { grid-template-columns: minmax(0,1fr); }
	.has-submenu .topbar-right > span:first-child { display: none; }
}
@media (max-width: 760px) {
	.layout.has-submenu { display: block; }
	.section-menu { position: static; width: 100%; padding: 8px 12px; border-right: 0; border-bottom: 1px solid var(--line); }
	.section-menu .tiny-label { display: none; }
	.section-menu nav { flex-direction: row; overflow: auto; gap: 4px; }
	.section-menu a { white-space: nowrap; font-size: 12px; padding: 9px; }
	.section-menu a.active { box-shadow: inset 0 -2px 0 var(--accent); }
}
.has-submenu .feed-grid { grid-template-columns: repeat(auto-fit,minmax(min(100%,340px),1fr)); }
.feed-card-top { display: grid; grid-template-columns: auto minmax(0,1fr); }
.feed-card-top .feed-alerts { grid-column: 1 / -1; margin-left: 0; justify-content: flex-start; }
.feed-meta { gap: 16px; }
.feed-meta small { font-size: 13px; }
.feed-card-top .feed-alerts { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 6px; }
.feed-card-name { min-height: 64px; }

.run-error-groups { display: grid; gap: 14px; margin-bottom: 24px; }
.run-error-group { display: grid; grid-template-columns: minmax(0,1fr) minmax(240px,.8fr); gap: 22px; padding: 18px; background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--danger); border-radius: 10px; }
.run-error-description { min-width: 0; }
.run-error-description h3 { margin: 0 0 8px; font-size: 16px; overflow-wrap: anywhere; }
.run-error-description p { margin: 8px 0; overflow-wrap: anywhere; }
.run-error-message { color: var(--danger); white-space: pre-wrap; }
.run-error-occurrences { min-width: 0; }
.run-error-occurrences > p { margin: 0 0 8px; }
.run-error-rows { max-height: 150px; min-height: 44px; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; border: 1px solid var(--line); border-radius: 7px; background: var(--input); padding: 8px 10px; }
.error-source-row { display: flex; flex-wrap: wrap; gap: 12px; padding: 5px 0; font-size: 13px; overflow-wrap: anywhere; }
.error-source-row .mono { color: var(--muted); min-width: 0; }
.error-rows-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; margin-top: 8px; }
@media (max-width: 760px) {
	.run-error-group { grid-template-columns: minmax(0,1fr); gap: 12px; padding: 13px; }
	.run-error-rows { max-height: 130px; }
}
.row-field-errors { display: grid; gap: 14px; list-style: none; padding: 0; margin: 16px 0; }
.row-field-errors li { overflow-wrap: anywhere; }
.row-field-errors strong, .row-field-errors span, .row-field-errors small { display: block; }
.row-field-errors strong { margin-bottom: 4px; }

.feed-card.is-error, .feed-card.is-error:hover { border-color: var(--danger, #ed727b); box-shadow: 0 0 0 1px var(--danger, #ed727b); }

/* Feed overview and bounded source list */
#feeds-workspace > .page-title { flex-wrap: wrap; gap: 18px; }
#feeds-workspace > .page-title > .actions { flex-wrap: wrap; }
.btn.feed-update-all { background: #274f82; border-color: #6196d9; color: #f2f7ff; }
.btn.feed-update-exceptions { background: #644d80; border-color: #ad89d2; color: #fff5ff; }
.btn.feed-update-all:hover, .btn.feed-update-exceptions:hover { filter: brightness(1.15); }
[data-theme="cream"] .btn.feed-update-all { background: #e2ecfa; border-color: #8aa9d1; color: #244f83; }
[data-theme="cream"] .btn.feed-update-exceptions { background: #efe5f7; border-color: #b59acb; color: #64417e; }
#feeds-workspace .feed-dashboard-stats { grid-template-columns: repeat(3,minmax(0,1fr)); margin-bottom: 16px; }
.feed-dashboard-stats .stat { min-width: 0; }
.stat-link { position: absolute; inset: 0; width: 100%; border: 0; background: transparent; border-radius: inherit; cursor: pointer; }
.stat-link:hover, .stat-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.feed-health { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; padding: 15px 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); font-size: 14px; }
.feed-health > span { display: inline-flex; align-items: center; gap: 9px; }
.feed-health .help { margin-left: auto; }
.health-dot { width: 8px; height: 8px; border-radius: 50%; background: #9298a1; }
.health-dot.active { background: var(--accent); }
.health-dot.running { background: #7fb1ef; }
.feed-list-section { margin: 28px 0 34px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.feed-list-heading { margin: 0; padding: 20px; gap: 18px; flex-wrap: wrap; }
.feed-list-heading h2 { display: flex; align-items: center; gap: 12px; }
.feed-list-heading .help { margin: 4px 0 0; }
#feed-list-panel[hidden] { display: none; }
#feed-list-tools { padding: 16px 20px; border-top: 1px solid var(--line); }
#feed-list-tools .toolbar { margin: 0; gap: 12px; flex-wrap: wrap; }
#feed-list-tools .tabs { flex-wrap: wrap; }
#feed-type-filter { margin-top: 12px; }
.feed-list-scroll { max-height: min(66vh,780px); overflow: auto; overscroll-behavior-y: contain; scrollbar-gutter: stable; padding: 4px 20px 14px; }
#feed-list-panel .feed-grid { grid-template-columns: repeat(auto-fit,minmax(min(100%,330px),1fr)); }
.feed-list-dialog .dialog-body { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.feed-list-dialog .dialog-head h2 { min-width: 0; overflow-wrap: anywhere; }
.feed-list-head-actions { flex-shrink: 0; flex-wrap: nowrap; }
.feed-list-dialog #feed-list-panel:not([hidden]) { display: flex; flex-direction: column; min-height: 0; }
.feed-list-dialog #feed-list-tools, .feed-list-dialog #feed-list-pager { flex: 0 0 auto; }
.feed-list-dialog .feed-list-scroll { flex: 1 1 auto; min-height: 0; max-height: none; }
.feed-list-scroll .feed-card { transform: none; }
.feed-list-scroll .feed-card.is-inactive, .feed-list-scroll .feed-card.is-inactive:hover { border-color: #848a94; box-shadow: 0 0 0 1px #848a9466; }
.feed-activity { margin: 0 0 16px; align-self: flex-start; }
.feed-meta { flex-wrap: wrap; gap: 12px 24px; }
#feed-list-pager .pager { margin: 0; padding: 14px 20px; border-top: 1px solid var(--line); }
#counter-reset-history h3 { margin: 22px 0 8px; }
@media (max-width: 760px) {
	#feeds-workspace .feed-dashboard-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
	#feeds-workspace > .page-title > .actions { width: 100%; }
	#feeds-workspace > .page-title > .actions .btn { font-size: 13px; }
	.feed-health .help { margin-left: 0; }
	#feed-list-tools, .feed-list-heading { padding: 14px; }
	.feed-list-scroll { padding: 4px 12px 12px; max-height: 65vh; }
	#feed-list-tools .search { width: 100%; }
}

#api-incoming-options, #api-status-options, #api-completion-options, .api-signal-history { min-width: 0; }
.api-signal-history .table-wrap { max-width: 100%; overflow-x: auto; }
.api-signal-history td { overflow-wrap: anywhere; }

.form-section { min-width: 0; border-top: 1px solid var(--line); padding-top: 18px; }
.form-section > .form-section-title { margin: 0 0 16px; }
.form-flags { display: grid; gap: 12px; align-content: start; padding: 6px 0; }
.form-flags > .switch { margin: 0; min-width: 0; }
.form-section[hidden], .form-flags > [hidden] { display: none; }
.form-grid > * { min-width: 0; }
.permission-grid { width: 100%; max-width: 100%; box-sizing: border-box; }
.attribute-duplicate-warning {
	padding: 16px;
	border: 1px solid #c7a044;
	border-radius: 10px;
	background: rgba(218, 176, 70, .12);
}
.attribute-duplicate-warning strong { color: #d3ac4d; }
[data-theme="cream"] .attribute-duplicate-warning strong { color: #796019; }

/* Feed source badges and sorting */
.feed-card { position: relative; }
.feed-type-badge { position: absolute; top: 16px; right: 16px; text-transform: lowercase; font-size: 11px; letter-spacing: .03em; }
.feed-card-name { padding-right: 48px; }
.feed-type-badge.type-imap { color: #e0c4ff; background: #442e60; }
.feed-type-badge.type-link { color: #bcdfff; background: #254660; }
.feed-type-badge.type-file { color: #ffe3a5; background: #5b4523; }
[data-theme="cream"] .feed-type-badge.type-imap { color: #68428a; background: #ede2f6; }
[data-theme="cream"] .feed-type-badge.type-link { color: #255981; background: #deedf8; }
[data-theme="cream"] .feed-type-badge.type-file { color: #76551a; background: #f5e9c9; }
.feed-sort-tools { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 16px; font-size: 13px; }
.feed-sort-tools .control { width: auto; max-width: 100%; min-width: 210px; }
.feed-sort-tools .search-select { width: 290px; min-width: 230px; flex: 0 1 290px; }

/* Product list interactions */
.products-heading { flex-wrap: wrap; gap: 18px; }
.products-heading > .actions { flex-wrap: wrap; }
.btn.has-filter { border-color: var(--accent); color: var(--accent); }
.product-filter-summary, .product-table-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 16px; font-size: 13px; }
.product-filter-summary { padding: 12px 16px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); }
.product-table-shell { position: relative; }
.product-column-heading { display: flex; align-items: flex-start; gap: 5px; }
.column-sort-button, .column-drag-handle { border: 0; padding: 0; background: transparent; color: inherit; font: inherit; text-align: left; }
.column-sort-button { flex: 1; min-width: 0; cursor: pointer; }
.column-sort-button:hover { color: var(--text); }
.column-sort-button .column-slug { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.column-drag-handle { cursor: grab; font-size: 19px; line-height: 1.2; padding: 0 3px; color: var(--muted); }
.column-sort-indicator { color: var(--muted); flex: 0 0 auto; }
.product-list-table th[aria-sort="ascending"] .column-sort-indicator, .product-list-table th[aria-sort="descending"] .column-sort-indicator { color: var(--accent); }
.product-list-table th[data-product-column] { position: relative; user-select: none; }
.product-column-resize {
	position: absolute;
	inset: 0 0 0 auto;
	width: 10px;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	cursor: col-resize;
	touch-action: none;
}
.product-column-resize:hover, .product-column-resize:focus-visible,
.product-list-wrap.is-resizing .product-column-resize:active {
	box-shadow: inset -2px 0 var(--accent);
}
.product-list-wrap.is-resizing, .product-list-wrap.is-resizing * {
	cursor: col-resize;
	user-select: none;
}
.product-list-table .drag-source { opacity: .45; }
.product-list-table .drop-before { box-shadow: inset 3px 0 var(--accent); }
.product-list-table .drop-after { box-shadow: inset -3px 0 var(--accent); }
.product-list-table [data-product-column="name"] { --product-column-default: 350px; }
.product-identity { display: flex; align-items: flex-start; gap: 8px; width: 100%; min-width: 0; }
.product-name-link, .product-name-text { flex: 1; min-width: 0; overflow-wrap: anywhere; white-space: pre-wrap; color: var(--text); text-decoration: none; line-height: 1.55; }
.product-name-link:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.product-inline-actions { display: inline-flex; flex: 0 0 auto; gap: 2px; margin-top: -4px; opacity: 0; pointer-events: none; transition: opacity .12s; }
.product-list-table tbody tr:hover .product-inline-actions, .product-list-table tbody tr:focus-within .product-inline-actions, .product-list-table tr[data-actions-open] .product-inline-actions { opacity: 1; pointer-events: auto; }
.product-inline-actions .icon-btn { width: 30px; height: 30px; }
.product-more { font-size: 24px; font-weight: 700; line-height: 1; }
.product-list-table .product-row-number.has-row-actions { width: 155px; min-width: 155px; max-width: 155px; }
.product-identity.is-number { align-items: center; }
.product-identity.is-number .product-name-link { flex: 0 1 auto; }
.product-identity.is-number .product-inline-actions { margin: -4px 0; }
.product-action-menu { position: fixed; z-index: 80; min-width: 225px; max-width: calc(100vw - 16px); padding: 6px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); color: var(--text); box-shadow: 0 10px 35px #0004; }
.product-menu-item { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; border-radius: 5px; padding: 11px 12px; text-align: left; background: transparent; color: inherit; font: inherit; font-size: 13px; cursor: pointer; }
.product-menu-item:hover, .product-menu-item:focus-visible { background: var(--raised); outline: 1px solid var(--line); }
.product-menu-item.danger { color: var(--danger); }
.product-menu-item svg { width: 17px; height: 17px; flex: 0 0 auto; }
.product-scroll-controls { position: fixed; inset: 0; z-index: 25; pointer-events: none; }
.product-scroll-controls[hidden] { display: none; }
.product-scroll-arrow { position: absolute; width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--raised); color: var(--text); box-shadow: 0 3px 15px #0005; cursor: pointer; pointer-events: auto; opacity: .85; touch-action: none; user-select: none; }
.product-scroll-arrow:hover, .product-scroll-arrow:focus-visible { opacity: 1; border-color: var(--accent); }
.product-scroll-arrow:disabled { opacity: .25; pointer-events: none; }
.product-scroll-arrow svg { width: 20px; height: 20px; }
.product-scroll-arrow.scroll-left svg { transform: rotate(180deg); }
@media (hover: none) {
	.product-inline-actions { opacity: 1; pointer-events: auto; }
}
@media (max-width: 760px) {
	.feed-sort-tools > label { width: 100%; }
	.feed-sort-tools .control { min-width: 0; flex: 1; }
	.feed-sort-tools .search-select { flex: 1; min-width: 170px; }
	.products-heading > .actions { width: 100%; }
	.products-heading > .actions .btn { font-size: 12px; }
}


/* Larger system text fields; product identifiers stay together at the top. */
.product-dialog .product-system-text {
	min-height: 132px;
	height: 132px;
	resize: vertical;
	overflow-wrap: anywhere;
	white-space: pre-wrap;
}
.product-dialog .product-system-field textarea:not(.product-system-text) {
	min-height: 201px;
	height: 201px;
	resize: vertical;
}
.product-dialog .product-identity-fields {
	order: -1;
}
.product-dialog .product-field-hint {
	display: block;
	line-height: 1.5;
}
.products-toolbar {
	flex-direction: column;
	align-items: stretch;
}
.product-tabs {
	overflow: visible;
	flex-wrap: wrap;
	padding: 3px 3px 0;
	gap: 5px 10px;
}
.products-toolbar .toolbar-filters {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	padding: 3px;
}
.products-toolbar .toolbar-filters > :is(.search-select,select) {
	flex: 0 1 260px;
	width: 260px;
	min-width: 0;
	max-width: 100%;
}
.products-toolbar .toolbar-filters > .search {
	flex: 1 1 290px;
	min-width: 0;
	max-width: 100%;
}

/* Alternate the existing surface and its slightly lighter tone. */
.product-list-table tr > :nth-child(odd) { --product-column-tone: var(--panel); }
.product-list-table tr > :nth-child(even) { --product-column-tone: var(--raised); }
.product-list-table :is(th,td) {
	background: var(--product-column-tone, var(--panel));
	border-inline-end: 1px solid var(--line);
}
.product-list-table tbody tr:hover td {
	background: color-mix(in srgb, var(--product-column-tone, var(--panel)) 85%, var(--raised));
}
.warehouse-directory-cards .feed-card-footer {
	justify-content: flex-end;
	align-items: flex-end;
}

.warehouse-directories-heading > .actions {
	justify-content: flex-end;
	flex-wrap: wrap;
	margin-left: auto;
}

.product-dialog .product-identity-fields > .form-grid {
	grid-template-columns: repeat(3,minmax(0,1fr));
}
@media (max-width: 800px) {
	.product-dialog .product-identity-fields > .form-grid {
		grid-template-columns: minmax(0,1fr);
	}
}
@media (max-width: 620px) {
	.products-toolbar .toolbar-filters > :is(.search-select,select,.search) {
		flex: 1 1 100%;
		width: 100%;
	}
}

.feed-type-badges { position: absolute; top: 16px; right: 16px; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.feed-type-badges .feed-type-badge { position: static; }
.feed-price-stock-badge { color: var(--accent); background: var(--panel); white-space: nowrap; }
