/* Stock: shelf-led. Hero = live stock list on the left, text on the right; a ledger of one product's week;
   a warm "label printer" band with the sticker designer; where alerts appear. */

.st-hero { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 5vw; align-items: center; padding-top: 124px; padding-bottom: clamp(40px, 7vh, 80px); min-height: min(94vh, 900px) }
.st-hero .shelf { order: -1 }
.st-hero .h-xl { font-size: clamp(36px, 4.1vw, 62px) }

/* the shelf */
.shelf { border: 1px solid var(--border); border-radius: 16px; background: #fff; padding: 20px 22px 18px; box-shadow: 0 50px 90px -60px rgba(31,35,40,.5) }
.sh-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px }
.sh-top div { display: flex; align-items: center; gap: 10px } .sh-top .tag { margin: 0 } .sh-top b { font-size: 18px }
.sh-hint { margin: 10px 0 12px; font-size: 15px; color: var(--muted) }
.sh-alert { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-bottom: 10px; padding: 11px 14px; border-radius: 10px; background: #FFF4E5; border: 1px solid #F6D9A8; color: #6B3E00; font-weight: 600; font-size: 15px }
.sh-alert.ok { background: #EEF8F3; border-color: #CBEBDD; color: #0B6B50 } .sh-alert.ok .sh-al-k { background: #0B7A5B }
.sh-al-k { padding: 3px 8px; border-radius: 6px; background: #9A5B00; color: #fff; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase }
.sh-list { list-style: none; margin: 0; padding: 0 }
.sh-row { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) 76px auto; gap: 14px; align-items: center; padding: 11px 8px; margin: 0 -8px; border-radius: 10px; border-bottom: 1px solid var(--border); transition: background .2s }
.sh-row:last-child { border-bottom: 0 }
.sh-row.sel { background: #F2F8FF }
.sh-name { all: unset; cursor: pointer; display: grid; gap: 1px; min-width: 0 }
.sh-name b { font-size: 15.5px; color: var(--ink) } .sh-name small { font-size: 12.5px; color: var(--faint) }
.sh-name:focus-visible { outline: 3px solid var(--sky-dark); outline-offset: 3px; border-radius: 4px }
.sh-bar { position: relative; height: 10px; border-radius: 99px; background: #EAF1F8 }
.sh-bar i { position: absolute; inset: 0 auto 0 0; border-radius: 99px; background: var(--sky); transition: width .35s cubic-bezier(.2,.7,.2,1), background .2s }
.sh-bar em { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: var(--ink); opacity: .55 }
.sh-n { font-weight: 700; font-size: 15px; text-align: right; white-space: nowrap }
.sh-sell { padding: 9px 12px; font-size: 14px }
.sh-row.low .sh-bar i { background: var(--red) } .sh-row.low .sh-n { color: var(--red) }
.sh-row.low .sh-name b::after { content: "Low"; margin-left: 8px; padding: 2px 6px; border-radius: 5px; background: #FDECEC; color: var(--red); font-size: 11px; font-weight: 700; vertical-align: 2px }
.sh-limit { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--border); font-size: 14.5px; color: var(--muted) }
.stepper { display: inline-flex; align-items: center; gap: 10px } .stepper .kb { width: 36px; height: 36px; padding: 0; font-size: 18px }
.stepper b { min-width: 24px; text-align: center; font-size: 18px; color: var(--ink) }
.sh-reset { all: unset; cursor: pointer; margin-left: auto; color: var(--link); font-weight: 600 } .sh-reset:hover { text-decoration: underline }
.sh-reset:focus-visible { outline: 3px solid var(--sky-dark); outline-offset: 2px }

/* one product's week, as a ledger */
.mv-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 5vw; align-items: end; margin-bottom: 30px } .mv-head .lead { margin: 0 }
.mv-table { width: 100%; max-width: 980px; border-collapse: collapse; font-size: 16.5px }
.mv-table caption { text-align: left; font-weight: 700; color: var(--faint); font-size: 14px; padding-bottom: 10px }
.mv-table th { text-align: left; font-size: 12.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--faint); padding: 10px 16px 10px 0; border-bottom: 2px solid var(--ink) }
.mv-table td { padding: 14px 16px 14px 0; border-bottom: 1px solid var(--border); vertical-align: top }
.mv-table td small { display: block; color: var(--faint); font-size: 13.5px }
.mv-table .num { text-align: right } .mv-ch { font-weight: 700 }
.mv-in .mv-ch { color: #0B7A5B } .mv-out .mv-ch { color: var(--red) }
.mv-table tbody tr:last-child td { border-bottom: 2px solid var(--ink) }
.st-moves .eg { margin-top: 12px }

/* sticker designer, on a warm paper band */
.st-stick { background: #FBF5EA; border-top: 1px solid #EFE4CF; border-bottom: 1px solid #EFE4CF }
.sk-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6vw; align-items: center; padding-top: clamp(60px, 9vh, 100px); padding-bottom: clamp(60px, 9vh, 100px) }
.sk-opts { margin: 26px 0 0; padding: 0; border: 0; display: grid; grid-template-columns: repeat(2, minmax(0, max-content)); gap: 12px 28px }
.sk-opts legend { padding: 0; margin-bottom: 12px; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #7A6440 }
.sk-opts label { display: flex; align-items: center; gap: 10px; font-size: 16.5px; color: #3D2E16; cursor: pointer }
.sk-opts input { width: 18px; height: 18px; accent-color: var(--ink) }
.sk-vis { display: grid; justify-items: center; gap: 14px }
.stk { margin: 0; width: min(360px, 100%); padding: 18px 22px 16px; background: #fff; border-radius: 6px; outline: 2px dashed #D5C6A6; outline-offset: 8px; box-shadow: 0 30px 50px -30px rgba(80,55,20,.45); transform: rotate(-1.5deg); color: #111; text-align: center }
.stk [hidden] { display: none !important }
.stk-shop { font-size: 12px; font-weight: 800; letter-spacing: .14em; padding-bottom: 8px; margin-bottom: 8px; border-bottom: 1px solid #ddd }
.stk-name b { display: block; font-size: 19px } .stk-te { display: block; font-size: 16px; color: #333; margin-top: 2px }
.stk-bars { display: block; width: 100%; height: 70px; margin: 12px 0 2px }
.stk-code { font-size: 14px; letter-spacing: .2em }
.stk-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; margin-top: 8px; font-size: 12.5px; color: #333 }

/* where alerts appear */
.al-list { list-style: none; margin: 34px 0 0; padding: 0; max-width: 980px; border-top: 1px solid var(--border) }
.al-list li { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px; padding: 20px 0; border-bottom: 1px solid var(--border) }
.al-where { font-weight: 800; font-size: 19px; color: var(--ink) } .al-list p { margin: 0; color: var(--muted) }

@media (max-width: 980px) {
  .st-hero { grid-template-columns: minmax(0, 1fr); padding-top: 104px; min-height: 0; gap: 26px } .st-hero .shelf { order: 0 }
  .shelf { padding: 16px 14px } .sh-row { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; padding: 10px 6px; margin: 0 -6px }
  .sh-name { grid-row: 1; grid-column: 1 } .sh-sell { grid-row: 1; grid-column: 2 } .sh-bar { grid-row: 2; grid-column: 1 } .sh-n { grid-row: 2; grid-column: 2; font-size: 14px }
  .mv-head { grid-template-columns: minmax(0, 1fr); gap: 12px } .mv-table { font-size: 15px } .mv-table td:first-child { white-space: nowrap }
  .sk-in { grid-template-columns: minmax(0, 1fr); gap: 34px } .sk-opts { grid-template-columns: minmax(0, 1fr) }
  .al-list li { grid-template-columns: minmax(0, 1fr); gap: 6px }
}
@media (prefers-reduced-motion: reduce) { .sh-bar i, .sh-row { transition: none } }
