/* Regional replenishment: a quiet overview, with detail available on demand. */
.rm-shell {
  --rm-ink: #203a34;
  --rm-muted: #687b6e;
  --rm-line: #e5ebe6;
  --rm-green: #245c4c;
  --rm-green-soft: #edf4ef;
  --rm-orange: #af622e;
  --rm-orange-soft: #fbf1e8;
  --rm-red: #a7473b;
  box-sizing: border-box;
  width: 100%;
  max-width: 1440px;
  min-height: 620px;
  margin: 0 auto;
  padding: 28px;
  background: #f5f7f4;
  color: var(--rm-ink);
  font-size: 14px;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
.rm-shell *, .rm-shell *::before, .rm-shell *::after { box-sizing: border-box; }
.rm-shell h2, .rm-shell h3, .rm-shell h4, .rm-shell p { margin: 0; }
.rm-shell h2 { font-size: 27px; line-height: 1.35; font-weight: 650; letter-spacing: -.6px; }
.rm-shell h3 { font-size: 21px; line-height: 1.45; font-weight: 650; }
.rm-shell h4 { font-size: 15px; line-height: 1.5; font-weight: 650; }
.rm-shell p { color: #687b6e; }
.rm-shell small { font-size: 12px; line-height: 1.5; }
.rm-shell svg { display: inline-block; width: 19px; height: 19px; vertical-align: middle; flex-shrink: 0; }
.rm-shell button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  margin: 0;
  padding: 8px 13px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  color: var(--rm-ink);
  font: inherit;
  font-size: 13px;
  font-weight: 550;
  line-height: 1.4;
  white-space: nowrap;
  cursor: pointer;
}
.rm-shell button:hover { background: #eef2ed; }
.rm-shell button:disabled { opacity: .46; cursor: not-allowed; }
.rm-shell button:focus-visible,
.rm-shell input:focus-visible,
.rm-shell select:focus-visible,
.rm-shell textarea:focus-visible,
.rm-shell summary:focus-visible {
  outline: 3px solid #95baaa;
  outline-offset: 3px;
}
.rm-shell .rm-primary { background: var(--rm-green); border-color: var(--rm-green); color: #fff; }
.rm-shell .rm-primary:hover { background: #194b3d; border-color: #194b3d; }
.rm-shell .rm-secondary { border-color: #dce4dd; background: #fff; }
.rm-shell .rm-secondary:hover { border-color: #bfcfc3; background: #f4f7f3; }
.rm-shell .rm-link { min-height: 32px; padding: 5px 8px; color: var(--rm-green); }
.rm-shell .rm-danger { color: var(--rm-red); }
.rm-shell .rm-danger:hover { background: #fcf0ed; }
.rm-shell .rm-icon-button { width: 38px; min-width: 38px; padding: 8px; }
.rm-shell .rm-muted { color: var(--rm-muted); }
.rm-shell .rm-tone-danger { color: var(--rm-red); }
.rm-shell .rm-tone-warm { color: var(--rm-orange); }
.rm-shell .rm-num { font-size: 18px; font-weight: 650; letter-spacing: -.2px; line-height: 1.4; }
.rm-shell .rm-header { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 25px; }
.rm-shell .rm-eyebrow { display: block; margin-bottom: 6px; color: #6c8475; font-size: 10px; line-height: 1.5; font-weight: 650; letter-spacing: 2px; }
.rm-shell .rm-header h2 + p { margin-top: 8px; font-size: 13px; }
.rm-shell .rm-header-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 12px; flex-shrink: 0; }
.rm-shell .rm-regions { display: inline-flex; align-items: center; gap: 4px; padding: 4px; background: #e9eee7; border-radius: 10px; }
.rm-shell .rm-regions button { min-width: 74px; min-height: 34px; padding: 7px 17px; color: #79877e; }
.rm-shell .rm-regions button[aria-pressed="true"] { background: #fff; color: var(--rm-green); box-shadow: 0 1px 4px #203a3410; }
.rm-shell .rm-message { margin: 0 0 18px; padding: 12px 15px; border: 1px solid #dfe9df; border-radius: 9px; background: #edf4ee; color: #42624f; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.rm-shell .rm-message:empty, .rm-shell .rm-message[hidden] { display: none; }
.rm-shell .rm-error { border-color: #efd8d1; background: #fdf2ef; color: #a24637; }
.rm-shell .rm-success { border-color: #d9e8dc; background: #edf5ee; color: #386d4b; }
.rm-shell .rm-loading { border-color: #e0e7e2; background: #f0f4f0; color: #677f6c; }
.rm-shell .rm-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 24px; }
.rm-shell button.rm-stat { display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 0; min-width: 0; padding: 18px 20px 17px; border: 1px solid var(--rm-line); border-radius: 12px; background: #fff; text-align: left; white-space: normal; }
.rm-shell button.rm-stat:hover { border-color: #b6cabb; background: #fbfdfb; }
.rm-shell button.rm-stat[aria-pressed="true"] { border-color: #6b9480; background: #f9fcf9; box-shadow: inset 0 0 0 1px #6b948020; }
.rm-shell .rm-stat-top { display: flex; align-items: center; gap: 8px; color: #66796d; font-size: 12px; font-weight: 500; }
.rm-shell .rm-stat strong { margin-top: 10px; color: var(--rm-ink); font-size: 30px; font-weight: 650; line-height: 1.2; letter-spacing: -.8px; }
.rm-shell .rm-stat small { margin-top: 7px; color: #7e8b80; font-size: 12px; font-weight: 400; }
.rm-shell .rm-dot { width: 7px; height: 7px; border-radius: 50%; background: #7b9485; }
.rm-shell .rm-dot.is-needs { background: #c7834c; }
.rm-shell .rm-dot.is-missing { background: #9c8a70; }
.rm-shell .rm-dot.is-pending { background: #6e92a2; }
.rm-shell .rm-dot.is-all { background: #4d7860; }
.rm-shell .rm-content { overflow: hidden; border: 1px solid var(--rm-line); border-radius: 13px; background: #fff; }
.rm-shell .rm-tabs { display: flex; align-items: stretch; gap: 25px; padding: 0 24px; border-bottom: 1px solid var(--rm-line); overflow-x: auto; scrollbar-width: thin; }
.rm-shell .rm-tabs button { position: relative; min-height: 58px; padding: 17px 0 16px; border: 0; border-radius: 0; color: #839087; font-size: 14px; font-weight: 500; }
.rm-shell .rm-tabs button:hover { background: transparent; color: var(--rm-green); }
.rm-shell .rm-tabs button[aria-pressed="true"] { color: var(--rm-green); font-weight: 650; }
.rm-shell .rm-tabs button[aria-pressed="true"]::after { position: absolute; right: 0; bottom: 0; left: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--rm-green); content: ""; }
.rm-shell .rm-toolbar { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 16px; padding: 20px 24px 12px; }
.rm-shell .rm-toolbar-filters { display: flex; align-items: flex-end; flex: 1; min-width: min(100%, 410px); gap: 12px; }
.rm-shell .rm-series-filter { display: flex; flex-direction: column; gap: 5px; width: 210px; min-width: 0; color: var(--rm-muted); font-size: 11px; }
.rm-shell .rm-series-filter > select { width: 100%; min-width: 0; max-width: 100%; text-overflow: ellipsis; }
.rm-shell .rm-series-error { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 16px 24px 0; padding: 10px 13px; border-radius: 7px; background: #fff7ed; color: #976e3d; font-size: 12px; }
.rm-shell .rm-series-error > span { flex: 1; min-width: 160px; overflow-wrap: anywhere; }
.rm-shell .rm-series-error > button { min-height: 28px; padding: 4px 7px; }
.rm-shell .rm-toolbar-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.rm-shell .rm-search { position: relative; display: flex; align-items: center; flex: 1; max-width: 340px; min-width: 150px; }
.rm-shell .rm-search > svg { position: absolute; left: 12px; width: 17px; height: 17px; color: #91a094; pointer-events: none; }
.rm-shell .rm-search input { width: 100%; padding-left: 38px; background: #fafbf9; }
.rm-shell input, .rm-shell select, .rm-shell textarea { width: 100%; min-width: 0; min-height: 40px; margin: 0; padding: 9px 11px; border: 1px solid #dce4dc; border-radius: 7px; background: #fff; box-shadow: none; color: var(--rm-ink); font: inherit; font-size: 13px; line-height: 1.5; }
.rm-shell input::placeholder, .rm-shell textarea::placeholder { color: #9aa69c; opacity: 1; }
.rm-shell input:focus, .rm-shell select:focus, .rm-shell textarea:focus { border-color: #7eaa92; }
.rm-shell input:disabled, .rm-shell select:disabled, .rm-shell textarea:disabled { background: #f5f7f3; color: #7a897d; }
.rm-shell input[type="checkbox"] { width: 16px; min-height: 16px; height: 16px; accent-color: var(--rm-green); }
.rm-shell textarea { min-height: 76px; resize: vertical; }
.rm-shell .rm-toolbar select { width: auto; min-width: 115px; min-height: 38px; padding: 8px 28px 8px 11px; background: #fff; }
.rm-shell .rm-context { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 0 24px 16px; color: #687b6e; font-size: 12px; }
.rm-shell .rm-context small { font-size: inherit; }
.rm-shell .rm-context time { white-space: nowrap; }
.rm-shell .rm-scroll { width: 100%; overflow: auto; overscroll-behavior-x: contain; }
.rm-shell table { width: 100%; border: 0; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.rm-shell th { padding: 13px 18px; border-top: 1px solid #eff2ed; border-bottom: 1px solid #edf1eb; background: #f7f9f5; color: #687b6e; font-size: 12px; font-weight: 500; text-align: left; white-space: nowrap; }
.rm-shell td { padding: 20px 18px; border-bottom: 1px solid #edf1eb; background: #fff; color: #43584a; vertical-align: middle; line-height: 1.5; }
.rm-shell tr:last-child td { border-bottom: 0; }
.rm-shell tbody tr:hover td { background: #fcfdfb; }
.rm-shell th:first-child, .rm-shell td:first-child { padding-left: 24px; }
.rm-shell th:last-child, .rm-shell td:last-child { padding-right: 24px; }
.rm-shell td:last-child { white-space: nowrap; }
.rm-shell td:first-child { width: 29%; }
.rm-shell .rm-product { width: auto; min-width: 185px; max-width: 350px; overflow-wrap: anywhere; }
.rm-shell .rm-product strong { display: block; margin-bottom: 5px; color: #2f493b; font-size: 14px; font-weight: 600; line-height: 1.45; }
.rm-shell .rm-product small { display: block; color: #687b6e; font-size: 12px; line-height: 1.6; }
.rm-shell td > small, .rm-shell .rm-cell-value > small, .rm-shell .rm-cell-value > span > small { display: block; margin-top: 4px; color: #687b6e; font-size: 11px; }
.rm-shell .rm-cell-value { min-width: 0; }
.rm-shell .rm-badge { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 24px; padding: 3px 8px; border-radius: 5px; background: #eef4ef; color: #517d5b; font-size: 12px; line-height: 1.5; font-weight: 500; white-space: nowrap; }
.rm-shell .rm-badge.is-needs { background: #fbefe3; color: #b56c34; }
.rm-shell .rm-badge.is-missing { background: #f2f0eb; color: #96836a; }
.rm-shell .rm-badge.is-pending { background: #edf3f6; color: #648595; }
.rm-shell .rm-badge.is-ready { background: #ecf4ee; color: #4c805b; }
.rm-shell .rm-pager { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 10px; padding: 17px 24px; border-top: 1px solid var(--rm-line); color: #687b6e; font-size: 12px; }
.rm-shell .rm-pager > span { margin-right: auto; }
.rm-shell .rm-pager > div { display: flex; align-items: center; gap: 12px; }
.rm-shell .rm-pager button { min-height: 32px; padding: 6px 10px; border: 1px solid #e3e9df; color: #637d68; font-size: 12px; }
.rm-shell .rm-empty { display: flex; flex-direction: column; align-items: center; gap: 11px; padding: 64px 24px; text-align: center; }
.rm-shell .rm-empty > svg { width: 36px; height: 36px; margin-bottom: 4px; color: #9eb5a2; }
.rm-shell .rm-empty h3 { font-size: 17px; }
.rm-shell .rm-empty p { max-width: 440px; font-size: 13px; }
.rm-shell .rm-empty button { margin-top: 5px; }
.rm-shell .rm-onboarding { display: flex; justify-content: space-between; align-items: center; gap: 22px; margin-bottom: 20px; padding: 20px 23px; border: 1px solid #dce8d9; border-radius: 11px; background: #edf4e9; }
.rm-shell .rm-onboarding h3, .rm-shell .rm-onboarding strong { color: #466548; font-size: 15px; font-weight: 650; }
.rm-shell .rm-onboarding p { margin-top: 5px; color: #799074; font-size: 13px; }
.rm-shell .rm-onboarding button { flex-shrink: 0; }

/* Native dialog keeps keyboard focus within the current SKU. */
.rm-shell dialog.rm-drawer { position: fixed; inset: 0 0 0 auto; width: 720px; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0 0 0 auto; padding: 0; border: 0; border-left: 1px solid #dce5dd; border-radius: 0; background: #fff; color: var(--rm-ink); box-shadow: -20px 0 65px #1c34251a; overflow: hidden; }
.rm-shell .rm-drawer::backdrop { background: #182e2561; }
.rm-shell .rm-editor { display: flex; flex-direction: column; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; }
.rm-shell .rm-drawer-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding: 26px 30px 22px; border-bottom: 1px solid var(--rm-line); flex-shrink: 0; }
.rm-shell .rm-drawer-head h3 { font-size: 20px; overflow-wrap: anywhere; }
.rm-shell .rm-drawer-head small { display: block; margin: 0 0 5px; color: #687b6e; }
.rm-shell .rm-drawer-head .rm-icon-button { margin: -5px -9px 0 0; flex-shrink: 0; color: #829186; }
.rm-shell .rm-drawer-body { flex: 1; min-height: 0; overflow: auto; padding: 25px 30px 30px; overscroll-behavior: contain; scrollbar-gutter: stable; }
.rm-shell .rm-drawer-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-shrink: 0; padding: 17px 30px max(17px, env(safe-area-inset-bottom)); border-top: 1px solid var(--rm-line); background: #fff; }
.rm-shell .rm-drawer-foot > div { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.rm-shell .rm-drawer-foot .rm-danger { min-height: 27px; padding: 3px 0; font-size: 12px; }
.rm-shell .rm-drawer-foot small { color: #687b6e; }
.rm-shell .rm-drawer-foot .rm-primary { min-width: 150px; }
.rm-shell .rm-edit-heading { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 8px; }
.rm-shell .rm-section > label { display: flex; flex-direction: column; gap: 8px; color: #607464; font-size: 12px; }
.rm-shell .rm-section > .rm-muted { display: block; margin-top: 13px; }
.rm-shell .rm-section > .rm-stock-confirm { display: flex; flex-direction: row; align-items: center; gap: 8px; margin-top: 12px; padding: 11px 12px; border-radius: 7px; background: #f1f6ed; color: #5e7c56; font-size: 12px; cursor: pointer; }
.rm-shell .rm-stock-confirm input { flex: 0 0 16px; }
.rm-shell .rm-stock-confirm[hidden] { display: none; }
.rm-shell .rm-cycle-section > h4 > small { margin-left: 6px; color: var(--rm-muted); font-weight: 400; }
.rm-shell .rm-disclosure + .rm-section { margin-top: 24px; }
.rm-shell .rm-section + .rm-section { margin-top: 26px; }
.rm-shell .rm-section > h4 { margin-bottom: 7px; }
.rm-shell .rm-section > p { margin-bottom: 18px; font-size: 12px; line-height: 1.65; }
.rm-shell .rm-section-title { display: flex; align-items: center; gap: 9px; margin-bottom: 17px; font-size: 15px; font-weight: 650; }
.rm-shell .rm-section-title span { display: inline-flex; justify-content: center; align-items: center; width: 22px; height: 22px; border-radius: 6px; background: #edf3e9; color: #6b8b6b; font-size: 11px; font-weight: 600; }
.rm-shell .rm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px 18px; }
.rm-shell .rm-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rm-shell .rm-grid label { display: flex; flex-direction: column; align-items: stretch; gap: 7px; min-width: 0; color: #607464; font-size: 12px; font-weight: 500; }
.rm-shell .rm-field-hint { display: block; color: #687b6e; font-size: 11px; font-weight: 400; line-height: 1.55; }
.rm-shell .rm-grid + p, .rm-shell .rm-grid + .rm-note { margin-top: 15px; }
.rm-shell .rm-disclosure { margin-top: 20px; border: 1px solid #e4eae0; border-radius: 9px; overflow: hidden; background: #fff; }
.rm-shell .rm-disclosure > summary { position: relative; padding: 16px 40px 16px 17px; color: #617461; font-size: 13px; font-weight: 550; cursor: pointer; list-style: none; }
.rm-shell .rm-disclosure > summary small { margin-left: 10px; color: #687b6e; font-size: 11px; font-weight: 400; }
.rm-shell .rm-disclosure > summary::-webkit-details-marker { display: none; }
.rm-shell .rm-disclosure > summary::after { position: absolute; top: 17px; right: 18px; color: #91a28e; font-size: 16px; line-height: 1.4; font-weight: 400; content: "+"; }
.rm-shell .rm-disclosure[open] > summary::after { content: "−"; }
.rm-shell .rm-disclosure > summary:hover { background: #f8faf5; }
.rm-shell .rm-disclosure[open] > summary { border-bottom: 1px solid #edf1e8; background: #f8faf5; }
.rm-shell .rm-disclosure > .rm-disclosure-body { margin: 0; padding: 17px; }
.rm-shell .rm-disclosure-body > .rm-note + .rm-grid { margin-top: 15px; }
.rm-shell .rm-disclosure-body > button { margin-top: 16px; }
.rm-shell .rm-disclosure > .rm-grid { margin: 18px 17px; }
.rm-shell .rm-note { padding: 11px 13px; border-radius: 7px; background: #f4f7f1; color: #687b6e; font-size: 12px; line-height: 1.65; }
.rm-shell .rm-note.rm-list-note { margin: 0 24px 16px; }
.rm-shell .rm-note strong { color: #5c7858; font-weight: 600; }
.rm-shell .rm-inline-alert { margin-bottom: 20px; padding: 11px 14px; border: 1px solid #f1dfcf; border-radius: 8px; background: #fff8ef; color: #a17b50; font-size: 12px; line-height: 1.65; }
.rm-shell .rm-inline-alert.rm-error { border-color: #efd8d1; background: #fdf2ef; color: #a24637; }
.rm-shell .rm-batch { min-width: 0; margin: 18px 0 0; padding: 18px; border: 1px solid #dfe7db; border-radius: 9px; background: #fafcf8; }
.rm-shell .rm-batch legend { padding: 0 7px; color: #7a8e71; font-size: 12px; font-weight: 550; }
.rm-shell .rm-batch-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.rm-shell .rm-batch > button { margin-top: 13px; }
.rm-shell .rm-detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 16px 0; overflow: hidden; border: 1px solid #e7ede2; border-radius: 9px; background: #e7ede2; }
.rm-shell .rm-detail-grid > div { min-width: 0; padding: 15px 14px; background: #f8faf5; }
.rm-shell .rm-detail-grid small { display: block; color: #687b6e; font-size: 11px; }
.rm-shell .rm-detail-grid strong span { font-size: 11px; font-weight: 400; color: #687b6e; }
.rm-shell .rm-detail-grid strong { display: block; margin-top: 7px; color: #4c6b44; font-size: 18px; line-height: 1.4; font-weight: 600; }
.rm-shell .rm-forecast-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.rm-shell .rm-week { min-width: 0; padding: 12px; border: 1px solid #e1e9dc; border-radius: 8px; background: #fafcf7; }
.rm-shell .rm-week > strong { display: block; font-size: 12px; font-weight: 600; color: #608153; }
.rm-shell .rm-week > small { display: block; margin-top: 3px; color: #91a087; font-size: 10px; }
.rm-shell .rm-week.is-risk { border-color: #efddca; background: #fdf7ee; }
.rm-shell .rm-week.is-risk > strong { color: #a47a4b; }
.rm-shell .rm-week.is-risk > small { color: #af9779; }
.rm-shell .rm-week-grid, .rm-shell .rm-week dl { display: grid; gap: 5px; margin: 11px 0 0; font-size: 11px; }
.rm-shell .rm-week-grid > div, .rm-shell .rm-week dl > div { display: flex; justify-content: space-between; gap: 5px; }
.rm-shell .rm-week-grid dt, .rm-shell .rm-week dt { margin: 0; color: #687b6e; }
.rm-shell .rm-week-grid dd, .rm-shell .rm-week dd { margin: 0; color: #617c54; font-weight: 550; }
.rm-shell .rm-week.is-risk .rm-week-grid dd, .rm-shell .rm-week.is-risk dd { color: #a47a4b; }
.rm-shell .rm-parameters { max-width: 900px; margin: 0 auto; padding: 25px 30px 30px; }
.rm-shell .rm-parameter-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 27px; padding-bottom: 22px; border-bottom: 1px solid var(--rm-line); }
.rm-shell .rm-parameter-head h3 { font-size: 20px; }
.rm-shell .rm-parameter-head p { max-width: 620px; margin-top: 8px; font-size: 13px; line-height: 1.65; }
.rm-shell .rm-parameters .rm-section { padding: 0 0 24px; }
.rm-shell .rm-parameters .rm-section + .rm-section { margin-top: 0; padding-top: 24px; border-top: 1px solid var(--rm-line); }
.rm-shell .rm-form-footer { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--rm-line); }
.rm-shell .rm-form-footer small { margin-right: auto; color: #687b6e; }

/* Membership actions remain visible without opening a product editor. */
.rm-shell .rm-product-cell { display: flex; align-items: flex-start; gap: 12px; }
.rm-shell .rm-product-cell > input { flex: 0 0 16px; margin-top: 3px; cursor: pointer; }
.rm-shell .rm-row-actions { display: flex; align-items: center; gap: 3px; }
.rm-shell .rm-row-actions .rm-danger { padding: 5px 7px; min-height: 32px; font-size: 12px; }
.rm-shell .rm-selection-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; min-height: 48px; padding: 9px 24px; border-top: 1px solid var(--rm-line); background: #fcfdfb; color: var(--rm-muted); font-size: 12px; }
.rm-shell .rm-selection-bar > small { margin-left: auto; }
.rm-shell .rm-selection-bar > button { min-height: 29px; padding: 4px 8px; font-size: 12px; }
.rm-shell .rm-check-label { display: inline-flex; align-items: center; gap: 9px; color: #526b5b; font-size: 12px; cursor: pointer; }
.rm-shell .rm-check-label input { flex: 0 0 16px; }
.rm-shell .rm-source-tag { display: inline-flex; width: fit-content; margin-top: 5px; padding: 2px 6px; border-radius: 4px; background: #edf4ef; color: #49735b; }
.rm-shell .rm-cell-value > .rm-source-issue { color: #a56635; font-weight: 550; cursor: help; }
.rm-shell .rm-cell-value > small { max-width: 210px; overflow-wrap: anywhere; }
.rm-shell .rm-live-stock { margin: 16px 0 22px; padding: 16px; border: 1px solid #dfe9df; border-radius: 9px; background: #f6f9f4; }
.rm-shell .rm-live-stock > div:first-child > span { color: #607464; font-size: 12px; }
.rm-shell .rm-live-stock > div:first-child > strong { display: block; margin: 4px 0; font-size: 24px; font-weight: 650; }
.rm-shell .rm-live-stock > div:first-child > small { color: var(--rm-muted); }
.rm-shell .rm-warehouse-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 15px; padding-top: 13px; border-top: 1px solid #e0e8dd; }
.rm-shell .rm-warehouse-card { min-width: 0; padding: 13px; border: 1px solid #e0e8dd; border-radius: 8px; background: #fff; }
.rm-shell .rm-warehouse-heading { margin-bottom: 11px; }
.rm-shell .rm-warehouse-heading h5 { margin: 0; color: #405e4b; font-size: 12px; font-weight: 600; overflow-wrap: anywhere; }
.rm-shell .rm-warehouse-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.rm-shell .rm-warehouse-metrics > div { min-width: 0; }
.rm-shell .rm-warehouse-metrics span { display: block; color: var(--rm-muted); font-size: 11px; }
.rm-shell .rm-warehouse-grid small { display: block; color: var(--rm-muted); font-size: 11px; overflow-wrap: anywhere; }
.rm-shell .rm-warehouse-grid strong { display: block; margin: 3px 0; font-size: 17px; font-weight: 600; }
.rm-shell .rm-warehouse-metrics .rm-warehouse-issue { margin-top: 6px; color: #a56635; font-size: 11px; line-height: 1.55; overflow-wrap: anywhere; }
.rm-shell .rm-live-stock > .rm-field-hint { margin-top: 13px; }
.rm-shell .rm-live-value { display: flex; flex-direction: column; justify-content: center; gap: 5px; padding: 9px 13px; border-radius: 7px; background: #f1f6ed; }
.rm-shell .rm-live-value > small { color: var(--rm-muted); }
.rm-shell .rm-live-value > strong { font-size: 21px; }
.rm-shell dialog.rm-picker { position: fixed; inset: 0; width: 680px; max-width: calc(100vw - 32px); max-height: min(760px, calc(100dvh - 48px)); margin: auto; padding: 0; border: 1px solid #dce5dd; border-radius: 14px; background: #fff; color: var(--rm-ink); box-shadow: 0 22px 80px #1c342526; overflow: hidden; }
.rm-shell .rm-picker::backdrop { background: #182e2561; }
.rm-shell .rm-picker-layout { display: flex; flex-direction: column; max-height: min(760px, calc(100dvh - 48px)); }
.rm-shell .rm-picker-body { flex: 1; min-height: 0; overflow: auto; padding: 20px 26px; overscroll-behavior: contain; }
.rm-shell .rm-picker-body > .rm-search { max-width: none; margin: 18px 0 14px; }
.rm-shell .rm-picker-body > .rm-series-filter { width: 100%; margin-top: 14px; }
.rm-shell .rm-picker-body > .rm-series-error { margin: 0 0 14px; }
.rm-shell .rm-picker-list { margin-top: 12px; border: 1px solid var(--rm-line); border-radius: 9px; overflow: hidden; }
.rm-shell .rm-picker-row { display: flex; align-items: center; gap: 13px; padding: 14px; border-top: 1px solid var(--rm-line); cursor: pointer; }
.rm-shell .rm-picker-row:first-child { border-top: 0; }
.rm-shell .rm-picker-row:has(input:checked) { background: #eff6ef; }
.rm-shell .rm-picker-row > input { flex: 0 0 16px; }
.rm-shell .rm-picker-row > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.rm-shell .rm-picker-row > span > strong { display: block; font-size: 13px; font-weight: 600; }
.rm-shell .rm-picker-row > span > small { display: block; margin-top: 4px; color: var(--rm-muted); }
.rm-shell .rm-picker-row > small { color: #718c76; font-size: 11px; }
.rm-shell .rm-picker-body .rm-empty { padding: 36px 16px; }

@media (max-width: 1080px) {
  .rm-shell { padding: 22px; }
  .rm-shell .rm-header { gap: 15px; }
  .rm-shell .rm-summary { gap: 10px; }
  .rm-shell button.rm-stat { padding: 16px; }
  .rm-shell .rm-toolbar { gap: 12px; flex-wrap: wrap; }
  .rm-shell .rm-toolbar-actions { margin-left: auto; }
  .rm-shell .rm-tabs { gap: 21px; }
  .rm-shell th, .rm-shell td { padding-left: 12px; padding-right: 12px; }
  .rm-shell .rm-product { min-width: 170px; }
}
@media (max-width: 700px) {
  .rm-shell { min-height: 0; padding: 20px 14px; }
  .rm-shell h2 { font-size: 24px; }
  .rm-shell .rm-header { flex-wrap: wrap; align-items: flex-start; gap: 18px; margin-bottom: 20px; }
  .rm-shell .rm-header h2 + p { font-size: 12px; }
  .rm-shell .rm-header-actions { width: 100%; justify-content: space-between; gap: 8px; }
  .rm-shell .rm-regions { flex: 1; max-width: 190px; }
  .rm-shell .rm-regions button { flex: 1; min-width: 70px; min-height: 36px; }
  .rm-shell .rm-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
  .rm-shell button.rm-stat { padding: 12px 14px; border-radius: 10px; }
  .rm-shell .rm-stat strong { margin-top: 6px; font-size: 26px; }
  .rm-shell .rm-stat small { display: none; }
  .rm-shell .rm-tabs { gap: 22px; padding: 0 17px; }
  .rm-shell .rm-tabs button { min-height: 52px; padding-top: 14px; padding-bottom: 14px; font-size: 13px; }
  .rm-shell .rm-toolbar { flex-wrap: wrap; gap: 12px; padding: 17px 16px 12px; }
  .rm-shell .rm-search { flex-basis: 100%; max-width: none; }
  .rm-shell .rm-toolbar-filters { flex-wrap: wrap; min-width: 0; width: 100%; flex-basis: 100%; }
  .rm-shell .rm-series-filter { width: 100%; }
  .rm-shell .rm-series-error { margin-right: 16px; margin-left: 16px; }
  .rm-shell .rm-toolbar-actions { width: 100%; justify-content: space-between; gap: 6px; }
  .rm-shell .rm-toolbar-actions button { padding-left: 8px; padding-right: 8px; font-size: 12px; }
  .rm-shell .rm-toolbar select { min-width: 110px; font-size: 12px; }
  .rm-shell .rm-toolbar-actions > [data-open-picker] { width: 100%; justify-content: center; margin-bottom: 5px; }
  .rm-shell .rm-selection-bar { gap: 9px; padding: 10px 17px; }
  .rm-shell .rm-selection-bar > small { flex-basis: 100%; margin-left: 25px; font-size: 11px; }
  .rm-shell .rm-context { flex-direction: column; gap: 4px; padding: 0 17px 15px; font-size: 11px; }
  .rm-shell .rm-scroll { overflow: visible; }
  .rm-shell table, .rm-shell tbody { display: block; width: 100%; }
  .rm-shell thead { display: none; }
  .rm-shell tr { display: block; margin: 0; padding: 15px 17px; border-top: 1px solid var(--rm-line); }
  .rm-shell td, .rm-shell th:first-child, .rm-shell td:first-child, .rm-shell td:last-child { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; width: 100%; min-width: 0; max-width: none; padding: 6px 0; border: 0; background: transparent; white-space: normal; text-align: right; }
  .rm-shell td[data-label]::before { flex: 0 0 82px; color: #687b6e; font-size: 12px; line-height: 1.8; text-align: left; content: attr(data-label); }
  .rm-shell td:first-child { display: block; padding: 0 0 12px; text-align: left; }
  .rm-shell td:first-child > .rm-cell-value { width: 100%; }
  .rm-shell td:first-child::before { display: none; }
  .rm-shell td .rm-cell-value { flex: 1; }
  .rm-shell td .rm-product { min-width: 0; max-width: none; }
  .rm-shell .rm-product-cell { gap: 10px; }
  .rm-shell .rm-row-actions { justify-content: flex-end; }
  .rm-shell .rm-cell-value > small { max-width: none; margin-left: auto; }
  .rm-shell .rm-product strong { font-size: 14px; }
  .rm-shell .rm-product small { margin-top: 4px; }
  .rm-shell td > small, .rm-shell .rm-cell-value > small { margin-top: 3px; }
  .rm-shell td:last-child { align-items: center; margin-top: 6px; padding-top: 10px; border-top: 1px dashed #e5ebe1; }
  .rm-shell td:last-child::before { align-self: center; }
  .rm-shell td:last-child button { margin-left: auto; }
  .rm-shell td[colspan] { justify-content: flex-start; text-align: left; }
  .rm-shell .rm-num { font-size: 16px; }
  .rm-shell tbody tr:hover td { background: transparent; }
  .rm-shell .rm-note.rm-list-note { margin: 0 17px 15px; }
  .rm-shell .rm-pager { justify-content: space-between; gap: 7px; padding: 15px; }
  .rm-shell .rm-pager > span { margin-right: auto; }
  .rm-shell .rm-pager > div { display: flex; align-items: center; gap: 12px; }
  .rm-shell .rm-pager button { font-size: 11px; }
  .rm-shell .rm-empty { padding: 42px 22px; }
  .rm-shell .rm-onboarding { flex-direction: column; align-items: flex-start; gap: 14px; padding: 17px; }
  .rm-shell .rm-onboarding p { font-size: 12px; }
  .rm-shell dialog.rm-drawer { width: 100%; border-left: 0; }
  .rm-shell .rm-drawer-head { gap: 14px; padding: 21px 20px 18px; }
  .rm-shell .rm-drawer-head h3 { font-size: 18px; }
  .rm-shell .rm-drawer-body { padding: 20px; }
  .rm-shell .rm-drawer-foot { flex-wrap: wrap; padding: 13px 18px max(13px, env(safe-area-inset-bottom)); gap: 10px; }
  .rm-shell .rm-drawer-foot > div { gap: 6px; }
  .rm-shell .rm-drawer-foot .rm-primary { min-width: 0; }
  .rm-shell .rm-drawer-foot button { padding-right: 10px; padding-left: 10px; font-size: 12px; }
  .rm-shell dialog.rm-picker { max-width: calc(100vw - 20px); max-height: calc(100dvh - 24px); border-radius: 12px; }
  .rm-shell .rm-picker-layout { max-height: calc(100dvh - 24px); }
  .rm-shell .rm-picker-body { padding: 18px; }
  .rm-shell .rm-picker .rm-drawer-foot { flex-wrap: nowrap; }
  .rm-shell .rm-warehouse-grid { grid-template-columns: 1fr; gap: 9px; }
  .rm-shell .rm-grid { gap: 14px; }
  .rm-shell .rm-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rm-shell .rm-grid label { font-size: 12px; }
  .rm-shell .rm-grid input, .rm-shell .rm-grid select, .rm-shell .rm-grid textarea { font-size: 16px; }
  .rm-shell .rm-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rm-shell .rm-detail-grid > div { padding: 13px; }
  .rm-shell .rm-detail-grid strong span { font-size: 11px; font-weight: 400; color: #687b6e; }
  .rm-shell .rm-detail-grid strong { font-size: 17px; }
  .rm-shell .rm-forecast-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rm-shell .rm-week { padding: 13px; }
  .rm-shell .rm-week > small { font-size: 11px; }
  .rm-shell .rm-batch { padding: 14px; }
  .rm-shell .rm-batch .rm-grid { grid-template-columns: 1fr; }
  .rm-shell .rm-parameters { padding: 21px 18px; }
  .rm-shell .rm-parameter-head { flex-direction: column; gap: 12px; }
  .rm-shell .rm-parameter-head p { font-size: 12px; }
  .rm-shell .rm-form-footer { flex-wrap: wrap; }
  .rm-shell .rm-form-footer small { flex-basis: 100%; }
}
@media (max-width: 380px) {
  .rm-shell { padding-right: 10px; padding-left: 10px; }
  .rm-shell .rm-stat-top { font-size: 11px; }
  .rm-shell .rm-toolbar-actions { justify-content: flex-start; }
  .rm-shell .rm-toolbar-actions select { flex: 1; }
  .rm-shell .rm-drawer-body { padding: 17px; }
  .rm-shell .rm-grid { grid-template-columns: 1fr; }
  .rm-shell .rm-drawer-foot { align-items: stretch; }
  .rm-shell .rm-drawer-foot > div { margin-left: auto; }
}

/* Spreadsheet views retain all comparison columns, with a frozen SKU column. */
.rm-shell .rm-sheet-scroll {
  --rm-sheet-product-width: 220px;
  --rm-sheet-group-height: 48px;
  position: relative;
  width: 100%;
  max-width: 100%;
  max-height: min(65vh, 720px);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: auto;
  scrollbar-color: #bccbbf #f1f5ef;
  border-top: 1px solid #dce5d8;
  border-bottom: 1px solid #dce5d8;
  isolation: isolate;
}
.rm-shell .rm-sheet-scroll:focus-visible { outline: 2px solid #85a78d; outline-offset: -2px; }
.rm-shell .rm-sheet-scroll::-webkit-scrollbar { width: 10px; height: 10px; }
.rm-shell .rm-sheet-scroll::-webkit-scrollbar-track { background: #f1f5ef; }
.rm-shell .rm-sheet-scroll::-webkit-scrollbar-thumb { border: 2px solid #f1f5ef; border-radius: 8px; background: #bccbbf; }
.rm-shell .rm-sheet-scroll::-webkit-scrollbar-corner { background: #f1f5ef; }
.rm-shell .rm-sheet-table {
  display: table;
  width: max-content;
  min-width: 100%;
  margin: 0;
  border: 0;
  border-spacing: 0;
  border-collapse: separate;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.rm-shell .rm-sheet-table thead { display: table-header-group; }
.rm-shell .rm-sheet-table tbody { display: table-row-group; }
.rm-shell .rm-sheet-table tr { display: table-row; margin: 0; padding: 0; border: 0; }
.rm-shell .rm-sheet-table th,
.rm-shell .rm-sheet-table td {
  display: table-cell;
  width: auto;
  min-width: 88px;
  max-width: none;
  margin: 0;
  padding: 11px 13px;
  border: 0;
  border-right: 1px solid #e7ede3;
  border-bottom: 1px solid #e7ede3;
  border-radius: 0;
  background: #fff;
  color: #435b48;
  line-height: 1.5;
  text-align: right;
  vertical-align: middle;
  white-space: nowrap;
}
.rm-shell .rm-sheet-table td[data-label]::before { display: none; content: none; }
.rm-shell .rm-sheet-table th {
  position: sticky;
  top: 0;
  z-index: 4;
  height: var(--rm-sheet-group-height);
  padding: 8px 13px;
  border-bottom-color: #d5e0d0;
  background: #f0f5ed;
  color: #526c53;
  font-size: 12px;
  font-weight: 600;
}
.rm-shell .rm-sheet-table .rm-sheet-groups > th { height: var(--rm-sheet-group-height); text-align: center; }
.rm-shell .rm-sheet-table .rm-sheet-groups > .rm-sheet-group:nth-child(even) { background: #edf3e9; }
.rm-shell .rm-sheet-table .rm-sheet-groups small { display: block; color: #71866c; font-size: 10px; font-weight: 400; line-height: 1.3; }
.rm-shell .rm-sheet-table .rm-sheet-columns > th { top: var(--rm-sheet-group-height); height: 38px; padding-top: 9px; padding-bottom: 9px; background: #f8faf5; color: #6b7d65; font-size: 11px; font-weight: 500; }
.rm-shell .rm-sheet-table thead > .rm-sheet-columns:first-child > th { top: 0; }
.rm-shell .rm-sheet-table .rm-sheet-columns > th small { font-size: 10px; font-weight: 400; }
.rm-shell .rm-sheet-table .rm-sheet-group-start { border-left: 1px solid #cddbc7; }
.rm-shell .rm-sheet-table .rm-sheet-product {
  position: sticky;
  left: 0;
  z-index: 2;
  width: var(--rm-sheet-product-width);
  min-width: var(--rm-sheet-product-width);
  max-width: var(--rm-sheet-product-width);
  padding-left: 17px;
  padding-right: 15px;
  border-right: 1px solid #cad9c4;
  background: #fff;
  box-shadow: 3px 0 5px #203a3408;
  text-align: left;
  white-space: normal;
}
.rm-shell .rm-sheet-table thead .rm-sheet-product { top: 0; z-index: 6; background: #eaf2e5; text-align: left; }
.rm-shell .rm-sheet-table .rm-sheet-product > .rm-cell-value { width: 100%; max-width: 100%; }
.rm-shell .rm-sheet-table .rm-product-cell { align-items: flex-start; gap: 9px; }
.rm-shell .rm-sheet-table .rm-product-cell > input { margin-top: 2px; }
.rm-shell .rm-sheet-table .rm-product { flex: 1; width: auto; min-width: 0; max-width: 100%; }
.rm-shell .rm-sheet-table .rm-product strong { margin: 0 0 3px; font-size: 12px; line-height: 1.5; font-weight: 600; overflow-wrap: anywhere; }
.rm-shell .rm-sheet-table .rm-product small { margin-top: 0; font-size: 11px; line-height: 1.5; }
.rm-shell .rm-sheet-table .rm-cell-value { min-width: 0; max-width: 100%; }
.rm-shell .rm-sheet-table .rm-sheet-number { min-width: 96px; text-align: right; }
.rm-shell .rm-sheet-table .rm-num { color: inherit; font-size: 14px; line-height: 1.5; font-weight: 550; letter-spacing: 0; }
.rm-shell .rm-sheet-table .rm-cell-value > small,
.rm-shell .rm-sheet-table .rm-cell-value > span > small { display: block; max-width: 176px; margin: 2px 0 0 auto; color: #71846b; font-size: 10px; line-height: 1.45; white-space: normal; }
.rm-shell .rm-sheet-table .rm-sheet-status { width: 190px; min-width: 190px; max-width: 190px; text-align: left; white-space: normal; }
.rm-shell .rm-sheet-table .rm-sheet-status .rm-cell-value > small { margin-left: 0; }
.rm-shell .rm-sheet-table .rm-sheet-actions { min-width: 145px; text-align: left; }
.rm-shell .rm-sheet-table .rm-sheet-actions button { min-height: 30px; margin: 0; padding: 4px 5px; font-size: 11px; }
.rm-shell .rm-sheet-table .rm-sheet-actions svg { width: 16px; height: 16px; }
.rm-shell .rm-sheet-table .rm-row-actions { justify-content: flex-start; gap: 2px; }
.rm-shell .rm-sheet-table .rm-badge { min-height: 22px; padding: 2px 7px; font-size: 11px; }
.rm-shell .rm-sheet-table tbody tr:nth-child(even) > td { background: #fbfdf9; }
.rm-shell .rm-sheet-table tbody tr:hover > td { background: #f1f7ed; }
.rm-shell .rm-sheet-table tbody tr:last-child > td { border-bottom: 1px solid #e7ede3; }
.rm-shell .rm-sheet-table tbody tr > td.rm-sheet-warning { background: #fffaf0; color: #a2753d; }
.rm-shell .rm-sheet-table tbody tr > td.rm-sheet-risk { background: #fdf3e9; color: #a15d32; }
.rm-shell .rm-sheet-table tbody tr:hover > td.rm-sheet-warning { background: #fbf1df; }
.rm-shell .rm-sheet-table tbody tr:hover > td.rm-sheet-risk { background: #f8e9d9; }
.rm-shell .rm-sheet-table span.rm-sheet-risk,
.rm-shell .rm-sheet-table span.rm-sheet-warning { display: inline-block; padding: 1px 6px; border-radius: 4px; background: #fdf3e9; color: #a15d32; }
.rm-shell .rm-sheet-table span.rm-sheet-warning { background: #fff8e9; color: #a2753d; }
.rm-shell .rm-sheet-table .rm-sheet-risk .rm-num,
.rm-shell .rm-sheet-table .rm-sheet-warning .rm-num { color: inherit; }
.rm-shell .rm-forecast-sheet .rm-sheet-number { min-width: 82px; }
.rm-shell .rm-forecast-sheet .rm-sheet-columns > th { min-width: 82px; }
.rm-shell .rm-batch-picker-row {
  display: flex;
  justify-content: flex-start;
  width: 100%;
  min-height: 68px;
  padding: 14px 16px;
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  border-radius: 0;
  background: #fff;
  text-align: left;
  white-space: normal;
}
.rm-shell .rm-batch-picker-row:hover { background: #f2f7ee; }
.rm-shell .rm-batch-picker-row:focus-visible { position: relative; z-index: 1; outline-offset: -3px; }
.rm-shell .rm-batch-picker-row > svg { margin-left: auto; color: #789773; }

@media (max-width: 700px) {
  .rm-shell .rm-sheet-scroll { --rm-sheet-product-width: 144px; max-height: 65vh; overflow: auto; }
  .rm-shell .rm-sheet-table th,
  .rm-shell .rm-sheet-table td { padding: 10px; }
  .rm-shell .rm-sheet-table .rm-sheet-product { padding: 10px; }
  .rm-shell .rm-sheet-table .rm-product-cell { gap: 7px; }
  .rm-shell .rm-sheet-table .rm-product strong { font-size: 12px; }
  .rm-shell .rm-sheet-table .rm-product small { font-size: 10px; }
  .rm-shell .rm-sheet-table .rm-cell-value { flex: none; }
  .rm-shell .rm-sheet-table .rm-sheet-number { min-width: 88px; }
  .rm-shell .rm-sheet-table .rm-sheet-status { width: 165px; min-width: 165px; max-width: 165px; }
  .rm-shell .rm-sheet-table .rm-cell-value > small { margin-top: 2px; }
  .rm-shell .rm-sheet-table .rm-sheet-actions { min-width: 135px; }
  .rm-shell .rm-sheet-table .rm-row-actions { justify-content: flex-start; }
  .rm-shell .rm-forecast-sheet .rm-sheet-number,
  .rm-shell .rm-forecast-sheet .rm-sheet-columns > th { min-width: 76px; }
  .rm-shell .rm-toolbar-actions > [data-open-batch-picker] { width: 100%; justify-content: center; margin-bottom: 5px; }
  .rm-shell .rm-batch-picker-row { min-height: 68px; padding: 13px; }
}

/* Editable cells keep the spreadsheet workflow on the page. */
.rm-shell { max-width: none; padding: 22px; }
.rm-shell .rm-inline-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 12px 20px; border-top: 1px solid var(--rm-line); background: #f4f8f2; }
.rm-shell .rm-inline-toolbar > div { flex: 1; min-width: 250px; }
.rm-shell .rm-inline-toolbar strong { display: block; font-size: 13px; }
.rm-shell .rm-inline-toolbar small { display: block; color: var(--rm-muted); font-size: 11px; }
.rm-shell .rm-inline-toolbar > span { color: #977341; font-size: 12px; }
.rm-shell .rm-sheet-table .rm-cell-input { width: 126px; min-width: 100px; min-height: 34px; padding: 6px 8px; border-radius: 4px; border-color: #c7d8c7; background: #fffef5; font-size: 12px; text-align: right; }
.rm-shell .rm-sheet-table select.rm-cell-input { text-align: left; }
.rm-shell .rm-sheet-table input[type="date"].rm-cell-input { width: 148px; text-align: left; }
.rm-shell .rm-sheet-table input[type="text"].rm-cell-input { width: 170px; text-align: left; }
.rm-shell .rm-sheet-table .rm-cell-input:disabled, .rm-shell .rm-sheet-table .rm-cell-input:read-only:not(select) { background: #f1f5f0; border-color: #e0e7de; color: #748170; }
.rm-shell .rm-sheet-table .rm-cell-input:focus { outline: 2px solid #699d80; outline-offset: 0; background: #fff; }
.rm-shell .rm-sheet-table .rm-cell-input + .rm-cell-input { display: block; margin-top: 4px; }
.rm-shell .rm-inline-row-tools { display: flex; flex-wrap: wrap; gap: 2px 6px; margin-top: 5px; }
.rm-shell .rm-inline-row-tools > span { flex-basis: 100%; color: #997039; font-size: 10px; white-space: normal; }
.rm-shell .rm-inline-row-tools > span:empty { display: none; }
.rm-shell .rm-inline-row-tools button { min-height: 24px; padding: 2px 3px; font-size: 11px; }
.rm-shell .rm-cell-confirm { display: flex; align-items: center; gap: 4px; margin-top: 5px; font-size: 10px; color: #7d754e; }
.rm-shell .rm-cell-confirm[hidden] { display: none; }
.rm-shell .rm-cell-confirm input { width: 14px; min-height: 14px; padding: 0; }
.rm-shell .rm-new-sku { width: 100%; min-width: 0; padding: 5px; font-size: 11px; }
.rm-shell .rm-batches-sheet .rm-sheet-actions { max-width: 160px; white-space: normal; }
.rm-shell .rm-membership-inline { display: block; margin-top: 18px; border: 1px solid var(--rm-line); border-radius: 10px; background: #fff; }
.rm-shell .rm-membership-inline .rm-picker-layout { max-height: none; }
.rm-shell .rm-membership-inline .rm-picker-body { max-height: 460px; overflow: auto; }
@media (max-width: 700px) { .rm-shell { padding: 12px; } .rm-shell .rm-inline-toolbar { padding: 10px; } .rm-shell .rm-sheet-table .rm-cell-input { width: 110px; } }

/* Compact workbook density: keep the working grid in view. */
.rm-shell { padding: 16px 18px; background: #f5f7fa; --rm-line: #e2e7ee; }
.rm-shell .rm-header { margin-bottom: 12px; }
.rm-shell .rm-header h2 { font-size: 22px; }
.rm-shell .rm-eyebrow, .rm-shell .rm-header h2 + p { display: none; }
.rm-shell .rm-summary { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.rm-shell button.rm-stat { flex-direction: row; align-items: center; gap: 12px; padding: 8px 14px; border-radius: 6px; }
.rm-shell .rm-stat strong { margin: 0; font-size: 20px; }
.rm-shell .rm-stat small { display: none; }
.rm-shell .rm-content { border-radius: 7px; }
.rm-shell .rm-tabs { gap: 24px; padding: 0 14px; }
.rm-shell .rm-tabs button { min-height: 42px; padding: 10px 0; font-size: 13px; }
.rm-shell .rm-toolbar { padding: 10px 14px 6px; gap: 10px; }
.rm-shell .rm-series-filter { flex-direction: row; align-items: center; white-space: nowrap; width: 255px; gap: 8px; }
.rm-shell .rm-series-filter > select { flex: 1; }
.rm-shell .rm-toolbar input, .rm-shell .rm-toolbar select { min-height: 32px; padding-top: 5px; padding-bottom: 5px; }
.rm-shell .rm-toolbar button, .rm-shell .rm-inline-toolbar button { min-height: 30px; padding: 5px 10px; font-size: 12px; }
.rm-shell .rm-context { padding: 0 14px 7px; font-size: 11px; }
.rm-shell .rm-selection-bar { min-height: 32px; padding: 5px 14px; font-size: 11px; }
.rm-shell .rm-inline-toolbar { padding: 7px 14px; gap: 9px; background: #f8fafc; }
.rm-shell .rm-inline-toolbar strong { display: inline; font-size: 12px; }
.rm-shell .rm-inline-toolbar small { display: inline; margin-left: 10px; font-size: 10px; }
.rm-shell .rm-sheet-scroll { --rm-sheet-product-width: 250px; --rm-sheet-group-height: 36px; max-height: min(70vh, 800px); }
.rm-shell .rm-sheet-table td { padding: 6px 8px; height: 56px; border-right-color: #edf0f4; }
.rm-shell .rm-sheet-table th { padding: 6px 8px; background: #f1f5fa; color: #63748a; }
.rm-shell .rm-sheet-table .rm-sheet-columns > th { height: 32px; padding: 6px 8px; background: #f7f9fc; }
.rm-shell .rm-sheet-table thead .rm-sheet-product { background: #f1f5fa; }
.rm-shell .rm-sheet-table .rm-sheet-product { padding: 6px 10px; }
.rm-shell .rm-sheet-table .rm-product-cell { align-items: center; gap: 8px; }
.rm-shell .rm-sheet-table .rm-product-cell > input { margin: 0; flex-shrink: 0; }
.rm-shell .rm-product-thumb { width: 32px; height: 32px; flex: 0 0 32px; border: 1px solid #e5eaf0; border-radius: 5px; object-fit: contain; background: white; }
.rm-shell .rm-thumb-empty { border-style: dashed; }
.rm-shell .rm-sheet-table .rm-product strong { margin: 0; line-height: 1.35; }
.rm-shell .rm-sheet-table .rm-product small { font-size: 10px; line-height: 1.35; }
.rm-shell .rm-sheet-table .rm-sheet-status { width: 145px; min-width: 145px; max-width: 145px; }
.rm-shell .rm-sheet-table .rm-sheet-number { min-width: 82px; }
.rm-shell .rm-sheet-table .rm-num { font-size: 13px; }
.rm-shell .rm-sheet-table .rm-cell-input { width: 106px; min-width: 80px; min-height: 28px; padding: 3px 5px; border-color: #dce4ed; border-radius: 3px; background: #fff; font-size: 11px; }
.rm-shell .rm-sheet-table input[type="date"].rm-cell-input { width: 138px; }
.rm-shell .rm-sheet-table .rm-sales-cells { display: flex; align-items: center; gap: 4px; }
.rm-shell .rm-sheet-table .rm-sales-cells .rm-cell-input { width: 82px; }
.rm-shell .rm-sheet-table .rm-sales-cells .rm-cell-input + .rm-cell-input { margin: 0; }
.rm-shell .rm-inline-row-tools { margin: 2px 0 0; gap: 3px 6px; }
.rm-shell .rm-inline-row-tools > span { flex-basis: auto; }
.rm-shell .rm-inline-row-tools button { min-height: 18px; padding: 0; font-size: 10px; }
.rm-shell .rm-inline-row-tools button:disabled { display: none; }
.rm-shell .rm-inline-row-tools:not(:has(button:not(:disabled))):has(span:empty) { display: none; }
.rm-shell .rm-sheet-table tbody tr:nth-child(even) > td { background: #f8fafc; }
.rm-shell .rm-sheet-table tbody tr:hover > td { background: #edf4fc; }
.rm-shell .rm-pager { min-height: 40px; padding: 6px 14px; }
@media (max-width: 700px) {
  .rm-shell { padding: 10px; }
  .rm-shell .rm-sheet-scroll { --rm-sheet-product-width: 200px; }
  .rm-shell .rm-series-filter { width: 100%; }
  .rm-shell .rm-inline-toolbar small { display: block; margin-left: 0; }
}

/* Original workbook forecast: one SKU, sixteen weeks, three rows per batch. */
.rm-shell .rm-forecast-controls { display:flex; align-items:center; flex-wrap:wrap; gap:18px; padding:12px 14px; border-top:1px solid var(--rm-line); }
.rm-shell .rm-forecast-controls label { display:flex; align-items:center; gap:10px; font-size:12px; font-weight:600; }
.rm-shell .rm-forecast-controls select { width: min(430px,60vw); min-height:34px; padding:6px 10px; }
.rm-shell .rm-time-overview { display:flex; flex-wrap:wrap; align-items:center; margin:0 14px 12px; border:1px solid var(--rm-line); border-radius:7px; background:#f8fafc; }
.rm-shell .rm-time-overview > div { flex:1; min-width:112px; padding:12px 15px; border-right:1px solid var(--rm-line); }
.rm-shell .rm-time-overview small { display:block; color:var(--rm-muted); font-size:11px; }
.rm-shell .rm-time-overview strong { display:block; font-size:20px; line-height:1.5; }
.rm-shell .rm-time-overview em { font-size:11px; font-style:normal; font-weight:400; }
.rm-shell .rm-time-overview > .rm-time-product { display:flex; align-items:center; gap:10px; min-width:240px; flex:2; }
.rm-shell .rm-time-product img { width:42px; height:42px; object-fit:contain; border-radius:6px; background:white; }
.rm-shell .rm-time-product strong { font-size:15px; }
.rm-shell .rm-time-legend { display:flex; flex-wrap:wrap; gap:8px; align-items:center; padding:0 14px 8px; }
.rm-shell .rm-time-legend > span { padding:3px 10px; border-radius:4px; font-size:11px; font-weight:600; }
.rm-shell .rm-time-legend small { margin-left:auto; color:var(--rm-muted); font-size:11px; }
.rm-shell .rm-time-note { padding:0 14px 12px; font-size:11px; }
.rm-shell .rm-time-scroll { overflow:auto; max-height:70vh; border-block:1px solid var(--rm-line); position:relative; isolation:isolate; }
.rm-shell .rm-timeline { width:100%; min-width:1500px; table-layout:fixed; border-collapse:separate; border-spacing:0; font-size:12px; }
.rm-shell .rm-timeline td, .rm-shell .rm-timeline th { padding:8px 6px; height:38px; border:0; border-right:1px solid #dfe6ed; border-bottom:1px solid #dfe6ed; text-align:center; background:#fff; white-space:nowrap; }
.rm-shell .rm-timeline thead th { position:sticky; top:0; z-index:3; height:52px; background:#eef3f8; color:#475d74; font-size:12px; font-weight:600; }
.rm-shell .rm-timeline thead small { display:block; font-size:10px; font-weight:400; }
.rm-shell .rm-timeline .rm-time-name { position:sticky; left:0; width:180px; z-index:2; text-align:left; padding-left:12px; white-space:normal; }
.rm-shell .rm-timeline .rm-time-stage { position:sticky; left:180px; width:150px; z-index:2; text-align:left; white-space:normal; }
.rm-shell .rm-timeline .rm-time-quantity { position:sticky; left:330px; width:80px; z-index:2; border-right:2px solid #b9c9d9; }
.rm-shell .rm-timeline thead .rm-time-name, .rm-shell .rm-timeline thead .rm-time-stage, .rm-shell .rm-timeline thead .rm-time-quantity { z-index:5; }
.rm-shell .rm-timeline .rm-time-name small, .rm-shell .rm-timeline .rm-time-stage small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#718196; font-size:10px; font-weight:400; }
.rm-shell .rm-timeline .rm-time-summary > * { background:#f4f7fb; font-weight:600; }
.rm-shell .rm-timeline .rm-time-batch-start > * { border-top:8px solid #f4f7fa; }
.rm-shell .rm-timeline tr:hover > td:not([class^="rm-time-"]) { background:#f9fbfd; }
.rm-shell .rm-time-stock, .rm-shell .rm-timeline td.rm-time-stock { background:#dcefdc; color:#28603a; font-weight:600; }
.rm-shell .rm-time-production, .rm-shell .rm-timeline td.rm-time-production { background:#dceafa; color:#285b98; font-weight:600; }
.rm-shell .rm-time-fast, .rm-shell .rm-timeline td.rm-time-fast { background:#ffe6cc; color:#93520f; font-weight:600; }
.rm-shell .rm-time-slow, .rm-shell .rm-timeline td.rm-time-slow { background:#e9dff6; color:#68449a; font-weight:600; }
.rm-shell .rm-time-shortage, .rm-shell .rm-timeline td.rm-time-shortage { background:#fbe0dd; color:#a13731; font-weight:600; }
.rm-shell .rm-timeline td.rm-time-unknown { color:#9aa4ae; }
.rm-shell .rm-time-footer { display:flex; align-items:center; flex-wrap:wrap; gap:10px; padding:12px 14px; font-size:12px; color:var(--rm-muted); }
.rm-shell .rm-time-footer > span:first-child { margin-right:auto; }
@media(max-width:700px) { .rm-shell .rm-forecast-controls { gap:10px; } .rm-shell .rm-forecast-controls label { width:100%; } .rm-shell .rm-forecast-controls select { flex:1; } .rm-shell .rm-time-legend small { flex-basis:100%; } }
.rm-shell .rm-forecast-controls .rm-segment { display:flex; padding:3px; border:1px solid #dbe3eb; border-radius:7px; background:#f1f5f9; }
.rm-shell .rm-forecast-controls .rm-segment button { padding:7px 12px; border:0; border-radius:5px; color:#687c8e; font-size:12px; }
.rm-shell .rm-forecast-controls .rm-segment button[aria-pressed="true"] { background:#fff; color:#245c4f; box-shadow:0 1px 3px #163a3020; }

.rm-shell .rm-page-size { display:flex; align-items:center; gap:6px; white-space:nowrap; font-size:12px; color:var(--rm-muted); }
.rm-shell .rm-page-size select { min-width:80px; width:auto; }
.rm-shell .rm-selection-bar button:disabled { opacity:.45; cursor:not-allowed; }

/* Import stays in the spreadsheet page, with a bounded preview before any write. */
.rm-import-panel { margin: 12px 16px; padding: 16px; border: 1px solid #b6cfc4; border-radius: 8px; background: #fbfdfc; }
.rm-import-head,.rm-import-footer { display:flex; gap:16px; align-items:center; justify-content:space-between; }
.rm-import-panel h3 { margin:0; font-size:16px; }
.rm-import-panel p { margin:12px 0; line-height:1.6; }
.rm-import-file { display:flex; gap:16px; align-items:center; padding:10px 0; }
.rm-import-panel small { display:block; color:#687b74; line-height:1.6; }
.rm-import-scroll { overflow:auto; max-height:390px; margin:12px 0; border:1px solid #e0e8e3; }
.rm-import-scroll table { border-collapse:collapse; width:100%; min-width:1100px; font-size:12px; }
.rm-import-scroll th,.rm-import-scroll td { text-align:left; padding:9px 12px; border:1px solid #e0e8e3; min-width:65px; max-width:280px; }
.rm-import-scroll th { position:sticky; top:0; background:#eef4f0; z-index:1; white-space:nowrap; }
.rm-import-error { color:#b63f32; }
.rm-import-panel .rm-import-warning { color:#97652e; }

.rm-group-head { display:flex;align-items:center;gap:16px;padding:16px;background:#f7faf8;border-bottom:1px solid #e0e8e3;flex-wrap:wrap; }
.rm-group-head label { display:flex;align-items:center;gap:12px;flex:1;min-width:250px; }
.rm-group-head input { padding:9px 12px;border:1px solid #cbdcd3;border-radius:6px;min-width:220px;flex:1;max-width:520px; }
.rm-shipment-list { width:100%;border-collapse:collapse;font-size:13px; }
.rm-shipment-list th,.rm-shipment-list td { padding:16px;text-align:left;border-bottom:1px solid #e6ece8; }
.rm-shipment-list th { background:#f1f6f3;color:#6b8075;font-size:12px; }
.rm-shipment-list td:first-child { min-width:260px; }
.rm-shipment-list button { margin-right:14px; }

.rm-multiple-timelines { padding:0 14px; }
.rm-multiple-timeline { border:1px solid #dce6e0;border-radius:8px;overflow:hidden;margin:0 0 24px;background:#fff; }
.rm-multiple-timeline .rm-time-overview { margin:0;border-width:0 0 1px;border-radius:0; }
.rm-multiple-timeline .rm-time-scroll { max-height:520px; }
