:root {
  --bg: #f4f6fb;
  --card: #ffffff;
  --line: #d9deea;
  --text: #172033;
  --muted: #667085;
  --accent: #2563eb;
  --accent2: #16a34a;
  --danger: #dc2626;
  --soft: #eef4ff;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; background: var(--bg); color: var(--text); }
a { color: inherit; }
.brand { font-weight: 800; text-decoration: none; font-size: 20px; color: #111827; }
nav { display: flex; flex-wrap: wrap; gap: 14px; color: var(--muted); }
nav a { text-decoration: none; }
nav a:hover { color: var(--accent); }
.container { max-width: 1440px; margin: 0 auto; padding: 24px; }
.page-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 18px; }
.page-head.compact { align-items: center; margin-bottom: 12px; }
h1, h2 { margin: 0 0 10px; color: #111827; }
h1 { font-size: 30px; }
h2 { font-size: 20px; }
.muted { color: var(--muted); margin: 4px 0 0; }
.grid { display: grid; gap: 18px; }
.grid.two { grid-template-columns: 2fr 1fr; }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; margin-bottom: 18px; box-shadow: 0 10px 26px rgba(16,24,40,.06); }
.login-card { max-width: 420px; margin: 10vh auto; }
.messages { display: grid; gap: 8px; margin-bottom: 16px; }
.msg { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); white-space: pre-wrap; }
.msg.ok { border-color: rgba(22, 163, 74, .35); background: #ecfdf3; color: #14532d; }
.msg.error { border-color: rgba(220, 38, 38, .35); background: #fff1f2; color: #7f1d1d; }
.badge { background: var(--soft); color: #1d4ed8; border: 1px solid #bfdbfe; border-radius: 999px; padding: 8px 12px; font-weight: 700; }
.big-number { font-size: 58px; font-weight: 900; line-height: 1; margin: 10px 0; }
table { width: 100%; border-collapse: collapse; }
th, td { border-bottom: 1px solid var(--line); padding: 10px 9px; text-align: left; vertical-align: middle; }
th { color: #475467; font-weight: 700; font-size: 13px; background: #f8fafc; }
tr:hover td { background: #f8fbff; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.nowrap { white-space: nowrap; }
pre { margin: 0; max-width: 520px; white-space: pre-wrap; word-break: break-word; font-size: 12px; color: #475467; background: #f8fafc; border: 1px solid #e5e7eb; border-radius: 8px; padding: 8px; }
form { margin: 0; }
label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; }
input, select { width: 100%; border: 1px solid var(--line); border-radius: 10px; background: #ffffff; color: var(--text); padding: 10px 11px; outline: none; }
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
input.amount { width: 110px; font-size: 16px; font-weight: 700; }
button, .btn { display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 11px; background: var(--accent); color: white; padding: 10px 14px; font-weight: 750; text-decoration: none; cursor: pointer; }
button:hover, .btn:hover { filter: brightness(1.05); }
button.secondary, .btn.secondary { background: #e5e7eb; color: #111827; }
button.small, .btn.small { padding: 7px 10px; border-radius: 9px; font-size: 12px; }
button.danger, .btn.danger { background: var(--danger); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-grid button { grid-column: 1 / -1; }
.inline-form { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; }
.inline-form label { min-width: 340px; }
.stack { display: grid; gap: 12px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.disabled-row { opacity: .45; }
.danger-zone { border-color: rgba(220,38,38,.35); background: #fffafa; }
.check { display: flex; grid-template-columns: auto 1fr; align-items: center; gap: 8px; margin-bottom: 12px; }
.check input { width: auto; }
code { color: #1d4ed8; background: #eff6ff; border: 1px solid #bfdbfe; padding: 1px 5px; border-radius: 6px; }
.badge.soft { background: #f8fafc; color: var(--muted); border-color: var(--line); }
.metrics-row { display: flex; gap: 26px; align-items: flex-start; flex-wrap: wrap; }
.actions-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 14px; }
.warehouse-note { margin-top: 12px; }
.filters-grid { display: grid; grid-template-columns: minmax(240px, 1.3fr) repeat(4, minmax(150px, .8fr)) auto; gap: 12px; align-items: end; }
.cards-actions { margin-top: 14px; }
.cards-actions form { display: inline-flex; }
.cards-summary { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tag { display: inline-flex; align-items: center; border: 1px solid #dbe4f0; background: #f8fafc; color: #344054; border-radius: 999px; padding: 6px 10px; font-size: 13px; }
.excel-card { padding: 0; overflow: hidden; }
.excel-scroll { overflow: auto; max-height: calc(100vh - 250px); }
.excel-table { border-collapse: separate; border-spacing: 0; min-width: 1600px; font-size: 13px; }
.excel-table th { position: sticky; top: 0; z-index: 2; background: #eaf1ff; color: #1f2937; border-bottom: 1px solid #cbd5e1; border-right: 1px solid #cbd5e1; white-space: nowrap; }
.excel-table td { border-right: 1px solid var(--line); vertical-align: top; background: #ffffff; }
.excel-table tbody tr:nth-child(even) td { background: #f8fafc; }
.excel-table tbody tr:hover td { background: #eff6ff; }
.excel-table .idx { width: 54px; text-align: right; color: var(--muted); }
.excel-table .narrow { min-width: 95px; max-width: 120px; }
.excel-table .mid { min-width: 135px; max-width: 180px; }
.excel-table .wide { min-width: 180px; max-width: 280px; }
.excel-table .wrap { min-width: 260px; max-width: 420px; white-space: pre-wrap; }
.excel-table .desc { min-width: 320px; max-width: 520px; white-space: pre-wrap; }
.excel-table .smallwrap { min-width: 180px; max-width: 360px; white-space: pre-wrap; }
.excel-table .media { min-width: 120px; max-width: 220px; }
.excel-table .stock { min-width: 170px; font-weight: 800; }
.right { text-align: right; }
.photos { display: flex; gap: 4px; flex-wrap: wrap; }
.photos img { width: 42px; height: 56px; object-fit: cover; border-radius: 5px; border: 1px solid var(--line); background: #f8fafc; }
.job-card { display: grid; gap: 10px; align-content: start; }
.job-card form { margin-top: 4px; }
.nd { color: #98a2b3; font-weight: 700; }

/* Change journal, adapted to the compact operation-list layout */
.journal-shell { padding: 0; overflow: hidden; }
.journal-header { padding: 24px 22px; border-bottom: 1px solid var(--line); }
.journal-header h1 { margin: 0; font-size: 31px; }
.journal-content { padding: 18px 20px 20px; }
.journal-mode-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.journal-mode-tabs { display: flex; gap: 10px; margin-bottom: 0; overflow-x: auto; padding-bottom: 2px; }
.journal-mode-tab { flex: 0 0 auto; padding: 12px 18px; border: 1px solid #cbd5e1; border-radius: 11px; background: #fff; color: #253044; font-size: 15px; font-weight: 850; text-decoration: none; }
.journal-mode-tab:hover { border-color: #94a3b8; }
.journal-mode-tab.active { border-color: #5b9f8e; background: #eaf7f3; color: #246454; box-shadow: inset 0 0 0 1px rgba(36,100,84,.08); }
.journal-tabs { display: flex; gap: 9px; margin-bottom: 18px; overflow-x: auto; padding-bottom: 2px; }
.journal-tab { flex: 0 0 auto; padding: 8px 12px; border: 1px solid #d4dce7; border-radius: 9px; color: #475467; background: #fff; font-size: 13px; font-weight: 800; text-decoration: none; }
.journal-tab:hover { border-color: #94a3b8; }
.journal-tab.active { border-color: #86bcae; background: #eef8f5; color: #28695a; box-shadow: inset 0 0 0 1px rgba(40,105,90,.08); }
.journal-filter-form { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.journal-filter-form > label { width: 190px; font-weight: 750; }
.journal-filter-form .journal-search-field { width: min(300px, 100%); }
.journal-filter-form select,
.journal-filter-form input { height: 44px; }
.journal-show-button { min-height: 44px; background: #4f9584; }
.journal-reset-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-end;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 11px;
  background: #e5e7eb;
  color: #111827;
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}
.journal-reset-link:hover { background: #dfe3e8; }
.journal-rollback-mode-toggle { min-height: 44px; border: 1px solid #dc2626; background: #dc2626; color: #fff; white-space: nowrap; }
.journal-rollback-mode-toggle:hover { border-color: #b91c1c; background: #b91c1c; filter: none; }
.journal-rollback-mode-toggle.active { border-color: #b91c1c; background: #b91c1c; color: #fff; }
.journal-days { display: grid; gap: 22px; }
.journal-day { display: grid; gap: 9px; }
.journal-day-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 0 4px; color: var(--muted); font-size: 12px; font-weight: 750; }
.journal-day-head > div { display: flex; align-items: baseline; gap: 8px; }
.journal-day-head strong { color: #344054; font-size: 14px; }
.journal-batches { display: grid; gap: 9px; }
.journal-batch { overflow: hidden; border: 1px solid #d9e0ea; border-radius: 11px; background: #fbfcfe; }
.journal-batch[open] { background: #fff; border-color: #cbd5e1; }
.journal-batch-summary { display: grid; grid-template-columns: minmax(280px, 1fr) auto auto 18px; align-items: center; gap: 14px; min-height: 64px; padding: 12px 15px; cursor: pointer; list-style: none; user-select: none; }
.journal-batch-summary::-webkit-details-marker { display: none; }
.journal-batch-summary:hover { background: #f5f8fb; }
.journal-batch-main { grid-column: 1; min-width: 0; }
.journal-batch-title { color: #202938; font-size: 16px; font-weight: 850; }
.journal-batch-meta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 5px; color: var(--muted); font-size: 12px; font-weight: 700; }
.journal-batch-meta code { padding: 0; border: 0; background: transparent; color: #7c8799; }
.journal-batch-head-action { display: none; grid-column: 2; align-items: center; justify-content: flex-end; min-width: 0; }
.journal-rollback-mode .journal-batch-head-action.journal-rollback-action-available { display: flex; min-width: 112px; }
.journal-batch-metrics { display: flex; grid-column: 3; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.journal-metric { display: inline-flex; align-items: center; min-height: 30px; padding: 5px 10px; border: 1px solid #d8e3e0; border-radius: 999px; background: #f1f8f6; color: #52616f; font-size: 12px; font-weight: 850; white-space: nowrap; }
.journal-metric-positive { border-color: #a7e8bc; background: #f0fff5; color: #397153; }
.journal-metric-negative { border-color: #fecaca; background: #fff3f3; color: #b54747; }
.journal-metric-neutral { color: #64748b; }
.journal-metric-price { border-color: #c7e2dc; background: #eff8f6; color: #426e64; }
.journal-metric-discount { border-color: #ddd2f5; background: #f8f5ff; color: #6d56a2; }
.journal-batch-chevron { grid-column: 4; }
.journal-batch-chevron::before { content: "▾"; display: block; color: var(--muted); font-size: 14px; line-height: 1; transform: rotate(-90deg); transition: transform .15s ease; }
.journal-batch[open] .journal-batch-chevron::before { transform: rotate(0); }
.journal-status,
.journal-item-status { display: inline-flex; align-items: center; width: fit-content; border-radius: 999px; padding: 4px 8px; font-size: 12px; line-height: 1.2; font-weight: 800; white-space: nowrap; background: #f1f5f9; color: #475569; }
.journal-status-success,
.journal-item-status-success { background: #dcfce7; color: #166534; }
.journal-status-running,
.journal-status-queued,
.journal-item-status-running,
.journal-item-status-queued { background: #dbeafe; color: #1d4ed8; }
.journal-status-partial { background: #fef3c7; color: #92400e; }
.journal-status-error,
.journal-item-status-error { background: #fee2e2; color: #991b1b; }
.journal-status-cancelled,
.journal-item-status-cancelled { background: #e5e7eb; color: #4b5563; }
.journal-batch-body { border-top: 1px solid var(--line); background: #fff; }
.journal-rollback-state { display: inline-flex; align-items: center; min-height: 25px; padding: 4px 8px; border: 1px solid #ddd6fe; border-radius: 999px; background: #f5f3ff; color: #6d4fc2; font-size: 12px; font-weight: 800; white-space: nowrap; }
.journal-rollback-state-error { border-color: #fecaca; background: #fff1f2; color: #b42318; }
.journal-rollback-button { min-height: 32px; border: 1px solid #dc2626; border-radius: 9px; background: #dc2626; color: #fff; padding: 7px 11px; font-size: 12px; white-space: nowrap; }
.journal-rollback-button:hover { border-color: #b91c1c; background: #b91c1c; filter: none; }
.journal-result { display: grid; gap: 4px; margin: 14px 16px 0; padding: 10px 12px; border-radius: 10px; background: #f8fafc; color: #475569; font-size: 13px; }
.journal-result small { color: inherit; overflow-wrap: anywhere; }
.journal-result-success { background: #f0fdf4; color: #166534; }
.journal-result-partial { background: #fffbeb; color: #92400e; }
.journal-result-error { background: #fff1f2; color: #991b1b; }
.journal-result-cancelled { background: #f1f5f9; color: #475569; }
.journal-changes { padding: 16px; }
.journal-changes h3 { margin: 0 0 12px; color: #111827; font-size: 18px; }
.journal-change-groups { display: grid; gap: 12px; }
.journal-change-group { overflow: hidden; border: 1px solid #d8e0eb; border-radius: 13px; background: #fff; }
.journal-change-group-head { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 11px; min-height: 70px; padding: 13px 15px; list-style: none; cursor: pointer; background: #f8fafc; user-select: none; }
.journal-change-group-head::-webkit-details-marker { display: none; }
.journal-change-group-head:hover { background: #f4f7fb; }
.journal-change-group-chevron::before { content: "▶"; display: block; color: #64748b; font-size: 12px; transition: transform .15s ease; }
.journal-change-group[open] .journal-change-group-chevron::before { transform: rotate(90deg); }
.journal-change-group-main { min-width: 0; }
.journal-change-group-title { overflow-wrap: anywhere; color: #172033; font-size: 17px; font-weight: 850; }
.journal-change-group-meta { margin-top: 4px; color: var(--muted); font-size: 12px; font-weight: 650; }
.journal-change-count { display: inline-flex; align-items: center; justify-content: center; min-width: 48px; min-height: 34px; padding: 6px 12px; border: 1px solid #bfdbfe; border-radius: 999px; background: #eff6ff; color: #1d4ed8; font-size: 16px; font-weight: 900; font-variant-numeric: tabular-nums; }
.journal-change-group-body { display: grid; gap: 12px; padding: 12px; border-top: 1px solid #d8e0eb; }
.journal-article-card { overflow: hidden; border: 1px solid #dfe5ed; border-radius: 12px; background: #fff; }
.journal-article-head { display: flex; align-items: center; gap: 12px; min-height: 88px; padding: 12px 14px; background: #f8fafc; }
.journal-article-media { flex: 0 0 auto; text-decoration: none; }
.journal-article-img { display: flex; align-items: center; justify-content: center; width: 52px; height: 68px; border: 1px solid #d8dee8; border-radius: 8px; object-fit: cover; background: #fff; color: #98a2b3; font-size: 10px; text-align: center; }
.journal-article-img-empty { padding: 5px; }
.journal-article-main { min-width: 0; }
.journal-article-title { color: #172033; font-size: 16px; font-weight: 850; overflow-wrap: anywhere; }
.journal-article-title a { color: inherit; text-decoration: none; }
.journal-article-title a:hover { color: #2563eb; }
.journal-article-meta { margin-top: 5px; color: var(--muted); font-size: 12px; font-weight: 650; }
.journal-detail-table-wrap { overflow-x: auto; border-top: 1px solid #dfe5ed; }
.journal-detail-table { border-collapse: separate; border-spacing: 0; font-size: 14px; }
.journal-price-detail-table { min-width: 720px; }
.journal-stock-detail-table { min-width: 980px; }
.journal-detail-table th { padding: 11px 14px; border-top: 0; color: #475467; font-size: 12px; font-weight: 850; white-space: nowrap; }
.journal-detail-table td { padding: 13px 14px; background: #fff; }
.journal-detail-table tbody tr:last-child td { border-bottom: 0; }
.journal-price-detail-table th,
.journal-price-detail-table td { background: #fff9f1; }
.journal-price-detail-table tbody tr:hover td { background: #fff6e9; }
.journal-stock-detail-table tbody tr:hover td { background: #f8fbff; }
.journal-detail-change-name { width: 54%; color: #92400e; }
.journal-detail-change-name strong { display: block; font-size: 14px; }
.journal-detail-change-name small { display: block; margin-top: 3px; color: #8b6b4a; font-size: 11px; }
.journal-detail-id { min-width: 120px; font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap; }
.journal-detail-id a { color: #344054; text-decoration: none; }
.journal-detail-id a:hover { color: #2563eb; }
.journal-detail-old,
.journal-detail-new { min-width: 105px; color: #475467; font-size: 16px; font-weight: 900; font-variant-numeric: tabular-nums; white-space: nowrap; }
.journal-detail-new-price { color: #991b1b; }
.journal-detail-new-stock { border-radius: 12px; background: #ecfdf3 !important; color: #166534; }
.journal-detail-new-stock.journal-detail-new-error { background: #fff1f2 !important; color: #991b1b; }
.journal-detail-arrow { width: 48px; min-width: 48px; padding-left: 5px !important; padding-right: 5px !important; text-align: center; color: #2563eb; font-size: 24px; font-weight: 900; }
.journal-detail-article { min-width: 120px; font-weight: 800; font-variant-numeric: tabular-nums; }
.journal-detail-product { min-width: 280px; font-weight: 700; overflow-wrap: anywhere; }
.journal-detail-size { min-width: 82px; font-weight: 850; white-space: nowrap; }
.journal-detail-barcode { min-width: 155px; font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap; }
.journal-detail-state { display: inline-flex; width: fit-content; margin-top: 5px; border-radius: 999px; padding: 3px 7px; font-size: 10px; line-height: 1.2; font-weight: 800; white-space: nowrap; }
.journal-detail-error { display: block; max-width: 280px; margin-top: 4px; overflow: hidden; color: #b91c1c !important; font-size: 10px !important; text-overflow: ellipsis; white-space: nowrap; }
.journal-empty { text-align: center; padding: 54px 20px; border: 1px dashed #d7dee8; border-radius: 12px; background: #fafbfd; }
@media (max-width: 1200px) {
  .filters-grid { grid-template-columns: 1fr 1fr; }
  .grid.three { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .grid.two { grid-template-columns: 1fr; }
  .page-head { flex-direction: column; }
  table { display: block; overflow-x: auto; }
}
@media (max-width: 700px) {
  .filters-grid { grid-template-columns: 1fr; }
  .journal-content { padding: 14px 12px 16px; }
  .journal-header { padding: 20px 16px; }
  .journal-mode-row { align-items: stretch; flex-direction: column; }
  .journal-rollback-mode-toggle { width: 100%; }
  .journal-filter-form > label,
  .journal-filter-form .journal-search-field { width: 100%; }
  .journal-show-button { width: 100%; }
  .journal-reset-link { width: 100%; }
  .journal-batch-summary { grid-template-columns: 1fr 18px; gap: 10px; padding: 13px; }
  .journal-batch-main { grid-column: 1; }
  .journal-batch-head-action { grid-column: 1; justify-content: flex-start; min-width: 0; }
  .journal-batch-metrics { grid-column: 1; justify-content: flex-start; }
  .journal-batch-chevron { grid-column: 2; grid-row: 1 / span 3; }
  .journal-day-head { align-items: flex-end; }
  .journal-day-head > div { display: grid; gap: 2px; }
  .journal-rollback-button { width: auto; }
  .journal-changes { padding: 12px; }
  .journal-change-group-head { grid-template-columns: 16px minmax(0, 1fr) auto; gap: 8px; padding: 12px; }
  .journal-change-group-title { font-size: 15px; }
  .journal-change-group-meta { line-height: 1.45; }
  .journal-change-count { min-width: 38px; min-height: 30px; padding: 4px 9px; font-size: 14px; }
  .journal-change-group-body { padding: 9px; }
  .journal-article-head { align-items: flex-start; padding: 10px; }
  .journal-article-img { width: 44px; height: 58px; }
  .journal-article-title { font-size: 14px; }
}

/* Selected warehouse stock page */
.stock-filter-form { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(320px, 1.4fr) minmax(220px, .8fr) auto auto; gap: 12px; align-items: end; }
.stock-group { overflow: hidden; }
.stock-group-head { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.stock-group-img { width: 72px; height: 96px; object-fit: cover; border: 1px solid var(--line); border-radius: 10px; background: #f8fafc; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 12px; }
.stock-group-title { font-size: 18px; font-weight: 850; margin-bottom: 5px; overflow-wrap: anywhere; }
.stock-group-meta { color: var(--muted); font-size: 13px; }
.stock-group-total { min-width: 96px; padding: 10px 14px; border-radius: 12px; background: #ecfdf3; border: 1px solid #bbf7d0; color: #14532d; font-size: 24px; font-weight: 900; text-align: center; }
.stock-article-block { margin-top: 12px; border: 1px solid #e5e7eb; border-radius: 12px; overflow: hidden; background: #fff; }
.stock-article-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; background: #f8fafc; border-bottom: 1px solid #e5e7eb; }

.stock-article-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.stock-article-media { flex: 0 0 auto; }
.stock-article-img { width: 44px; height: 58px; object-fit: cover; border: 1px solid var(--line); border-radius: 8px; background: #f8fafc; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 11px; }
.stock-article-title { min-width: 0; }
.stock-table { min-width: 1180px; }
.stock-table th { white-space: nowrap; }
.stock-table td { vertical-align: middle; }
.photo-cell { width: 62px; }
.stock-thumb { width: 44px; height: 58px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); background: #f8fafc; display: block; }
.stock-title { min-width: 220px; max-width: 520px; white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 1100px) {
  .stock-filter-form { grid-template-columns: 1fr 1fr; }
  .stock-filter-form button:not(.date-range-display), .stock-filter-form .btn { width: 100%; }
}
@media (max-width: 700px) {
  .stock-filter-form { grid-template-columns: 1fr; }
  .stock-group-head { grid-template-columns: 56px 1fr; }
  .stock-group-total { grid-column: 1 / -1; }
  .stock-group-img { width: 56px; height: 74px; }
}

/* Stock page: collapsed groups and article controls */
details.stock-group { padding: 0; }
details.stock-group > summary.stock-group-head { list-style: none; cursor: pointer; padding: 14px 18px; margin: 0; border-bottom: 0; user-select: none; }
details.stock-group > summary.stock-group-head::-webkit-details-marker { display: none; }
details.stock-group > summary.stock-group-head::before { content: "▶"; font-size: 14px; color: var(--muted); align-self: center; }
details.stock-group[open] > summary.stock-group-head { border-bottom: 1px solid var(--line); margin-bottom: 0; }
details.stock-group[open] > summary.stock-group-head::before { content: "▼"; }
.stock-group-body { padding: 12px 18px 18px; }
details.stock-article-block { display: block; }
details.stock-article-block > summary.stock-article-head { list-style: none; cursor: pointer; user-select: none; }
details.stock-article-block > summary.stock-article-head::-webkit-details-marker { display: none; }
details.stock-article-block > summary.stock-article-head::before { content: "▶"; color: var(--muted); margin-right: 8px; }
details.stock-article-block[open] > summary.stock-article-head::before { content: "▼"; }
details.stock-article-block > table { border-top: 1px solid #e5e7eb; }
.stock-table { min-width: 1120px; }
@media (max-width: 1100px) {
}
@media (max-width: 700px) {
  details.stock-group > summary.stock-group-head { grid-template-columns: 18px 56px 1fr; }
}
details.stock-group > summary.stock-group-head { grid-template-columns: 18px 72px minmax(0, 1fr) auto; }
@media (max-width: 700px) {
  details.stock-group > summary.stock-group-head { grid-template-columns: 18px 56px minmax(0, 1fr); }
  details.stock-group > summary.stock-group-head .stock-group-total { grid-column: 1 / -1; }
}

/* Stock page: article image restored and article-level bulk fill */
.stock-article-head { flex-wrap: wrap; }
.stock-article-left { flex: 1 1 360px; }
.article-stock-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex: 0 0 auto;
  margin-left: auto;
}
.article-stock-value {
  width: 82px;
  min-width: 82px;
  max-width: 82px;
  height: 36px;
  padding: 6px 8px;
  border-radius: 9px;
  font-size: 15px;
  font-weight: 800;
  text-align: center;
}
.article-stock-value.invalid {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, .12);
}
.stock-article-card-head { grid-template-columns: 18px 72px minmax(0, 1fr) auto auto !important; }
.stock-article-card-head .article-stock-actions { justify-self: end; }
@media (max-width: 900px) {
  .article-stock-actions { width: auto; margin-left: 0; justify-content: flex-start; }
  .stock-article-card-head { grid-template-columns: 18px 56px minmax(0, 1fr) !important; }
  .stock-article-card-head .article-stock-actions,
  .stock-article-card-head .stock-group-total { grid-column: 1 / -1; justify-self: stretch; }
}

/* Stock update confirmation modal */
.stock-confirm-modal[hidden] { display: none !important; }
.stock-confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
}
.stock-confirm-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .42); }
.stock-confirm-dialog {
  position: relative;
  z-index: 1;
  width: min(1520px, calc(100vw - 56px));
  max-height: min(880px, calc(100vh - 56px));
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, .24);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.stock-confirm-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.stock-confirm-head h2 { margin: 0 0 4px; }
.icon-button { width: 36px; height: 36px; border-radius: 10px; padding: 0; display: inline-flex; align-items: center; justify-content: center; font-size: 26px; line-height: 1; background: #fff; color: #334155; border: 1px solid var(--line); }
.stock-confirm-warning {
  margin: 14px 22px 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #fde68a;
  background: #fffbeb;
  color: #92400e;
  font-weight: 750;
}
.stock-confirm-table-wrap {
  margin: 14px 22px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: auto;
  flex: 1 1 auto;
  background: #fff;
  box-shadow: 0 8px 22px rgba(16,24,40,.05);
}
.stock-confirm-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 1040px;
  font-size: 16px;
}
.stock-confirm-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  color: #475467;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 850;
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
}
.stock-confirm-table td {
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
  text-align: left;
  vertical-align: middle;
  background: #fff;
}
.stock-confirm-table tbody tr:hover td { background: #f8fbff; }
.stock-confirm-table tbody tr:last-child td { border-bottom: 0; }
.stock-confirm-article, .stock-confirm-chrt, .stock-confirm-barcode { white-space: nowrap; font-weight: 750; }
.stock-confirm-title-cell { min-width: 340px; max-width: 620px; white-space: normal; overflow-wrap: anywhere; font-weight: 650; }
.stock-confirm-size { white-space: nowrap; font-weight: 800; }
.stock-confirm-old-value, .stock-confirm-new-value {
  min-width: 86px;
  text-align: center !important;
  white-space: nowrap;
  font-size: 18px;
  font-weight: 900;
  border-radius: 12px;
}
.stock-confirm-old-value { color: #475467; }
.stock-confirm-arrow-head { width: 42px; }
.stock-confirm-arrow {
  width: 42px;
  padding-left: 4px !important;
  padding-right: 4px !important;
  text-align: center !important;
  color: var(--accent);
  font-size: 24px;
  font-weight: 950;
}
.stock-confirm-new-value { color: #14532d; background: #ecfdf3 !important; }
.stock-confirm-new-value-danger {
  color: #991b1b !important;
  background: #fee2e2 !important;
}
.stock-confirm-table tbody tr:hover td.stock-confirm-new-value-danger {
  background: #fecaca !important;
}
.stock-confirm-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--line); background: #f8fafc; }
@media (max-width: 700px) {
  .stock-confirm-modal { padding: 10px; align-items: stretch; }
  .stock-confirm-dialog { width: 100%; max-height: calc(100vh - 20px); }
  .stock-confirm-table { font-size: 14px; }
  .stock-confirm-table th, .stock-confirm-table td { padding: 10px 12px; }
  .stock-confirm-actions { flex-direction: column-reverse; }
  .stock-confirm-actions button { width: 100%; }
}

/* Stock update confirmation modal: grouped readable view with article images */
.stock-confirm-groups {
  display: grid;
  gap: 14px;
  padding: 14px;
}
.stock-confirm-bundle {
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: #ffffff;
}
.stock-confirm-bundle > summary.stock-confirm-bundle-head {
  list-style: none;
  cursor: pointer;
  user-select: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
}
.stock-confirm-bundle > summary.stock-confirm-bundle-head::-webkit-details-marker { display: none; }
.stock-confirm-bundle > summary.stock-confirm-bundle-head::before {
  content: "▼";
  color: var(--muted);
  margin-right: 8px;
}
.stock-confirm-bundle:not([open]) > summary.stock-confirm-bundle-head::before { content: "▶"; }
.stock-confirm-bundle-head {
  grid-template-columns: 18px minmax(0, 1fr) auto !important;
}
.stock-confirm-bundle-title {
  font-size: 18px;
  font-weight: 900;
  color: #111827;
  overflow-wrap: anywhere;
}
.stock-confirm-bundle-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}
.stock-confirm-bundle-count {
  min-width: 54px;
  padding: 8px 12px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  border-radius: 999px;
  text-align: center;
  font-weight: 900;
}
.stock-confirm-bundle-body {
  display: grid;
  gap: 14px;
  padding: 14px;
}
.stock-confirm-article-block {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  overflow: hidden;
  background: #ffffff;
}
.stock-confirm-article-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: #fbfcff;
  border-bottom: 1px solid #e5e7eb;
}
.stock-confirm-article-media { flex: 0 0 auto; }
.stock-confirm-article-img {
  width: 54px;
  height: 72px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 11px;
}
.stock-confirm-article-main { min-width: 0; }
.stock-confirm-article-title {
  color: #111827;
  font-size: 18px;
  font-weight: 900;
  overflow-wrap: anywhere;
}
.stock-confirm-article-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}
.stock-confirm-article-block .stock-confirm-table {
  min-width: 1040px;
  border-collapse: collapse;
}
.stock-confirm-article-block .stock-confirm-table th,
.stock-confirm-article-block .stock-confirm-table td {
  border-bottom: 1px solid var(--line);
}
.stock-confirm-article-block .stock-confirm-table tbody tr:last-child td { border-bottom: 0; }
@media (max-width: 700px) {
  .stock-confirm-groups { padding: 10px; }
  .stock-confirm-bundle-body { padding: 10px; }
  .stock-confirm-article-img { width: 44px; height: 58px; }
  .stock-confirm-article-title { font-size: 15px; }
}

/* Stock page: compact, aligned article-level fill controls */
.stock-article-head,
.stock-article-card-head {
  align-items: center !important;
}

.article-stock-actions {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0 !important;
  align-self: center !important;
  margin-left: 0 !important;
}

.article-stock-value {
  width: 72px !important;
  min-width: 72px !important;
  max-width: 72px !important;
  height: 38px !important;
  min-height: 38px !important;
  padding: 0 8px !important;
  box-sizing: border-box !important;
  border-radius: 10px !important;
  line-height: 38px !important;
  text-align: center !important;
}

.stock-article-head .stock-total-pill,
.stock-article-card-head .stock-group-total {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  align-self: center !important;
  min-width: 62px !important;
  width: auto !important;
  height: 38px !important;
  min-height: 38px !important;
  padding: 0 14px !important;
  box-sizing: border-box !important;
  border-radius: 999px !important;
  font-size: 16px !important;
  line-height: 1 !important;
  font-weight: 800 !important;
}

.stock-article-card-head .article-stock-actions {
  justify-self: end !important;
}

.stock-article-card-head .stock-group-total {
  justify-self: end !important;
}

details.stock-article-block > summary.stock-article-head {
  flex-wrap: nowrap !important;
  gap: 10px !important;
}

@media (max-width: 900px) {
  .stock-article-card-head .article-stock-actions,
  .stock-article-card-head .stock-group-total {
    grid-column: auto !important;
    justify-self: end !important;
    width: auto !important;
  }
}

/* Save queue */
.save-queue-shell {
  display: grid;
  gap: 18px;
  max-width: 1180px;
  margin: 0 auto;
}

.save-queue-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  padding: 24px 26px;
  border: 1px solid #dce4ef;
  border-radius: 18px;
  background: linear-gradient(135deg, #fff 0%, #f5f9ff 70%, #eef5ff 100%);
  box-shadow: 0 14px 35px rgba(30, 64, 175, .07);
}

.save-queue-eyebrow {
  margin: 0 0 5px !important;
  color: #2563eb !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.save-queue-header h1 { margin: 0; color: #172033; font-size: clamp(26px, 3vw, 38px); line-height: 1.1; }

.save-queue-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.save-queue-summary article { display: flex; align-items: center; gap: 13px; min-height: 82px; padding: 15px 18px; border: 1px solid #e0e6ef; border-radius: 15px; background: #fff; box-shadow: 0 7px 22px rgba(15, 23, 42, .04); }
.save-queue-summary article > div { display: grid; gap: 1px; }
.save-queue-summary strong { color: #172033; font-size: 25px; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
.save-queue-summary small { color: #64748b; font-size: 12px; font-weight: 750; }
.save-queue-summary-dot { width: 13px; height: 13px; border-radius: 50%; }
.save-queue-summary-dot.is-running { background: #2563eb; box-shadow: 0 0 0 6px #dbeafe; }
.save-queue-summary-dot.is-queued { background: #8b5cf6; box-shadow: 0 0 0 6px #ede9fe; }
.save-queue-summary-dot.is-attention { background: #f59e0b; box-shadow: 0 0 0 6px #fef3c7; }

.save-queue-list { display: grid; gap: 13px; }
.save-queue-empty { display: grid; gap: 7px; justify-items: center; padding: 60px 20px; border: 1px dashed #cbd5e1; border-radius: 16px; background: #fff; color: #64748b; text-align: center; }
.save-queue-empty strong { color: #334155; font-size: 18px; }

.save-job { position: relative; overflow: hidden; border: 1px solid #dce3ec; border-radius: 16px; background: #fff; box-shadow: 0 9px 28px rgba(15, 23, 42, .055); }
.save-job-accent { position: absolute; inset: 0 auto 0 0; width: 4px; background: #94a3b8; }
.save-job-running .save-job-accent { background: #2563eb; }
.save-job-queued .save-job-accent { background: #8b5cf6; }
.save-job-success .save-job-accent { background: #22c55e; }
.save-job-partial .save-job-accent { background: #f59e0b; }
.save-job-error .save-job-accent { background: #ef4444; }
.save-job-cancelled .save-job-accent { background: #94a3b8; }
.save-job-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 17px 20px 12px 23px; }
.save-job-title-row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.save-job-title-row h2 { margin: 0; color: #1e293b; font-size: 17px; }
.save-job-relation, .save-queue-position { display: inline-flex; padding: 4px 7px; border-radius: 7px; background: #f1f5f9; color: #64748b; font-size: 11px; font-weight: 800; }
.save-queue-position { background: #f5f3ff; color: #6d28d9; }
.save-job-meta { display: flex; justify-content: flex-end; gap: 9px; flex-wrap: wrap; color: #7c8799; font-size: 11px; font-weight: 700; }
.save-job-meta a { color: #2563eb; text-decoration: none; }
.save-job-state { margin: 0 18px 0 21px; padding: 14px 15px; border: 1px solid #e4eaf1; border-radius: 12px; background: #f8fafc; }
.save-stage-line { display: flex; align-items: center; gap: 14px; }
.save-stage-line > div { display: grid; gap: 2px; min-width: 0; }
.save-stage-line small { color: #7c8799; font-size: 10px; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.save-stage-line strong { overflow-wrap: anywhere; color: #253047; font-size: 14px; }
.save-current-article { margin-left: auto; padding: 5px 8px; border: 1px solid #bfdbfe; border-radius: 8px; background: #eff6ff; color: #1d4ed8; font-size: 11px; }
.save-progress-count { flex: 0 0 auto; margin-left: auto; color: #475569; font-size: 12px; font-variant-numeric: tabular-nums; }
.save-current-article + .save-progress-count { margin-left: 0; }
.save-progress { overflow: hidden; height: 7px; margin-top: 12px; border-radius: 999px; background: #e2e8f0; }
.save-progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2563eb, #60a5fa); transition: width .25s ease; }
.save-job-success .save-progress i { background: #22c55e; }
.save-job-error .save-progress i { background: #ef4444; }
.save-job-partial .save-progress i { background: #f59e0b; }
.save-job-cancelled .save-progress i { background: #94a3b8; }
.save-job-state > p { margin: 9px 0 0; color: #64748b; font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
.save-job-error-box { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 9px; margin: 10px 18px 0 21px; padding: 10px 12px; border-radius: 10px; background: #fff1f2; color: #991b1b; font-size: 12px; line-height: 1.45; }
.save-job-error-box span { overflow-wrap: anywhere; }
.save-job-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 19px 13px 22px; }
.save-job-metrics { display: flex; gap: 7px; flex-wrap: wrap; }
.save-job-metrics span { padding: 5px 8px; border-radius: 7px; background: #f1f5f9; color: #64748b; font-size: 11px; }
.save-job-metrics b { color: #334155; font-variant-numeric: tabular-nums; }
.save-job-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.save-job-actions form { margin: 0; }
.save-action { min-height: 34px; padding: 7px 11px; border-radius: 9px; font-size: 11px; font-weight: 850; }
.save-action-cancel { border: 1px solid #fecaca; background: #fff; color: #b91c1c; }
.save-action-cancel:hover { border-color: #ef4444; background: #fff1f2; filter: none; }
.save-action-retry { border: 1px solid #bfdbfe; background: #eff6ff; color: #1d4ed8; }
.save-action-retry:hover { border-color: #93c5fd; background: #dbeafe; filter: none; }
.save-cancel-wait { color: #b45309; font-size: 11px; font-weight: 800; }

.save-events { border-top: 1px solid #e5eaf0; background: #fbfcfe; }
.save-events > summary { display: flex; align-items: center; gap: 7px; padding: 11px 20px 11px 23px; color: #64748b; font-size: 12px; font-weight: 800; cursor: pointer; list-style: none; }
.save-events > summary::-webkit-details-marker { display: none; }
.save-events > summary::before { content: "▶"; font-size: 9px; transition: transform .15s ease; }
.save-events[open] > summary::before { transform: rotate(90deg); }
.save-events > summary span { display: inline-flex; align-items: center; justify-content: center; min-width: 21px; height: 21px; border-radius: 999px; background: #e2e8f0; color: #475569; font-size: 10px; }
.save-events ol { display: grid; gap: 0; margin: 0; padding: 0 20px 15px 31px; list-style: none; }
.save-event { position: relative; display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 9px; min-height: 48px; padding: 4px 0 9px; }
.save-event:not(:last-child)::before { content: ""; position: absolute; top: 15px; bottom: -4px; left: 6px; width: 1px; background: #d7dee8; }
.save-event-marker { z-index: 1; width: 9px; height: 9px; margin-top: 5px; border: 2px solid #fff; border-radius: 50%; background: #60a5fa; box-shadow: 0 0 0 1px #93c5fd; }
.save-event-error .save-event-marker, .save-event-cancelled .save-event-marker { background: #ef4444; box-shadow: 0 0 0 1px #fca5a5; }
.save-event-success .save-event-marker { background: #22c55e; box-shadow: 0 0 0 1px #86efac; }
.save-event-body { min-width: 0; }
.save-event-body > div { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.save-event-body strong { color: #334155; font-size: 12px; }
.save-event-body time { margin-left: auto; color: #94a3b8; font-size: 10px; }
.save-event-body code, .save-event-progress { padding: 2px 5px; border-radius: 5px; background: #eaf2ff; color: #2563eb; font-size: 10px; font-weight: 800; }
.save-event-body p { margin: 3px 0 0; color: #64748b; font-size: 11px; line-height: 1.4; overflow-wrap: anywhere; }
.save-events-empty { margin: 0; padding: 0 23px 16px; color: #94a3b8; font-size: 12px; }

@media (max-width: 760px) {
  .save-queue-header { align-items: flex-start; flex-direction: column; padding: 20px; }
  .save-queue-summary { grid-template-columns: 1fr; }
  .save-job-head, .save-job-foot { align-items: flex-start; flex-direction: column; }
  .save-job-meta { justify-content: flex-start; }
  .save-stage-line { align-items: flex-start; flex-wrap: wrap; }
  .save-current-article { margin-left: 0; }
  .save-progress-count { margin-left: auto; }
  .save-job-actions { justify-content: flex-start; }
  .save-event-body time { width: 100%; margin-left: 0; }
}

/* Stock page: fix article fill input alignment and keep right-side columns perfectly aligned */
details.stock-article-block > summary.stock-article-head {
  display: grid !important;
  grid-template-columns: 18px minmax(0, 1fr) 86px 72px !important;
  align-items: center !important;
  gap: 14px !important;
  flex-wrap: nowrap !important;
}

details.stock-article-block > summary.stock-article-head::before {
  margin: 0 !important;
  width: 18px;
  text-align: center;
  justify-self: center;
}

.stock-article-left {
  min-width: 0 !important;
  width: 100% !important;
}

.article-stock-actions {
  width: 86px !important;
  min-width: 86px !important;
  max-width: 86px !important;
  margin: 0 !important;
  justify-self: end !important;
}

.article-stock-value {
  display: block !important;
  width: 86px !important;
  min-width: 86px !important;
  max-width: 86px !important;
  height: 40px !important;
  min-height: 40px !important;
  margin: 0 !important;
  padding: 0 10px !important;
  box-sizing: border-box !important;
  border-radius: 12px !important;
  text-align: center !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  line-height: normal !important;
  appearance: textfield;
  -moz-appearance: textfield;
}

.article-stock-value::-webkit-outer-spin-button,
.article-stock-value::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.stock-article-head .stock-total-pill,
.stock-article-card-head .stock-group-total {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  justify-self: end !important;
  align-self: center !important;
  width: 72px !important;
  min-width: 72px !important;
  max-width: 72px !important;
  height: 40px !important;
  min-height: 40px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: #667085 !important;
  font-size: 16px !important;
  line-height: 1 !important;
  font-weight: 800 !important;
  text-align: center !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.stock-article-card-head {
  display: grid !important;
  grid-template-columns: 18px 44px minmax(0, 1fr) 86px 72px !important;
  align-items: center !important;
  gap: 14px !important;
}

.stock-article-card-head::before {
  margin: 0 !important;
  width: 18px;
  text-align: center;
  justify-self: center;
}

.stock-article-card-head .stock-group-media {
  width: 44px;
}

.stock-article-card-head .stock-group-img {
  width: 44px;
  height: 58px;
}

.stock-article-card-head .article-stock-actions,
.stock-article-card-head .stock-group-total {
  justify-self: end !important;
}

@media (max-width: 900px) {
  details.stock-article-block > summary.stock-article-head,
  .stock-article-card-head {
    grid-template-columns: 18px minmax(0, 1fr) 86px 72px !important;
  }

  .stock-article-card-head .stock-group-media {
    display: none !important;
  }
}
/* Stock page: do not show total amounts as big green badges */
.stock-group-total,
.stock-article-head .stock-total-pill,
.stock-article-card-head .stock-group-total {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  width: 72px !important;
  min-width: 72px !important;
  max-width: 72px !important;
  height: 40px !important;
  min-height: 40px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: #667085 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  font-size: 16px !important;
  line-height: 1 !important;
  font-weight: 800 !important;
  text-align: right !important;
}

/* Header-level bundle total should also be plain text, not a large badge */
details.stock-group > summary.stock-group-head > .stock-group-total {
  justify-self: end !important;
}


/* Stock page: clean layout after removing the top info blocks */
.stock-filter-card {
  padding: 20px 22px;
}

.stock-toolbar-card {
  padding: 18px 22px;
}

.stock-toolbar {
  margin: 0 !important;
  align-items: center !important;
}

.stock-toolbar h2 {
  margin: 0 !important;
  line-height: 1.2;
}

.stock-toolbar #stock-save-button {
  align-self: center;
}

.stock-filter-card .warehouse-note {
  margin-top: 14px;
}

.stock-group {
  padding-top: 0;
}

details.stock-group > summary.stock-group-head {
  align-items: center !important;
}

.stock-group-title {
  margin-bottom: 3px;
  line-height: 1.25;
}

.stock-group-meta {
  line-height: 1.35;
}

.stock-warehouse-cell {
  min-width: 150px;
  color: #344054;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.stock-last-change {
  color: #344054;
  font-weight: 850;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.stock-last-change-empty {
  color: #98a2b3;
  font-weight: 700;
}

.stock-article-change-date {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 900px) {
  .stock-toolbar {
    align-items: stretch !important;
  }

  .stock-toolbar #stock-save-button {
    width: 100%;
  }
}


/* Login page: fixed form alignment */
.login-card {
  max-width: 620px;
  margin: 8vh auto;
  padding: 34px;
}

.login-card h1 {
  margin-bottom: 22px;
}

.login-form {
  display: grid;
  gap: 16px;
}

.login-form label {
  display: grid;
  gap: 8px;
  font-size: 16px;
  color: var(--muted);
}

.login-form input[type="password"],
.login-form input[type="text"] {
  width: 100%;
  height: 54px;
  padding: 0 14px;
  border-radius: 14px;
  font-size: 18px;
  line-height: normal;
}

.login-submit {
  width: fit-content;
  min-width: 112px;
  height: 48px;
  padding: 0 24px;
  border-radius: 14px;
  font-size: 17px;
  align-self: start;
}

@media (max-width: 700px) {
  .login-card {
    max-width: none;
    margin: 24px 12px;
    padding: 24px;
  }
}


/* Stock page: top-level bundle pagination, 20 bundles per page */
.stock-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin: 0 0 14px;
}

.stock-pagination-bottom {
  margin: 14px 0 0;
}

.stock-pagination[hidden],
.stock-pagination-bottom[hidden] {
  display: none !important;
}

.stock-pagination-info {
  min-width: 180px;
  text-align: center;
  color: var(--muted);
  font-weight: 750;
}

.stock-pagination button {
  min-width: 42px;
  height: 36px;
  padding: 0 12px;
  font-size: 20px;
  line-height: 1;
}

.stock-pagination button:disabled {
  opacity: .45;
  cursor: default;
  filter: none;
}

@media (max-width: 700px) {
  .stock-pagination {
    justify-content: center;
  }
}


/* Stock page pagination: bottom-only centered plain numbers */
.stock-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.stock-pagination-bottom {
  margin: 18px 0 0;
}

.stock-pagination[hidden],
.stock-pagination-bottom[hidden] {
  display: none !important;
}

.stock-page-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
}

.stock-page-number:hover {
  color: var(--accent);
  background: transparent;
  filter: none;
}

.stock-page-number.active {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.stock-pagination-info {
  display: none !important;
}


/* Stock page: Excel-column filter field */
.stock-filter-form {
  grid-template-columns: minmax(260px, 1fr) minmax(320px, 1.25fr) minmax(260px, .9fr) minmax(220px, .75fr) auto auto;
}

.excel-filter-field textarea {
  width: 100%;
  min-height: 52px;
  max-height: 120px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  color: var(--text);
  padding: 9px 11px;
  outline: none;
  font: inherit;
  line-height: 1.35;
}

.excel-filter-field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}

@media (max-width: 1350px) {
  .stock-filter-form {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

@media (max-width: 900px) {
  .stock-filter-form {
    grid-template-columns: 1fr;
  }
}


/* Stock page: safe bulk edit for the filtered result */
.stock-bulk-edit-panel {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.stock-bulk-edit-title {
  font-weight: 850;
  color: var(--text);
  margin-right: 4px;
}

.stock-bulk-edit-value {
  width: 92px !important;
  min-width: 92px !important;
  max-width: 92px !important;
  height: 40px;
  padding: 0 10px;
  text-align: center;
  font-size: 16px;
  font-weight: 750;
  border-radius: 12px;
}

.stock-bulk-edit-note {
  font-size: 13px;
}

@media (max-width: 900px) {
  .stock-bulk-edit-panel {
    align-items: stretch;
  }

  .stock-bulk-edit-panel button {
    width: 100%;
  }
}





/* Stock page: selection checkboxes and toolbar select-all */
.stock-toolbar {
  align-items: center !important;
}

.stock-toolbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.stock-toolbar-left h2 {
  margin: 0 !important;
}

.stock-select-all-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 24px;
  min-width: 24px;
  height: 24px;
  cursor: pointer;
}

.stock-select-all-box.is-loading {
  cursor: wait;
}

.stock-select-all-box.is-loading input {
  opacity: 0;
}

.stock-select-all-box.is-loading::after {
  content: "";
  position: absolute;
  inset: 3px;
  border: 2px solid rgba(37, 99, 235, 0.22);
  border-top-color: #2563eb;
  border-radius: 50%;
  pointer-events: none;
  animation: stock-loading-spin 0.7s linear infinite;
}

.stock-select-all-box input,
.stock-select-col input,
.stock-select-box input {
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
}

.stock-select-col {
  width: 70px;
  min-width: 70px;
  text-align: center;
}

.stock-row-checks {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.stock-bulk-row-mark {
  accent-color: #7c3aed;
}

.stock-scope-checks {
  width: 48px;
  min-width: 48px;
  gap: 6px;
}

.stock-bulk-scope-mark {
  accent-color: #7c3aed;
}

.stock-size-row.stock-row-marked > .stock-select-col {
  background: #f5f3ff !important;
  box-shadow: inset 4px 0 #7c3aed;
}

.stock-select-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 28px;
  min-width: 28px;
  height: 28px;
  cursor: pointer;
}

.stock-select-box-brand.is-loading,
.stock-select-box-bundle.is-loading {
  cursor: wait;
}

.stock-select-box-brand.is-loading input,
.stock-select-box-bundle.is-loading input {
  opacity: 0;
}

.stock-select-box-brand.is-loading::after,
.stock-select-box-bundle.is-loading::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 2px solid rgba(37, 99, 235, 0.22);
  border-top-color: #2563eb;
  border-radius: 50%;
  pointer-events: none;
  animation: stock-loading-spin 0.7s linear infinite;
}

@keyframes stock-loading-spin {
  to {
    transform: rotate(360deg);
  }
}

details.stock-group > summary.stock-group-head {
  grid-template-columns: 18px 32px 72px minmax(0, 1fr) auto !important;
}

details.stock-article-block > summary.stock-article-head {
  grid-template-columns: 18px 32px minmax(0, 1fr) 86px 72px !important;
}

.stock-article-card-head {
  grid-template-columns: 18px 32px 44px minmax(0, 1fr) 86px 72px !important;
}

details.stock-group > summary.stock-group-head::before,
details.stock-article-block > summary.stock-article-head::before,
.stock-article-card-head::before {
  grid-column: 1;
}

@media (max-width: 900px) {
  .stock-toolbar {
    align-items: stretch !important;
  }

  .stock-toolbar-left {
    align-items: center;
  }

  details.stock-article-block > summary.stock-article-head,
  .stock-article-card-head {
    grid-template-columns: 18px 32px minmax(0, 1fr) 86px 72px !important;
  }

  .stock-article-card-head .stock-group-media {
    display: none !important;
  }
}


/* Stock page: brand → imtId → article grouping */
.stock-brand-group {
  overflow: hidden;
}

.stock-brand-head {
  display: grid;
  grid-template-columns: 18px 32px minmax(0, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  list-style: none;
  cursor: pointer;
  padding: 14px 18px;
  margin: 0;
  user-select: none;
}

.stock-brand-head::-webkit-details-marker {
  display: none;
}

.stock-brand-head::before {
  content: "▶";
  font-size: 14px;
  color: var(--muted);
  width: 18px;
  text-align: center;
  justify-self: center;
}

.stock-brand-group[open] > .stock-brand-head::before {
  content: "▼";
}

.stock-brand-title {
  font-size: 20px;
  font-weight: 900;
  color: var(--text);
  overflow-wrap: anywhere;
}

.stock-brand-meta {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
}

.stock-brand-group > .stock-group-body {
  border-top: 1px solid var(--line);
}

.stock-brand-group .stock-bundle {
  margin-bottom: 12px;
}

@media (max-width: 900px) {
  .stock-brand-head {
    grid-template-columns: 18px 32px minmax(0, 1fr) auto;
  }

  .stock-brand-meta {
    grid-column: 3 / -1;
    white-space: normal;
  }
}


/* Stock page: edit-selected modal */
.stock-toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.stock-bulk-edit-modal[hidden] {
  display: none !important;
}

.stock-bulk-edit-modal {
  position: fixed;
  inset: 0;
  z-index: 1900;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.stock-bulk-edit-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .38);
}

.stock-bulk-edit-dialog {
  position: relative;
  z-index: 1;
  width: min(460px, calc(100vw - 48px));
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, .22);
  overflow: hidden;
}

.stock-bulk-edit-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.stock-bulk-edit-head h2 {
  margin: 0 0 4px;
}

.stock-bulk-edit-body {
  padding: 18px 20px;
}

.stock-bulk-edit-modal-value {
  width: 130px !important;
  min-width: 130px !important;
  height: 44px;
  text-align: center;
  font-size: 18px;
  font-weight: 800;
}

.stock-bulk-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid var(--line);
  background: #f8fafc;
}

@media (max-width: 900px) {
  .stock-toolbar-actions {
    justify-content: stretch;
  }

  .stock-toolbar-actions button {
    width: 100%;
  }
}


/* Stock page: non-blocking floating edit panel for selected rows */
.stock-floating-edit[hidden] {
  display: none !important;
}

.stock-floating-edit {
  position: fixed;
  right: 24px;
  top: 84px;
  z-index: 1200;
  width: 360px;
  max-width: calc(100vw - 32px);
  pointer-events: none;
}

.stock-floating-edit-card {
  pointer-events: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 16px 46px rgba(15, 23, 42, .18);
  overflow: hidden;
}

.stock-floating-edit-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.stock-floating-edit-head h2 {
  margin: 0 0 3px;
  font-size: 18px;
}

.stock-floating-edit-body {
  padding: 14px 16px;
}

.stock-floating-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: #f8fafc;
}

.stock-floating-edit .stock-bulk-edit-modal-value {
  width: 110px !important;
  min-width: 110px !important;
  height: 42px;
  text-align: center;
  font-size: 17px;
  font-weight: 800;
}

@media (max-width: 700px) {
  .stock-floating-edit {
    left: 12px;
    right: 12px;
    top: auto;
    bottom: 12px;
    width: auto;
    max-width: none;
  }
}


/* Stock page: floating edit panel position + cancel clears selection */
.stock-floating-edit {
  top: auto !important;
  left: auto !important;
  right: 24px !important;
  bottom: 24px !important;
}

@media (max-width: 700px) {
  .stock-floating-edit {
    left: 12px !important;
    right: 12px !important;
    top: auto !important;
    bottom: 12px !important;
    width: auto !important;
    max-width: none !important;
  }
}


/* Stock page: Excel field compact by default, vertically resizable */
.excel-filter-field textarea {
  min-height: 42px !important;
  height: 42px;
  max-height: none !important;
  resize: vertical !important;
  overflow: auto !important;
  padding: 10px 11px !important;
  line-height: 20px !important;
}


/* Stock page: neat compact floating edit panel */
.stock-floating-edit {
  right: 22px !important;
  bottom: 22px !important;
  top: auto !important;
  left: auto !important;
  width: 390px !important;
  max-width: calc(100vw - 32px) !important;
}

.stock-floating-edit-card {
  border-radius: 18px !important;
  overflow: hidden;
}

.stock-floating-edit-head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 42px;
  align-items: center !important;
  gap: 12px !important;
  padding: 14px 16px !important;
}

.stock-floating-edit-head h2 {
  margin: 0 0 2px !important;
  font-size: 22px !important;
  line-height: 1.15 !important;
  letter-spacing: -0.02em;
}

.stock-floating-edit-head .muted {
  margin: 0 !important;
  font-size: 16px !important;
  line-height: 1.25 !important;
}

.stock-floating-edit-head .icon-button {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  border-radius: 12px !important;
  font-size: 28px !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
}

.stock-floating-edit-body {
  padding: 14px 16px !important;
}

.stock-floating-edit-grid {
  display: grid !important;
  gap: 10px !important;
}

.stock-floating-edit-field {
  display: grid !important;
  grid-template-columns: 1fr 132px;
  align-items: center !important;
  gap: 12px !important;
  margin: 0 !important;
}

.stock-floating-edit-note {
  margin: 2px 0 0 !important;
  font-size: 13px !important;
  line-height: 1.25 !important;
}

.stock-floating-edit-field span {
  font-size: 16px !important;
  line-height: 1.2 !important;
  color: var(--muted);
  font-weight: 750;
}

.stock-floating-edit .stock-bulk-edit-modal-value {
  width: 132px !important;
  min-width: 132px !important;
  max-width: 132px !important;
  height: 42px !important;
  padding: 0 10px !important;
  text-align: center !important;
  font-size: 18px !important;
  font-weight: 850 !important;
  border-radius: 13px !important;
}


.stock-floating-edit .stock-bulk-edit-modal-value.invalid {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, .14) !important;
}

.stock-floating-edit-actions {
  padding: 12px 16px !important;
  justify-content: flex-end !important;
}

.stock-floating-edit-actions button {
  min-width: 126px !important;
  height: 42px !important;
  border-radius: 13px !important;
  padding: 0 18px !important;
}

@media (max-width: 700px) {
  .stock-floating-edit {
    left: 12px !important;
    right: 12px !important;
    bottom: 12px !important;
    top: auto !important;
    width: auto !important;
    max-width: none !important;
  }

  .stock-floating-edit-field {
    grid-template-columns: 1fr 122px;
  }

  .stock-floating-edit .stock-bulk-edit-modal-value {
    width: 122px !important;
    min-width: 122px !important;
    max-width: 122px !important;
  }
}

/* Stock page: WB price controls on stock page */
.stock-table { min-width: 1380px; }
.price-cell { min-width: 126px; }
.price-cell .amount {
  width: 112px !important;
  min-width: 112px !important;
  text-align: center;
}
.price-result-cell { min-width: 118px; }
.tag.warning {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}
.article-price-actions {
  display: inline-grid !important;
  grid-template-columns: repeat(3, 96px) minmax(118px, auto) auto auto;
  align-items: end !important;
  justify-content: end !important;
  gap: 8px !important;
  justify-self: end !important;
  align-self: center !important;
  min-width: 550px;
  margin: 0 !important;
}
.article-price-field {
  display: grid !important;
  gap: 3px !important;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.1;
  min-width: 0;
}
.article-price-field span {
  white-space: nowrap;
  font-weight: 750;
}
.article-price-value {
  display: block !important;
  width: 96px !important;
  min-width: 96px !important;
  max-width: 96px !important;
  height: 38px !important;
  min-height: 38px !important;
  padding: 0 9px !important;
  border-radius: 12px !important;
  text-align: center !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  line-height: normal !important;
  appearance: textfield;
  -moz-appearance: textfield;
}
.article-price-value::-webkit-outer-spin-button,
.article-price-value::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.stock-amount-input::placeholder,
.article-stock-value::placeholder,
.article-price-value::placeholder {
  color: #98a2b3 !important;
  opacity: 1 !important;
  font-weight: 750 !important;
}

.article-price-value.invalid,
.price-change-input.invalid {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, .12) !important;
}
.article-price-result {
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  padding: 0 10px;
  border: 1px solid #dbe4f0;
  background: #f8fafc;
  border-radius: 999px;
  color: #344054;
  font-size: 12px;
  font-weight: 800;
  min-width: 112px;
}
.price-live-result.price-live-result-muted {
  color: #98a2b3 !important;
  background: #f9fafb !important;
  border-color: #e4e7ec !important;
  font-weight: 750 !important;
}
.price-live-result.price-live-result-dash {
  color: #667085 !important;
  background: #f8fafc !important;
  border-color: #dbe4f0 !important;
}
.price-result-cell.price-live-result-muted,
.price-result-cell.price-live-result-dash {
  background: transparent !important;
  border-color: transparent !important;
}
.article-price-actions .tag {
  height: 38px;
  align-self: end;
  white-space: nowrap;
}
.stock-toolbar-actions #stock-save-button,
.stock-toolbar-actions #stock-refresh-button,
.stock-toolbar-actions #stock-refresh-empty-button {
  white-space: nowrap;
}
details.stock-article-block > summary.stock-article-head {
  grid-template-columns: 18px 32px minmax(260px, 1fr) minmax(550px, auto) 86px 72px !important;
}
.stock-article-card-head {
  grid-template-columns: 18px 32px 44px minmax(260px, 1fr) minmax(550px, auto) 86px 72px !important;
}
.stock-article-card-head .article-price-actions {
  justify-self: end !important;
}
.price-confirm-dialog {
  width: min(1320px, calc(100vw - 56px));
}
.price-confirm-table { min-width: 1120px; }

@media (max-width: 1500px) {
  details.stock-article-block > summary.stock-article-head {
    grid-template-columns: 18px 32px minmax(0, 1fr) 86px 72px !important;
  }
  .stock-article-card-head {
    grid-template-columns: 18px 32px 44px minmax(0, 1fr) 86px 72px !important;
  }
  details.stock-article-block > summary.stock-article-head .article-price-actions {
    grid-column: 3 / -1;
    justify-self: stretch !important;
    justify-content: start !important;
    min-width: 0;
  }
  .stock-article-card-head .article-price-actions {
    grid-column: 4 / -1;
    justify-self: stretch !important;
    justify-content: start !important;
    min-width: 0;
  }
}

@media (max-width: 900px) {
  .article-price-actions {
    grid-template-columns: repeat(2, minmax(96px, 1fr));
    gap: 8px !important;
  }
  .article-price-field,
  .article-price-value,
  .article-price-result,
  .article-price-actions .tag {
    width: 100% !important;
    max-width: none !important;
  }
  details.stock-article-block > summary.stock-article-head,
  .stock-article-card-head {
    grid-template-columns: 18px 32px minmax(0, 1fr) 86px 72px !important;
  }
  .stock-article-card-head .stock-group-media {
    display: none !important;
  }
  .stock-article-card-head .article-price-actions,
  details.stock-article-block > summary.stock-article-head .article-price-actions {
    grid-column: 3 / -1 !important;
  }
}

/* Stock page: bulk edit inputs in one horizontal row + clear on close */
.stock-floating-edit {
  width: min(780px, calc(100vw - 44px)) !important;
}

.stock-floating-edit-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(118px, 1fr)) !important;
  align-items: end !important;
  gap: 10px !important;
}

.stock-floating-edit-field {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 6px !important;
  min-width: 0 !important;
}

.stock-floating-edit-field span {
  font-size: 13px !important;
  line-height: 1.1 !important;
  white-space: nowrap !important;
}

.stock-floating-edit .stock-bulk-edit-modal-value {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
}

.stock-floating-edit-note {
  grid-column: 1 / -1 !important;
  margin: 0 !important;
}

@media (max-width: 760px) {
  .stock-floating-edit-grid {
    grid-template-columns: repeat(2, minmax(120px, 1fr)) !important;
  }
}

@media (max-width: 460px) {
  .stock-floating-edit-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Stock page: unified save confirmation sections */
.stock-confirm-section {
  display: grid;
  gap: 12px;
  margin: 0 0 18px;
}
.stock-confirm-section:last-child { margin-bottom: 0; }
.stock-confirm-section-title {
  margin: 0;
  font-size: 18px;
  font-weight: 850;
  color: #111827;
}
.stock-confirm-section > .stock-confirm-warning {
  margin: 0;
}
.stock-confirm-section > .stock-confirm-table {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}


/* Stock page: mass edit final price preview */
.stock-floating-edit {
  width: min(920px, calc(100vw - 44px)) !important;
}

.stock-floating-edit-grid {
  grid-template-columns: repeat(5, minmax(112px, 1fr)) !important;
}

.stock-floating-edit-result-field {
  min-width: 0 !important;
}

.stock-bulk-price-result {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  height: 42px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 10px !important;
  border: 1px solid #dbe4f0 !important;
  border-radius: 13px !important;
  background: #f8fafc !important;
  text-align: center !important;
  font-size: 18px !important;
  font-weight: 850 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

@media (max-width: 900px) {
  .stock-floating-edit-grid {
    grid-template-columns: repeat(2, minmax(120px, 1fr)) !important;
  }
}

@media (max-width: 460px) {
  .stock-floating-edit-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Stock page: keep native select arrows centered and inside filter fields */
.stock-filter-form select {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  min-height: 52px !important;
  padding-right: 46px !important;
  line-height: 20px !important;
  background-color: #fff !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23172033' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 14px center !important;
  background-size: 18px 18px !important;
}

.stock-filter-form select::-ms-expand {
  display: none;
}

/* Stock page: top filter controls uniform size and equal field widths */
.stock-filter-form {
  grid-template-columns: repeat(4, minmax(0, 1fr)) max-content max-content !important;
  align-items: end !important;
}

.stock-filter-form > label {
  min-width: 0;
  display: grid;
  grid-template-rows: 22px 56px;
  gap: 6px;
  align-items: end;
}

.stock-filter-form input,
.stock-filter-form select,
.stock-filter-form textarea {
  box-sizing: border-box;
  width: 100%;
  height: 56px !important;
  min-height: 56px !important;
  line-height: 22px;
}

.stock-filter-form textarea {
  resize: vertical;
  overflow: auto;
}

.stock-filter-form button:not(.date-range-display),
.stock-filter-form .btn {
  box-sizing: border-box;
  min-height: 56px;
  height: 56px;
  padding-top: 0;
  padding-bottom: 0;
  align-self: end;
  white-space: nowrap;
}

@media (max-width: 1350px) {
  .stock-filter-form {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 700px) {
  .stock-filter-form {
    grid-template-columns: 1fr !important;
  }
}

/* Stock page: price changes are shown inside the same confirmation article block */
.stock-confirm-price-inline-table {
  min-width: 720px !important;
  border-bottom: 1px solid var(--line);
}
.stock-confirm-price-inline-table th {
  background: #fff7ed !important;
}
.stock-confirm-price-inline-table td {
  background: #fffaf3 !important;
}
.stock-confirm-price-inline-table tbody tr:hover td {
  background: #fff4e6 !important;
}
.stock-confirm-price-label {
  white-space: nowrap;
  font-weight: 900;
  color: #92400e;
}

button.is-loading {
  pointer-events: none;
  opacity: 0.82;
}
.stock-article-card-head,
details.stock-article-block > summary.stock-article-head {
  align-items: center !important;
  min-height: 82px !important;
}

.stock-article-left,
.stock-group-main {
  align-self: center !important;
}

.article-price-actions {
  grid-template-columns: repeat(3, 112px) 142px auto !important;
  align-items: end !important;
  justify-content: end !important;
  gap: 10px !important;
  min-width: 0 !important;
}

.article-price-field {
  grid-template-rows: 16px 44px !important;
  gap: 4px !important;
}

.article-price-field span {
  line-height: 16px !important;
}

.article-price-value,
.article-price-result,
.article-stock-value {
  height: 44px !important;
  min-height: 44px !important;
  border-radius: 14px !important;
  font-size: 16px !important;
  line-height: normal !important;
}

.article-price-value {
  width: 112px !important;
  min-width: 112px !important;
  max-width: 112px !important;
}

.article-price-result {
  width: 142px !important;
  min-width: 142px !important;
  max-width: 142px !important;
  align-self: end !important;
}

.article-stock-actions {
  width: 112px !important;
  min-width: 112px !important;
  max-width: 112px !important;
  align-self: end !important;
  justify-self: end !important;
}

.article-stock-value {
  width: 112px !important;
  min-width: 112px !important;
  max-width: 112px !important;
}

.stock-article-card-head {
  grid-template-columns: 18px 32px 44px minmax(260px, 1fr) minmax(508px, auto) 112px !important;
}

details.stock-article-block > summary.stock-article-head {
  grid-template-columns: 18px 32px minmax(260px, 1fr) minmax(508px, auto) 112px !important;
}

@media (max-width: 1500px) {
  .article-price-actions {
    justify-content: start !important;
  }

  details.stock-article-block > summary.stock-article-head {
    grid-template-columns: 18px 32px minmax(0, 1fr) 112px !important;
  }

  .stock-article-card-head {
    grid-template-columns: 18px 32px 44px minmax(0, 1fr) 112px !important;
  }

  details.stock-article-block > summary.stock-article-head .article-price-actions {
    grid-column: 3 / -1 !important;
  }

  .stock-article-card-head .article-price-actions {
    grid-column: 4 / -1 !important;
  }
}

@media (max-width: 900px) {
  .article-price-actions {
    grid-template-columns: repeat(2, minmax(112px, 1fr)) !important;
  }

  .article-price-value,
  .article-price-result,
  .article-stock-value {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  .article-stock-actions {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
  }
}

/* Stock page: aligned WB confirmation price rows */
.stock-confirm-table {
  table-layout: fixed !important;
}
.stock-confirm-price-inline-table,
.price-confirm-table {
  min-width: 1040px !important;
  table-layout: fixed !important;
}
.stock-confirm-price-inline-table th:empty,
.stock-confirm-price-inline-table td.stock-confirm-price-spacer {
  color: transparent !important;
}
.stock-confirm-price-inline-table td.stock-confirm-price-spacer {
  background: #fffaf3 !important;
}
.stock-confirm-price-inline-table .stock-confirm-old-value,
.stock-confirm-price-inline-table .stock-confirm-new-value,
.price-confirm-table .stock-confirm-old-value,
.price-confirm-table .stock-confirm-new-value {
  white-space: nowrap !important;
}

.warehouse-table th:last-child,
.warehouse-table td:last-child { width: 1%; white-space: nowrap; }
.warehouse-actions { display: flex; gap: 8px; align-items: center; justify-content: flex-end; }
.warehouse-actions .inline-form { display: inline-flex; align-items: center; gap: 0; flex-wrap: nowrap; }
.muted-table td { color: var(--muted); }

.warehouse-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.warehouse-page-head h2 { margin: 0; }
@media (max-width: 640px) {
  .warehouse-page-head { align-items: stretch; flex-direction: column; }
  .warehouse-page-head .secondary { text-align: center; }
}

/* Stock page: final layout cleanup for warehouse hiding move + bulk edit */
.warehouse-page-head .secondary,
.warehouse-page-head .btn {
  text-decoration: none !important;
  white-space: nowrap !important;
}

.warehouse-table th,
.warehouse-table td {
  vertical-align: middle !important;
}

.warehouse-table th:last-child,
.warehouse-table td:last-child {
  width: 120px !important;
  text-align: right !important;
}

/* Stock page: filter field text alignment */
.stock-filter-form {
  display: grid !important;
  grid-template-columns: minmax(190px, 1.05fr) minmax(220px, 1fr) minmax(220px, 1fr) minmax(210px, .95fr) minmax(210px, .9fr) max-content max-content !important;
  gap: 14px !important;
  align-items: end !important;
}

.stock-filter-form > label {
  min-width: 0 !important;
  display: grid !important;
  grid-template-rows: 22px 56px !important;
  gap: 6px !important;
  align-items: stretch !important;
  line-height: 22px !important;
}

.stock-filter-form input,
.stock-filter-form select,
.stock-filter-form textarea {
  box-sizing: border-box !important;
  width: 100% !important;
  height: 56px !important;
  min-height: 56px !important;
  margin: 0 !important;
  font-size: 16px !important;
  line-height: 24px !important;
  border-radius: 14px !important;
  border: 1px solid var(--line) !important;
}

.stock-filter-form input,
.stock-filter-form select {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  padding-left: 16px !important;
  padding-right: 44px !important;
  line-height: 54px !important;
}

.stock-filter-form input {
  padding-right: 16px !important;
}

.stock-filter-form textarea {
  resize: vertical !important;
  overflow: auto !important;
  padding: 15px 16px !important;
  line-height: 24px !important;
}

.stock-filter-form select {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  background-color: #fff !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23172033' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 14px center !important;
  background-size: 18px 18px !important;
}

.stock-filter-form select::-ms-expand {
  display: none !important;
}

.stock-filter-form button:not(.date-range-display),
.stock-filter-form .btn {
  align-self: end !important;
  box-sizing: border-box !important;
  height: 56px !important;
  min-height: 56px !important;
  padding: 0 18px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  white-space: nowrap !important;
}

.stock-toolbar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  margin-bottom: 0 !important;
}

.stock-toolbar-left {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  min-width: 0 !important;
}

.stock-toolbar-left h2 {
  margin: 0 !important;
  min-width: 0 !important;
  overflow-wrap: anywhere !important;
}

.stock-toolbar-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 10px !important;
  flex: 0 0 auto !important;
}

.stock-toolbar-actions button,
.stock-toolbar-actions .btn {
  min-height: 44px !important;
  height: 44px !important;
  padding: 0 18px !important;
  white-space: nowrap !important;
}

/* Stock page: compact bottom-right mass edit panel */
.stock-floating-edit {
  left: auto !important;
  right: 24px !important;
  bottom: 24px !important;
  top: auto !important;
  transform: none !important;
  width: min(700px, calc(100vw - 48px)) !important;
  max-width: calc(100vw - 48px) !important;
}

.stock-floating-edit-card {
  width: 100% !important;
  margin: 0 !important;
  border-radius: 18px !important;
  overflow: hidden !important;
}

.stock-floating-edit-head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 42px !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 14px 16px !important;
}

.stock-floating-edit-head h2 {
  margin: 0 0 2px !important;
  font-size: 20px !important;
  line-height: 1.15 !important;
}

.stock-floating-edit-head .muted {
  margin: 0 !important;
  font-size: 15px !important;
  line-height: 1.25 !important;
}

.stock-floating-edit-body {
  padding: 14px 16px !important;
}

.stock-floating-edit-grid {
  display: grid !important;
  grid-template-columns: 128px 108px 108px 156px 108px !important;
  justify-content: center !important;
  gap: 10px !important;
  align-items: end !important;
}

.stock-floating-edit-field,
.stock-floating-edit-result-field {
  min-width: 0 !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 6px !important;
}

.stock-floating-edit-field span {
  font-size: 13px !important;
  line-height: 1.1 !important;
  white-space: nowrap !important;
}

.stock-floating-edit .stock-bulk-edit-modal-value,
.stock-floating-edit .stock-bulk-price-result {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  height: 44px !important;
  min-height: 44px !important;
  box-sizing: border-box !important;
  font-size: 18px !important;
  border-radius: 14px !important;
}

.stock-floating-edit-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: flex-end !important;
  padding: 12px 16px !important;
}

.stock-floating-edit-actions button {
  min-width: 126px !important;
  height: 42px !important;
  min-height: 42px !important;
  padding: 0 18px !important;
  border-radius: 13px !important;
}

@media (max-width: 1400px) {
  .stock-filter-form {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .stock-filter-form button:not(.date-range-display),
  .stock-filter-form .btn {
    width: 100% !important;
  }
}

@media (max-width: 900px) {
  .stock-floating-edit-grid {
    grid-template-columns: repeat(2, minmax(120px, 1fr)) !important;
  }
}

@media (max-width: 820px) {
  .stock-filter-form {
    grid-template-columns: 1fr !important;
  }
  .stock-filter-form button:not(.date-range-display),
  .stock-filter-form .btn {
    width: 100% !important;
  }
  .stock-toolbar {
    align-items: stretch !important;
    flex-direction: column !important;
  }
  .stock-toolbar-actions {
    justify-content: stretch !important;
  }
  .stock-toolbar-actions button,
  .stock-toolbar-actions .btn {
    flex: 1 1 auto !important;
  }
}

@media (max-width: 700px) {
  .stock-floating-edit {
    left: 12px !important;
    right: 12px !important;
    bottom: 12px !important;
    width: auto !important;
    max-width: none !important;
  }
  .stock-floating-edit-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Keep the last metrics and pagination fully scrollable above mass editing. */
body.stock-bulk-edit-open .container {
  padding-bottom: max(24px, var(--stock-bulk-edit-page-space, 24px));
}

/* Stock page: non-blocking background task indicator */
.stock-background-save-indicator[hidden] { display: none !important; }
.stock-background-save-indicator {
  position: fixed;
  top: 74px;
  right: 18px;
  z-index: 80;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: min(560px, calc(100vw - 36px));
  padding: 11px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.97);
  color: var(--text);
  box-shadow: 0 14px 34px rgba(16,24,40,.18);
  font-weight: 700;
  line-height: 1.25;
}
.stock-background-save-indicator.is-running {
  border-color: rgba(37, 99, 235, .35);
  background: #eff6ff;
  color: #1e3a8a;
}
.stock-background-save-indicator.is-ok {
  border-color: rgba(22, 163, 74, .35);
  background: #ecfdf3;
  color: #14532d;
}
.stock-background-save-indicator.is-error {
  border-color: rgba(220, 38, 38, .35);
  background: #fff1f2;
  color: #7f1d1d;
}
.stock-background-save-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: currentColor;
}
.stock-background-save-indicator.is-running .stock-background-save-dot {
  animation: stock-background-save-pulse 0.9s ease-in-out infinite;
}
@keyframes stock-background-save-pulse {
  0%, 100% { opacity: .35; transform: scale(.86); }
  50% { opacity: 1; transform: scale(1.12); }
}
@media (max-width: 700px) {
  .stock-background-save-indicator {
    top: 92px;
    left: 10px;
    right: 10px;
    max-width: none;
  }
}

/* Stock page: FBO read-only balances alongside editable FBS balances */
.stock-table {
  min-width: 1480px;
}

.stock-fbo-cell {
  min-width: 112px;
  text-align: center;
}

.stock-fbo-value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: 86px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.stock-fbo-value-empty {
  border-color: #e4e7ec;
  background: #f8fafc;
  color: #98a2b3;
}

.stock-dual-total {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-height: 40px;
  white-space: nowrap;
  color: #475467;
  font-size: 14px;
  line-height: 1;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.stock-dual-total-fbo {
  color: #1d4ed8;
}

.stock-dual-total-fbs {
  color: #166534;
}

.stock-dual-total-separator {
  color: #98a2b3;
}

.stock-group-total.stock-dual-total {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  width: auto !important;
  min-width: 190px !important;
  max-width: none !important;
  height: 40px !important;
  min-height: 40px !important;
  padding: 0 !important;
  color: #475467 !important;
  font-size: 14px !important;
  line-height: 1 !important;
  text-align: right !important;
}

.stock-warehouse-total {
  min-width: 190px;
  padding: 0 14px;
  border: 1px solid #dbe4f0;
  border-radius: 14px;
  background: #f8fafc;
}

.article-fbo-total {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: end;
  justify-self: end;
  box-sizing: border-box;
  min-width: 105px;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 14px;
  line-height: 1;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.stock-article-card-head {
  grid-template-columns: 18px 32px 44px minmax(260px, 1fr) minmax(508px, auto) auto 112px !important;
}

details.stock-article-block > summary.stock-article-head {
  grid-template-columns: 18px 32px minmax(260px, 1fr) minmax(508px, auto) auto 112px !important;
}

@media (max-width: 1500px) {
  details.stock-article-block > summary.stock-article-head {
    grid-template-columns: 18px 32px minmax(0, 1fr) auto 112px !important;
  }

  .stock-article-card-head {
    grid-template-columns: 18px 32px 44px minmax(0, 1fr) auto 112px !important;
  }

  details.stock-article-block > summary.stock-article-head .article-price-actions {
    grid-column: 3 / -1 !important;
    grid-row: 2 !important;
  }

  details.stock-article-block > summary.stock-article-head .article-fbo-total {
    grid-column: 4 !important;
    grid-row: 1 !important;
  }

  details.stock-article-block > summary.stock-article-head .article-stock-actions {
    grid-column: 5 !important;
    grid-row: 1 !important;
  }

  .stock-article-card-head .article-price-actions {
    grid-column: 4 / -1 !important;
    grid-row: 2 !important;
  }

  .stock-article-card-head .article-fbo-total {
    grid-column: 5 !important;
    grid-row: 1 !important;
  }

  .stock-article-card-head .article-stock-actions {
    grid-column: 6 !important;
    grid-row: 1 !important;
  }
}

@media (max-width: 820px) {
  .stock-toolbar-actions {
    flex-wrap: wrap !important;
  }

  .stock-warehouse-total {
    width: 100%;
    justify-content: center;
  }
}

/* Stock page: FBO report positions without an active content card */
.stock-fbo-unlinked-group {
  overflow: hidden;
  border-color: #d0d5dd;
  background: #f8fafc;
}

.stock-fbo-unlinked-group > .stock-brand-head {
  background: #f8fafc;
}

.stock-fbo-unlinked-group[open] > .stock-brand-head::before {
  content: "▼";
}

.stock-fbo-unlinked-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  min-width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #e4e7ec;
  color: #667085;
  font-weight: 950;
}

.stock-unlinked-total {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 104px;
  min-height: 40px;
  color: #1d4ed8;
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.stock-fbo-unlinked-body {
  border-top: 1px solid #d0d5dd;
}

.stock-fbo-unlinked-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
}

.stock-fbo-unlinked-table th,
.stock-fbo-unlinked-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

.stock-fbo-unlinked-table th {
  background: #f2f4f7;
  color: #475467;
  font-size: 12px;
  font-weight: 850;
}

.stock-fbo-unlinked-table tbody tr:last-child td {
  border-bottom: 0;
}

@media (max-width: 900px) {
  .stock-fbo-unlinked-group > .stock-brand-head {
    grid-template-columns: 18px 32px minmax(0, 1fr) auto;
  }

  .stock-fbo-unlinked-group .stock-brand-meta {
    grid-column: 3 / -1;
    white-space: normal;
  }
}

/* Stock page: grouping by saved change batches */
.stock-batch-group {
  border-color: #c7d7fe;
}

.stock-batch-group.stock-batch-marked,
.stock-history-bundle.stock-batch-marked {
  border-color: #a78bfa;
  background: #fcfaff;
  box-shadow: 0 0 0 2px rgba(124, 58, 237, .13), 0 12px 30px rgba(76, 29, 149, .09);
}

.stock-batch-marked > .stock-group-head {
  background: linear-gradient(90deg, #f5f3ff 0%, #faf5ff 100%);
}

.stock-batch-marked-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border: 1px solid #c4b5fd;
  border-radius: 999px;
  background: #ede9fe;
  color: #6d28d9;
  font-size: 12px;
  font-weight: 800;
}

.stock-marked-empty {
  padding: 24px;
  color: #667085;
  text-align: center;
  font-weight: 750;
}

.stock-warehouse-batch-group {
  border-color: #a7d8ca;
  background: #fcfffe;
}

.stock-warehouse-batch-group > .stock-brand-head {
  background: #f0faf7;
}

.stock-warehouse-batch-group > .stock-group-body {
  background: #f8fbff;
}

.stock-batch-separator {
  color: #98a2b3;
  font-weight: 800;
}

.stock-batch-group .stock-group-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 7px;
}

.stock-batch-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}

.stock-batch-result {
  display: grid;
  gap: 3px;
  padding: 9px 15px;
  border-top: 1px solid #dbe4f0;
  background: #f8fafc;
  color: #475569;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.stock-batch-result small {
  color: inherit;
}

.stock-batch-result-success {
  background: #f0fdf4;
  color: #166534;
}

.stock-batch-result-partial {
  background: #fffbeb;
  color: #92400e;
}

.stock-batch-result-error {
  background: #fff1f2;
  color: #991b1b;
}

.stock-batch-result-running,
.stock-batch-result-queued {
  background: #eff6ff;
  color: #1d4ed8;
}

.stock-batch-date {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #93c5fd;
  border-radius: 10px;
  background: #dbeafe;
  color: #1e3a8a;
  font-size: 15px;
  line-height: 1;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.stock-batch-meta-part {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  white-space: nowrap;
}

/* Server-side pagination for journal and logs */
.server-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 20px;
}

.server-pagination a,
.server-pagination > span:not(.server-pagination-gap) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: #475467;
  font-weight: 800;
  text-decoration: none;
}

.server-pagination a:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

.server-pagination > span.active {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
}

.server-pagination-gap {
  padding: 0 3px;
  color: var(--muted);
  font-weight: 800;
}

/* Stock page opens with lightweight brand headers; full products load on brand expansion. */
.stock-lazy-placeholder h2 {
  margin: 0 0 8px;
}

.stock-brand-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.stock-brand-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font-weight: 750;
  text-decoration: none;
}

.stock-brand-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.stock-results-meta {
  margin: 4px 0 10px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.stock-brand-lazy-content:empty {
  display: none;
}

.stock-brand-load-error,
.stock-brand-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 82px;
  margin: 0;
  padding: 18px;
  color: var(--muted);
  font-weight: 750;
}

.stock-brand-load-error {
  color: #b42318;
}

.stock-brand-page-meta {
  padding: 10px 18px 18px;
  text-align: center;
  font-size: 13px;
}

.stock-draft-divider {
  width: 100%;
  height: 9px;
  margin: 18px 0;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #d0d5dd;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, .08);
}

/* Stock page: card parameter filters */
.stock-filter-form {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 16px !important;
}

.stock-filter-row {
  display: grid;
  gap: 14px;
  align-items: end;
}

.stock-filter-main-row {
  grid-template-columns: minmax(170px, .95fr) minmax(210px, 1.1fr) minmax(190px, .9fr) minmax(210px, 1.1fr) minmax(190px, .95fr) max-content;
}

.stock-filter-card-row {
  grid-template-columns:
    minmax(180px, 1.2fr)
    minmax(140px, .72fr)
    minmax(140px, .72fr)
    repeat(3, minmax(100px, .46fr))
    repeat(2, minmax(180px, .9fr));
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.stock-filter-bundle-row {
  grid-template-columns:
    repeat(4, minmax(150px, .55fr))
    minmax(240px, 1.15fr);
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.stock-filter-orders-field {
  position: relative;
  grid-column: auto;
  min-width: 0;
}

.stock-filter-category-field,
.stock-filter-color-field,
.stock-filter-size-field,
.stock-filter-orders-count-field {
  min-width: 0;
}

.stock-filter-orders-count-field input {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.stock-number-stepper {
  position: relative;
  min-width: 0;
  min-height: 56px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.stock-number-stepper:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.stock-filter-orders-count-field .stock-number-stepper input {
  position: absolute;
  z-index: 3;
  top: 0;
  bottom: 0;
  left: 30%;
  width: 40% !important;
  height: 54px;
  min-height: 54px;
  padding: 0 2px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  pointer-events: auto;
  cursor: text;
  appearance: textfield;
  -moz-appearance: textfield;
}

.stock-filter-orders-count-field .stock-number-stepper input::-webkit-inner-spin-button,
.stock-filter-orders-count-field .stock-number-stepper input::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
}

.stock-number-stepper-button {
  position: absolute;
  z-index: 2;
  top: 0;
  bottom: 0;
  width: 30% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 14px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #64748b !important;
  box-shadow: none !important;
  font-size: 25px !important;
  font-weight: 650 !important;
  line-height: 1 !important;
  cursor: pointer;
}

.stock-number-stepper-button:hover,
.stock-number-stepper-button:focus-visible {
  background: #f1f5f9 !important;
  color: var(--accent) !important;
  outline: none;
}

.stock-number-stepper-button.is-minus {
  left: 0;
  justify-content: flex-start !important;
}

.stock-number-stepper-button.is-plus {
  right: 0;
  justify-content: flex-end !important;
}

.stock-date-range-display {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  min-height: 56px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font-size: 15px;
  font-weight: 750;
  line-height: 1.2;
  user-select: none;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.stock-date-range-display:hover,
.stock-date-range-display:focus,
.stock-date-range-display.active {
  border-color: var(--accent);
  background: #f8fbff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
  outline: none;
}

.stock-flatpickr-input-helper {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  padding: 0 !important;
  opacity: 0;
  pointer-events: none;
}

.flatpickr-calendar {
  z-index: 10050 !important;
  border: 1px solid #d9e2ef;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(24, 34, 48, .18);
  overflow: hidden;
}

.flatpickr-months {
  padding-top: 7px;
}

.flatpickr-current-month,
.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month input.cur-year,
span.flatpickr-weekday,
.flatpickr-day {
  color: var(--text);
  font-weight: 650;
}

.flatpickr-months .flatpickr-prev-month svg,
.flatpickr-months .flatpickr-next-month svg {
  fill: var(--text);
}

.flatpickr-day.today {
  border-color: var(--accent);
  color: #1d4ed8;
}

.flatpickr-day.inRange,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.flatpickr-day.inRange {
  box-shadow: -5px 0 0 var(--accent), 5px 0 0 var(--accent);
}

.flatpickr-day:not(.selected):not(.startRange):not(.endRange):not(.inRange):hover,
.flatpickr-day:not(.selected):not(.startRange):not(.endRange):not(.inRange):focus {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.stock-orders-total {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-sizing: border-box;
  min-width: 296px;
  height: 44px;
  padding: 0 10px;
  border: 1px solid #ddd6fe;
  border-radius: 14px;
  background: #f5f3ff;
  color: #6d28d9;
  font-size: 13px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  vertical-align: middle;
}

.stock-orders-total b {
  color: #8b5cf6;
}

.stock-orders-total-main,
.stock-orders-total-event {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.stock-orders-total-event {
  padding-left: 8px;
  border-left: 1px solid #ddd6fe;
}

.stock-group-orders-total {
  width: 296px;
  min-width: 296px;
  justify-self: end;
}

details.stock-group > summary.stock-group-head.stock-orders-head {
  grid-template-columns: 18px 32px 72px minmax(0, 1fr) 220px 296px !important;
}

.stock-brand-head.stock-orders-head {
  grid-template-columns: 18px 32px minmax(240px, 1fr) minmax(0, 650px) 220px 296px;
}

.stock-brand-head.stock-orders-head > .stock-brand-title,
.stock-brand-head.stock-orders-head > .stock-brand-meta {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stock-brand-head.stock-orders-head > .stock-brand-meta {
  text-align: right;
}

.stock-brand-head.stock-orders-head > .stock-group-total,
details.stock-group > summary.stock-group-head.stock-orders-head > .stock-group-total {
  width: 220px !important;
  min-width: 220px !important;
  justify-self: end !important;
}

.stock-filter-form .stock-filter-row > label,
.stock-filter-form .stock-filter-row > .stock-filter-control-field {
  min-width: 0 !important;
  display: grid !important;
  grid-template-rows: 22px 56px !important;
  gap: 6px !important;
  align-items: stretch !important;
  line-height: 22px !important;
}

.stock-filter-control-field > label {
  min-width: 0;
}

.stock-filter-actions {
  display: flex;
  gap: 10px;
  align-items: end;
}

.stock-filter-actions > * {
  width: auto !important;
}

@media (max-width: 1250px) {
  .stock-filter-main-row,
  .stock-filter-card-row,
  .stock-filter-bundle-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stock-filter-actions {
    grid-column: 1 / -1;
  }

  .stock-filter-orders-field {
    grid-column: span 2;
  }
}

@media (max-width: 700px) {
  .stock-filter-main-row,
  .stock-filter-card-row,
  .stock-filter-bundle-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .stock-filter-actions {
    grid-column: auto;
  }

  .stock-filter-orders-field {
    grid-column: auto;
  }

  .stock-filter-actions > * {
    width: 100% !important;
    flex: 1 1 0;
  }
}

/* Stock page: definitive article header placement. Keep every editor control in its grid cell. */
.stock-article-card-head {
  grid-template-columns: 18px 32px 44px minmax(220px, 1fr) minmax(508px, auto) 112px 105px 296px !important;
  grid-auto-flow: row !important;
}

.stock-article-card-head::before {
  grid-column: 1 !important;
  grid-row: 1 !important;
}

.stock-article-card-head > .stock-select-box-article {
  grid-column: 2 !important;
  grid-row: 1 !important;
}

.stock-article-card-head > .stock-group-media {
  grid-column: 3 !important;
  grid-row: 1 !important;
}

.stock-article-card-head > .stock-group-main {
  grid-column: 4 !important;
  grid-row: 1 !important;
}

.stock-article-card-head > .article-price-actions {
  grid-column: 5 !important;
  grid-row: 1 !important;
}

.stock-article-card-head > .article-orders-total {
  grid-column: 8 !important;
  grid-row: 1 !important;
}

.stock-article-card-head > .article-fbo-total {
  grid-column: 7 !important;
  grid-row: 1 !important;
}

.stock-article-card-head > .article-stock-actions {
  grid-column: 6 !important;
  grid-row: 1 !important;
}

details.stock-article-block > summary.stock-article-head {
  grid-template-columns: 18px 32px minmax(220px, 1fr) minmax(508px, auto) 112px 105px 296px !important;
  grid-auto-flow: row !important;
}

details.stock-article-block > summary.stock-article-head::before {
  grid-column: 1 !important;
  grid-row: 1 !important;
}

details.stock-article-block > summary.stock-article-head > .stock-select-box-article {
  grid-column: 2 !important;
  grid-row: 1 !important;
}

details.stock-article-block > summary.stock-article-head > .stock-article-left {
  grid-column: 3 !important;
  grid-row: 1 !important;
}

details.stock-article-block > summary.stock-article-head > .article-price-actions {
  grid-column: 4 !important;
  grid-row: 1 !important;
}

details.stock-article-block > summary.stock-article-head > .article-orders-total {
  grid-column: 7 !important;
  grid-row: 1 !important;
}

details.stock-article-block > summary.stock-article-head > .article-fbo-total {
  grid-column: 6 !important;
  grid-row: 1 !important;
}

details.stock-article-block > summary.stock-article-head > .article-stock-actions {
  grid-column: 5 !important;
  grid-row: 1 !important;
}

.stock-article-card-head > .article-orders-total,
details.stock-article-block > summary.stock-article-head > .article-orders-total {
  min-width: 296px;
  height: 44px;
  align-self: end;
  justify-content: center;
  justify-self: end;
  padding: 0 10px;
  font-size: 13px;
}

@media (max-width: 1500px) {
  .stock-article-card-head {
    grid-template-columns: 18px 32px 44px minmax(0, 1fr) 112px 105px 296px !important;
  }

  .stock-article-card-head > .article-price-actions {
    grid-column: 4 / -1 !important;
    grid-row: 2 !important;
  }

  .stock-article-card-head > .article-orders-total {
    grid-column: 7 !important;
    grid-row: 1 !important;
  }

  .stock-article-card-head > .article-fbo-total {
    grid-column: 6 !important;
    grid-row: 1 !important;
  }

  .stock-article-card-head > .article-stock-actions {
    grid-column: 5 !important;
    grid-row: 1 !important;
  }

  details.stock-article-block > summary.stock-article-head {
    grid-template-columns: 18px 32px minmax(0, 1fr) 112px 105px 296px !important;
  }

  details.stock-article-block > summary.stock-article-head > .article-price-actions {
    grid-column: 3 / -1 !important;
    grid-row: 2 !important;
  }

  details.stock-article-block > summary.stock-article-head > .article-orders-total {
    grid-column: 6 !important;
    grid-row: 1 !important;
  }

  details.stock-article-block > summary.stock-article-head > .article-fbo-total {
    grid-column: 5 !important;
    grid-row: 1 !important;
  }

  details.stock-article-block > summary.stock-article-head > .article-stock-actions {
    grid-column: 4 !important;
    grid-row: 1 !important;
  }
}

@media (max-width: 1350px) {
  .stock-brand-head.stock-orders-head {
    grid-template-columns: 18px 32px minmax(0, 1fr) 220px 296px;
  }

  .stock-brand-head.stock-orders-head > .stock-brand-title {
    grid-column: 3 !important;
    grid-row: 1 !important;
  }

  .stock-brand-head.stock-orders-head > .stock-brand-meta {
    grid-column: 3 / -1 !important;
    grid-row: 2 !important;
    text-align: left;
  }

  .stock-brand-head.stock-orders-head > .stock-group-orders-total {
    grid-column: 5 !important;
    grid-row: 1 !important;
  }

  .stock-brand-head.stock-orders-head > .stock-group-total {
    grid-column: 4 !important;
    grid-row: 1 !important;
  }
}

@media (max-width: 900px) {
  details.stock-group > summary.stock-group-head.stock-orders-head {
    grid-template-columns: 18px 32px minmax(0, 1fr) 220px 296px !important;
  }

  details.stock-group > summary.stock-group-head.stock-orders-head > .stock-group-media {
    display: none !important;
  }

  details.stock-group > summary.stock-group-head.stock-orders-head > .stock-group-main {
    grid-column: 3 !important;
    grid-row: 1 !important;
  }

  details.stock-group > summary.stock-group-head.stock-orders-head > .stock-group-orders-total {
    grid-column: 5 !important;
    grid-row: 1 !important;
  }

  details.stock-group > summary.stock-group-head.stock-orders-head > .stock-group-total {
    grid-column: 4 !important;
    grid-row: 1 !important;
  }

  .stock-brand-head.stock-orders-head {
    grid-template-columns: 18px 32px minmax(0, 1fr) 220px 296px;
  }

  .stock-brand-head.stock-orders-head > .stock-brand-title {
    grid-column: 3 !important;
    grid-row: 1 !important;
  }

  .stock-brand-head.stock-orders-head > .stock-brand-meta {
    grid-column: 3 / -1 !important;
    grid-row: 2 !important;
  }

  .stock-brand-head.stock-orders-head > .stock-group-orders-total {
    grid-column: 5 !important;
    grid-row: 1 !important;
  }

  .stock-brand-head.stock-orders-head > .stock-group-total {
    grid-column: 4 !important;
    grid-row: 1 !important;
  }
}

@media (max-width: 650px) {
  details.stock-group > summary.stock-group-head.stock-orders-head,
  .stock-brand-head.stock-orders-head {
    grid-template-columns: 18px 32px minmax(0, 1fr) !important;
  }

  details.stock-group > summary.stock-group-head.stock-orders-head > .stock-group-total,
  .stock-brand-head.stock-orders-head > .stock-group-total {
    grid-column: 3 !important;
    grid-row: 3 !important;
  }

  details.stock-group > summary.stock-group-head.stock-orders-head > .stock-group-orders-total,
  .stock-brand-head.stock-orders-head > .stock-group-orders-total {
    grid-column: 3 !important;
    grid-row: 4 !important;
    width: min(100%, 296px);
    min-width: 0;
    justify-self: end;
  }
}

/* Group selection has two controls: select and mark for a separate batch. */
details.stock-group > summary.stock-group-head.stock-orders-head.stock-scope-mark-head {
  grid-template-columns: 18px 44px 72px minmax(0, 1fr) 220px 296px !important;
}

.stock-brand-head.stock-orders-head.stock-scope-mark-head {
  grid-template-columns: 18px 44px minmax(240px, 1fr) minmax(0, 650px) 220px 296px;
}

.stock-article-card-head.stock-scope-mark-head {
  grid-template-columns: 18px 48px 44px minmax(220px, 1fr) minmax(508px, auto) 112px 105px 296px !important;
}

details.stock-article-block > summary.stock-article-head.stock-scope-mark-head {
  grid-template-columns: 18px 48px minmax(220px, 1fr) minmax(508px, auto) 112px 105px 296px !important;
}

@media (max-width: 1500px) {
  .stock-article-card-head.stock-scope-mark-head {
    grid-template-columns: 18px 48px 44px minmax(0, 1fr) 112px 105px 296px !important;
  }

  details.stock-article-block > summary.stock-article-head.stock-scope-mark-head {
    grid-template-columns: 18px 48px minmax(0, 1fr) 112px 105px 296px !important;
  }
}

@media (max-width: 1350px) {
  .stock-brand-head.stock-orders-head.stock-scope-mark-head {
    grid-template-columns: 18px 44px minmax(0, 1fr) 220px 296px;
  }
}

@media (max-width: 900px) {
  details.stock-group > summary.stock-group-head.stock-orders-head.stock-scope-mark-head,
  .stock-brand-head.stock-orders-head.stock-scope-mark-head {
    grid-template-columns: 18px 44px minmax(0, 1fr) 220px 296px !important;
  }
}

@media (max-width: 650px) {
  details.stock-group > summary.stock-group-head.stock-orders-head.stock-scope-mark-head,
  .stock-brand-head.stock-orders-head.stock-scope-mark-head {
    grid-template-columns: 18px 44px minmax(0, 1fr) !important;
  }
}

/* Final compact article editors: keep FBO and all order metrics visible. */
.article-price-actions {
  grid-template-columns: 88px 74px 74px 118px auto !important;
  gap: 6px !important;
  min-width: 0 !important;
}

.article-price-field:nth-child(1) .article-price-value {
  width: 88px !important;
  min-width: 88px !important;
  max-width: 88px !important;
}

.article-price-field:nth-child(2) .article-price-value,
.article-price-field:nth-child(3) .article-price-value {
  width: 74px !important;
  min-width: 74px !important;
  max-width: 74px !important;
  padding-inline: 6px !important;
}

.article-price-result {
  width: 118px !important;
  min-width: 118px !important;
  max-width: 118px !important;
  padding-inline: 7px !important;
  font-size: 14px !important;
}

.article-stock-actions,
.article-stock-value {
  width: 84px !important;
  min-width: 84px !important;
  max-width: 84px !important;
}

.article-stock-value {
  padding-inline: 7px !important;
  font-size: 14px !important;
}

.article-fbo-total {
  width: 90px !important;
  min-width: 90px !important;
  padding-inline: 8px !important;
}

.stock-article-card-head.stock-scope-mark-head {
  grid-template-columns: 18px 44px 44px minmax(220px, 1fr) minmax(380px, auto) 84px 90px 296px !important;
}

details.stock-article-block > summary.stock-article-head.stock-scope-mark-head {
  grid-template-columns: 18px 44px minmax(220px, 1fr) minmax(380px, auto) 84px 90px 296px !important;
}

/* Native-size select/mark controls on brand, bundle, and article headers. */
.stock-scope-checks {
  width: 44px !important;
  min-width: 44px !important;
  height: 28px !important;
  gap: 8px !important;
  align-items: center !important;
  justify-content: center !important;
  align-self: center !important;
}

.stock-scope-checks input {
  width: 18px !important;
  min-width: 18px !important;
  height: 18px !important;
  margin: 0 !important;
  flex: 0 0 18px !important;
}

.stock-scope-checks.stock-select-box-brand.is-loading::after,
.stock-scope-checks.stock-select-box-bundle.is-loading::after {
  inset: auto !important;
  top: 5px !important;
  left: 0 !important;
  width: 18px !important;
  height: 18px !important;
  box-sizing: border-box;
}

details.stock-group.stock-scope-marked,
details.stock-brand-group.stock-scope-marked,
details.stock-article-block.stock-scope-marked {
  border-color: #c4b5fd !important;
}

details.stock-group.stock-scope-marked > summary.stock-group-head,
details.stock-brand-group.stock-scope-marked > summary.stock-brand-head,
details.stock-article-block.stock-scope-marked > summary.stock-article-head {
  background: #f5f3ff !important;
  box-shadow: inset 5px 0 #7c3aed !important;
}

/* The mass editor stays compact, but its placeholder must remain readable. */
.stock-floating-edit .stock-bulk-edit-modal-value {
  padding-inline: 4px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
}

.stock-floating-edit .stock-bulk-edit-modal-value::placeholder {
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
}

.stock-floating-edit .stock-bulk-price-result {
  font-size: 15px !important;
  line-height: 1 !important;
}

@media (max-width: 1500px) {
  .stock-article-card-head.stock-scope-mark-head {
    grid-template-columns: 18px 44px 44px minmax(0, 1fr) 84px 90px 296px !important;
  }

  details.stock-article-block > summary.stock-article-head.stock-scope-mark-head {
    grid-template-columns: 18px 44px minmax(0, 1fr) 84px 90px 296px !important;
  }
}

@media (max-width: 900px) {
  .article-price-actions {
    grid-template-columns: repeat(2, minmax(100px, 1fr)) !important;
  }

  .article-price-field .article-price-value,
  .article-price-result,
  .article-stock-actions,
  .article-stock-value {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
  }
}

