Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
File size: 14,720 Bytes
07a68d0 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 | /* S79-T22: the Restock planner App screen. Tokens only. The dispatcher draws the frame; this is its body. */
.rp-app {
position: relative;
display: flex;
flex-direction: column;
flex: 1 1 0;
min-width: 0;
min-height: 0;
overflow: hidden;
background: var(--lp-surface);
color: var(--lp-ink);
font-size: var(--lp-fs-sm);
}
.rp-scroll {
container: rp / inline-size;
flex: 1 1 0;
min-height: 0;
overflow-x: hidden;
overflow-y: auto;
display: flex;
flex-direction: column;
gap: 12px;
}
/* The scroll box scrolls; its rows never shrink into each other. */
.rp-scroll > * { flex-shrink: 0; }
/* Buttons reset native chrome first (DESIGN.md §4). */
.rp-tab,
.rp-button,
.rp-link,
.rp-open {
border: 0;
background: transparent;
font: inherit;
color: inherit;
cursor: pointer;
}
.rp-tabs {
display: flex;
flex-wrap: wrap;
gap: 4px;
padding-bottom: 8px;
border-bottom: var(--lp-hairline-width) solid var(--lp-line);
}
.rp-tab {
display: inline-flex;
align-items: center;
gap: 8px;
min-height: 32px;
padding: 0 12px;
border-radius: var(--lp-r-md);
color: var(--lp-muted);
font-size: var(--lp-fs-xs);
white-space: nowrap;
}
.rp-tab:hover { background: var(--lp-wash); color: var(--lp-ink); }
.rp-tab.is-active { background: var(--lp-blue-tint); color: var(--lp-ink); font-weight: var(--lp-fw-semibold); }
.rp-count {
color: var(--lp-muted);
font-weight: 400;
font-variant-numeric: tabular-nums;
}
.rp-bar {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 8px 16px;
min-height: 32px;
}
.rp-bar-end {
display: flex;
align-items: center;
gap: 12px;
margin-left: auto;
font-size: var(--lp-fs-xs);
}
.rp-body {
display: flex;
flex-direction: column;
gap: 12px;
min-width: 0;
}
.rp-button {
min-height: 32px;
padding: 0 12px;
border-radius: var(--lp-r-sm);
background: var(--lp-wash);
color: var(--lp-ink);
font-size: var(--lp-fs-xs);
transition: transform var(--lp-motion-feedback-duration) var(--lp-motion-feedback-easing),
opacity var(--lp-motion-feedback-duration) var(--lp-motion-feedback-easing);
}
.rp-button.is-primary {
background: var(--lp-primary);
color: var(--lp-surface);
font-weight: var(--lp-fw-semibold);
}
.rp-button.is-primary:hover:not(:disabled) { background: var(--lp-primary-hover); }
.rp-button.is-quiet { background: transparent; color: var(--lp-muted); }
.rp-button.is-quiet:hover { background: var(--lp-wash); color: var(--lp-ink); }
.rp-button:active:not(:disabled) { transform: scale(0.97); }
.rp-button:disabled { opacity: var(--lp-home-disabled-opacity); cursor: default; }
.rp-link {
padding: 0;
color: var(--lp-blue-deep);
text-decoration: underline;
}
.rp-open {
padding: 0;
text-align: left;
color: var(--lp-ink);
font-weight: 500;
overflow-wrap: anywhere;
}
.rp-open:hover { color: var(--lp-blue-deep); text-decoration: underline; }
.rp-field { display: inline-flex; align-items: center; gap: 8px; }
.rp-field-label { color: var(--lp-muted); font-size: var(--lp-fs-xs); }
.rp-field-value { font-size: var(--lp-fs-xs); }
.rp-select {
min-height: 32px;
height: 32px;
min-width: 152px;
max-width: 100%;
box-sizing: border-box;
padding: 0 8px;
border: var(--lp-hairline-width) solid var(--lp-line-strong);
border-radius: var(--lp-r-sm);
background: var(--lp-surface);
color: var(--lp-ink);
font: inherit;
font-size: var(--lp-fs-xs);
}
.rp-input {
min-height: 32px;
height: 32px;
box-sizing: border-box;
padding: 0 8px;
border: var(--lp-hairline-width) solid var(--lp-line-strong);
border-radius: var(--lp-r-sm);
background: var(--lp-surface);
color: var(--lp-ink);
font: inherit;
font-size: var(--lp-fs-xs);
}
.rp-input::placeholder { color: var(--lp-muted); }
.rp-search { flex: 0 1 280px; min-width: 0; width: 280px; max-width: 100%; }
.rp-tab:focus-visible,
.rp-button:focus-visible,
.rp-link:focus-visible,
.rp-open:focus-visible,
.rp-select:focus-visible,
.rp-input:focus-visible {
outline: 2px solid var(--lp-blue-deep);
outline-offset: 2px;
}
.rp-empty { margin: 0; color: var(--lp-ink); }
.rp-error { margin: 0; color: var(--lp-red-deep); }
.rp-muted { margin: 0; color: var(--lp-muted); font-size: var(--lp-fs-xs); }
.rp-nowrap { white-space: nowrap; }
.rp-notice { margin: 0; color: var(--lp-ink); font-size: var(--lp-fs-xs); }
.rp-notices {
margin: 0;
padding: 0;
list-style: none;
color: var(--lp-ink);
font-size: var(--lp-fs-xs);
}
.rp-waiting { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
/* The SKU list: text left, quantities right with tabular numerals. Wide content scrolls in its own box. */
.rp-table-wrap { min-width: 0; overflow-x: auto; }
.rp-table {
width: 100%;
min-width: 960px;
table-layout: fixed;
border-collapse: collapse;
font-size: var(--lp-fs-xs);
}
.rp-table th {
text-align: left;
font-weight: 500;
color: var(--lp-muted);
padding: 8px;
border-bottom: var(--lp-hairline-width) solid var(--lp-line);
}
.rp-table td {
padding: 8px;
vertical-align: top;
border-bottom: var(--lp-hairline-width) solid var(--lp-line);
}
.rp-table .is-num,
.rp-mini .is-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rp-col-product { width: 19%; }
.rp-col-num { width: 9%; }
.rp-col-days { width: 17%; }
.rp-col-date { width: 8%; }
.rp-col-status { width: 11%; }
.rp-col-owner { width: 9%; }
.rp-row:hover td { background: var(--lp-wash); }
.rp-row.is-gone .rp-open,
.rp-row.is-gone td { color: var(--lp-muted); }
.rp-sku {
display: block;
color: var(--lp-muted);
font-size: var(--lp-fs-2xs);
overflow-wrap: anywhere;
}
.rp-c-owner { overflow-wrap: anywhere; }
.rp-pill {
display: inline-block;
padding: 0 8px;
border-radius: var(--lp-r-pill);
background: var(--lp-wash);
color: var(--lp-ink);
font-size: var(--lp-fs-2xs);
line-height: var(--lp-lh);
white-space: nowrap;
}
.rp-pill.is-open { background: var(--lp-blue-tint); color: var(--lp-blue-deep); }
.rp-pill.is-accepted,
.rp-pill.is-ordered,
.rp-pill.is-sent-to-fba { background: var(--lp-yellow-tint); color: var(--lp-ink); }
.rp-pill.is-done { background: var(--lp-green-tint); color: var(--lp-green-deep); }
.rp-pill.is-watching,
.rp-pill.is-dismissed { background: var(--lp-wash); color: var(--lp-muted); }
.rp-tag {
display: inline-block;
margin-left: 8px;
padding: 0 4px;
border: var(--lp-hairline-width) solid var(--lp-line);
border-radius: var(--lp-r-sm);
color: var(--lp-muted);
font-size: var(--lp-fs-2xs);
line-height: var(--lp-lh);
}
.rp-more { display: flex; justify-content: center; }
/* Days of supply meter: the track is zoned in tints at the server thresholds, the bar on top wears the deep
zone colour, and a tick marks each threshold. Level never rides hue alone: position, number weight, words. */
.rp-days {
display: inline-flex;
align-items: center;
justify-content: flex-end;
gap: 8px;
width: 100%;
min-width: 0;
}
.rp-days-num { min-width: 3ch; text-align: right; font-variant-numeric: tabular-nums; }
.rp-days-num.is-critical { color: var(--lp-red-deep); font-weight: var(--lp-fw-semibold); }
.rp-days-none { color: var(--lp-muted); white-space: nowrap; }
.rp-meter {
position: relative;
display: inline-flex;
flex-direction: column;
min-width: 0;
}
.rp-meter.is-cell { flex: 0 1 128px; }
/* The mini meter never shrinks: a narrow History column must not squeeze it into marks. */
.rp-meter.is-mini { flex: none; width: 72px; min-width: 72px; }
.rp-meter.is-wide { width: 100%; padding-top: 4px; }
.rp-meter-track {
position: relative;
display: flex;
height: 8px;
}
.rp-meter.is-mini .rp-meter-track { height: 6px; }
.rp-meter.is-wide .rp-meter-track { height: 10px; }
.rp-meter-zone { height: 100%; }
.rp-meter-zone.is-critical { background: var(--lp-red-tint); border-radius: var(--lp-r-sm) 0 0 var(--lp-r-sm); }
.rp-meter-zone.is-healthy { background: var(--lp-green-tint); }
.rp-meter-zone.is-overstock { background: var(--lp-yellow-tint); border-radius: 0 var(--lp-r-sm) var(--lp-r-sm) 0; }
.rp-meter-bar {
position: absolute;
top: 0;
bottom: 0;
left: 0;
border-radius: var(--lp-r-sm);
}
.rp-meter.is-critical .rp-meter-bar { background: var(--lp-red-deep); }
.rp-meter.is-healthy .rp-meter-bar { background: var(--lp-green-deep); }
.rp-meter.is-overstock .rp-meter-bar { background: var(--lp-yellow-deep); }
.rp-meter-tick {
position: absolute;
top: -2px;
bottom: -2px;
width: 2px;
margin-left: -1px;
background: var(--lp-ink);
}
/* A value past twice the Overstock threshold fills the bar and shows a small cap past its end. */
.rp-meter.is-past .rp-meter-track::after {
content: "";
position: absolute;
top: 50%;
right: -6px;
transform: translateY(-50%);
border-top: 4px solid transparent;
border-bottom: 4px solid transparent;
border-left: 4px solid var(--lp-yellow-deep);
}
.rp-meter-labels {
position: relative;
display: block;
height: 16px;
margin-top: 2px;
color: var(--lp-muted);
font-size: var(--lp-fs-2xs);
font-variant-numeric: tabular-nums;
}
.rp-meter-labels span { position: absolute; top: 0; transform: translateX(-50%); }
.rp-fact.rp-fact-meter .rp-meter { grid-column: 1 / -1; }
.rp-legend {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 4px 12px;
margin: 0;
padding: 0;
list-style: none;
color: var(--lp-muted);
font-size: var(--lp-fs-2xs);
}
.rp-legend-item { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.rp-legend-swatch {
position: relative;
width: 16px;
height: 8px;
border-radius: var(--lp-r-sm);
}
.rp-legend-swatch::before {
content: "";
position: absolute;
top: 0;
bottom: 0;
left: 0;
width: 8px;
border-radius: var(--lp-r-sm);
}
.rp-legend-item.is-critical .rp-legend-swatch { background: var(--lp-red-tint); }
.rp-legend-item.is-critical .rp-legend-swatch::before { background: var(--lp-red-deep); }
.rp-legend-item.is-healthy .rp-legend-swatch { background: var(--lp-green-tint); }
.rp-legend-item.is-healthy .rp-legend-swatch::before { background: var(--lp-green-deep); }
.rp-legend-item.is-overstock .rp-legend-swatch { background: var(--lp-yellow-tint); }
.rp-legend-item.is-overstock .rp-legend-swatch::before { background: var(--lp-yellow-deep); }
.rp-skeleton-rows { display: flex; flex-direction: column; gap: 8px; }
.rp-skeleton {
height: 32px;
border-radius: var(--lp-r-sm);
background: var(--lp-wash);
}
/* The SKU drawer: right side, inside the App panel, over the list. */
.rp-drawer {
container: rpdrawer / inline-size;
position: absolute;
top: 0;
right: 0;
bottom: 0;
width: min(400px, 100%);
box-sizing: border-box;
display: flex;
flex-direction: column;
gap: 12px;
padding: 16px;
overflow-y: auto;
background: var(--lp-panel);
border-left: var(--lp-hairline-width) solid var(--lp-line);
box-shadow: var(--lp-panel-shadow);
z-index: 2;
animation: rp-drawer-in var(--lp-motion-feedback-duration) var(--lp-motion-feedback-easing) both;
}
@keyframes rp-drawer-in {
from { opacity: 0; transform: translateX(16px); }
to { opacity: 1; transform: none; }
}
.rp-drawer-head { display: flex; align-items: flex-start; gap: 8px; }
.rp-drawer-titles { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rp-drawer-title {
margin: 0;
font-size: var(--lp-fs-md);
font-weight: var(--lp-fw-semibold);
overflow-wrap: anywhere;
}
.rp-drawer-sub { color: var(--lp-muted); font-size: var(--lp-fs-xs); overflow-wrap: anywhere; }
.rp-reason { margin: 0; font-size: var(--lp-fs-xs); }
.rp-controls { display: flex; flex-direction: column; gap: 8px; }
.rp-controls .rp-field { justify-content: space-between; }
.rp-controls .rp-select { min-width: 200px; }
.rp-facts { margin: 0; display: flex; flex-direction: column; font-size: var(--lp-fs-xs); }
.rp-fact {
display: grid;
grid-template-columns: minmax(0, 1fr) auto;
gap: 8px;
padding: 6px 0;
border-bottom: var(--lp-hairline-width) solid var(--lp-line);
}
.rp-fact dt { color: var(--lp-muted); }
.rp-fact dd { margin: 0; overflow-wrap: anywhere; }
.rp-fact dd.is-num { text-align: right; font-variant-numeric: tabular-nums; }
.rp-section { display: flex; flex-direction: column; gap: 4px; }
.rp-heading { margin: 0; font-size: var(--lp-fs-sm); font-weight: var(--lp-fw-semibold); }
.rp-mini {
width: 100%;
border-collapse: collapse;
font-size: var(--lp-fs-xs);
}
.rp-mini th {
text-align: left;
font-weight: 500;
color: var(--lp-muted);
padding: 4px 0;
border-bottom: var(--lp-hairline-width) solid var(--lp-line);
}
.rp-mini td {
padding: 4px 0;
border-bottom: var(--lp-hairline-width) solid var(--lp-line);
overflow-wrap: anywhere;
}
.rp-mini th + th,
.rp-mini td + td { padding-left: 8px; }
.rp-history { table-layout: auto; }
.rp-history .rp-h-days { white-space: nowrap; overflow-wrap: normal; }
.rp-history .rp-h-days .rp-days { width: auto; }
/* A full-width drawer on a phone leaves no room for Band beside the meter; the meter's words carry the level. */
@container rpdrawer (max-width: 340px) {
.rp-history .rp-h-band { display: none; }
}
@media (prefers-reduced-motion: reduce) {
.rp-button { transition: none; }
.rp-button:active:not(:disabled) { transform: none; }
.rp-drawer { animation: none; }
}
/* Narrow panel (390 px phone): each SKU row stacks into a card of label and value pairs. */
@container rp (max-width: 640px) {
.rp-table-wrap { overflow-x: visible; }
.rp-table,
.rp-table tbody { display: block; width: 100%; min-width: 0; }
.rp-table colgroup,
.rp-table thead { display: none; }
.rp-table tr.rp-row {
display: grid;
grid-auto-flow: row dense;
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
column-gap: 16px;
padding: 8px 0;
border-bottom: var(--lp-hairline-width) solid var(--lp-line);
}
.rp-table td { display: flex; justify-content: space-between; gap: 8px; padding: 2px 0; border: 0; min-width: 0; }
.rp-table td.rp-c-product { display: block; grid-column: 1 / -1; padding-bottom: 4px; }
.rp-table td[data-label]::before { content: attr(data-label); color: var(--lp-muted); white-space: nowrap; }
.rp-table td[data-label]:empty { display: none; }
.rp-table td.rp-c-status { justify-content: flex-start; }
.rp-table td.rp-c-days { grid-column: 1 / -1; align-items: center; }
.rp-table td.rp-c-days .rp-days { width: auto; flex: 0 1 180px; }
.rp-table td.rp-c-owner { justify-content: flex-end; color: var(--lp-muted); }
.rp-bar-end { margin-left: 0; }
.rp-search { flex: 1 1 100%; width: 100%; }
.rp-drawer { width: 100%; }
.rp-controls .rp-select { min-width: 0; flex: 1 1 auto; }
}
|