:root {
  color-scheme: light;
  --bg: #f5f6f8;
  --panel: #ffffff;
  --text: #202124;
  --muted: #6b7280;
  --border: #e2e5e9;
  --accent: #8b2be2;
  --accent-dark: #6d1db8;
  --danger: #b42318;
  --success: #067647;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 15px; }
a { color: var(--accent-dark); text-decoration: none; }
h1, h2 { margin: 0; letter-spacing: -0.02em; }
h1 { font-size: 1.7rem; }
h2 { font-size: 1.1rem; }
.muted { color: var(--muted); }
.hidden { display: none !important; }
.nowrap { white-space: nowrap; }
.topbar { height: 64px; padding: 0 max(24px, calc((100vw - 1280px) / 2)); background: var(--panel); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.topbar nav { display: flex; align-items: center; gap: 20px; }
.logo { color: var(--text); font-size: 1.15rem; font-weight: 800; }
.container { width: min(1280px, calc(100% - 32px)); margin: 32px auto 64px; }
.page-heading, .panel-title { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.page-heading { margin-bottom: 20px; }
.page-heading p { margin: 7px 0 0; }
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 1px 2px rgb(0 0 0 / 4%); margin-bottom: 20px; }
.toolbar { display: flex; justify-content: space-between; align-items: end; gap: 20px; padding: 16px; }
.search { width: min(560px, 100%); }
label { display: grid; gap: 7px; color: #40444b; font-weight: 600; }
input, select { width: 100%; border: 1px solid #cfd4dc; border-radius: 8px; background: #fff; color: var(--text); padding: 10px 11px; font: inherit; }
input:focus, select:focus { outline: 3px solid rgb(139 43 226 / 16%); border-color: var(--accent); }
button { border: 0; border-radius: 8px; padding: 10px 15px; background: var(--accent); color: white; font: inherit; font-weight: 700; cursor: pointer; }
button:hover { background: var(--accent-dark); }
button:disabled { cursor: not-allowed; opacity: .5; }
button.secondary { background: #fff; color: #363a41; border: 1px solid #cfd4dc; }
button.secondary:hover { background: #f3f4f6; }
button.small { padding: 7px 9px; font-size: .86rem; }
.inline-form { display: inline; }
.button-link { padding: 0; background: transparent; color: var(--accent-dark); font-weight: 500; }
.button-link:hover { background: transparent; text-decoration: underline; }
.table-wrap { overflow-x: auto; scrollbar-gutter: stable; }
.sticky-horizontal-scroll { position: fixed; bottom: 0; height: 18px; overflow-x: auto; overflow-y: hidden; z-index: 30; background: #f0f1f3; border: 1px solid #d6d9de; box-shadow: 0 -2px 8px rgb(0 0 0 / 8%); }
.sticky-horizontal-scroll > div { height: 1px; }
.table-wrap .panel-title { padding: 16px; border-bottom: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; vertical-align: middle; padding: 13px 15px; border-bottom: 1px solid var(--border); }
th { color: #535862; background: #fafafa; font-size: .78rem; letter-spacing: .03em; text-transform: uppercase; }
tbody tr:last-child td { border-bottom: 0; }
.empty { padding: 36px; color: var(--muted); text-align: center; }
.price-action { display: flex; min-width: 210px; gap: 8px; }
.price-action input { width: 100px; }
.product-photo { display: block; width: 58px; height: 76px; object-fit: cover; border-radius: 7px; background: #f1f2f4; }
.no-photo { display: grid; width: 58px; height: 76px; place-items: center; border-radius: 7px; background: #f1f2f4; color: var(--muted); font-size: .68rem; text-align: center; }
.article-cell, .product-info { min-width: 145px; }
.article-cell, .product-info { display: table-cell; }
.article-cell span, .product-info span { display: block; margin-top: 5px; color: var(--muted); font-size: .82rem; }
.product-info { min-width: 200px; }
.account-name { min-width: 135px; font-weight: 600; }
.account-filter { width: min(260px, 100%); }
.scope-summary { display: flex; flex-wrap: wrap; gap: 5px 16px; }
.scope-summary span { display: inline-block; }
.security-note { margin: 15px 0 0; }
.table-wrap td input[type="number"] { width: 100px; }
.alert { border-radius: 9px; padding: 12px 14px; margin: 0 0 18px; border: 1px solid; }
.alert.error { color: var(--danger); background: #fff1f0; border-color: #fecdca; }
.alert.success { color: var(--success); background: #ecfdf3; border-color: #abefc6; }
.login-body { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(circle at top, #f4e9ff, var(--bg) 48%); }
.login-card { width: min(420px, 100%); background: white; padding: 34px; border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 16px 46px rgb(36 19 54 / 10%); }
.login-card h1 { margin: 15px 0 7px; }
.brand-mark { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 12px; color: white; font-weight: 900; background: linear-gradient(135deg, #cb11ab, #481173); }
.stack { display: grid; gap: 17px; margin-top: 24px; }
.form-panel { padding: 20px; }
.form-panel h2 { margin-bottom: 16px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: end; }
.form-grid .wide { grid-column: 1 / -1; }
.checkbox { display: flex; align-items: center; gap: 8px; }
.checkbox input { width: auto; }
@media (max-width: 720px) {
  .topbar { height: auto; padding: 14px 16px; align-items: flex-start; }
  .topbar nav { flex-wrap: wrap; justify-content: flex-end; gap: 10px 14px; }
  .container { width: min(100% - 20px, 1280px); margin-top: 20px; }
  .toolbar, .page-heading { align-items: stretch; flex-direction: column; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .wide { grid-column: auto; }
}

