/* Stock windows — stellar purple, matching the overview. */
body[data-app="admin"] .stellar-stock-window{padding:20px!important;background:rgba(12,7,19,.76)!important;backdrop-filter:blur(8px);align-items:center!important;justify-content:center!important}
body[data-app="admin"] .stellar-stock-window .admin-modal-content{width:min(720px,100%)!important;max-width:720px!important;max-height:calc(100dvh - 40px)!important;margin:0!important;padding:0!important;overflow:hidden!important;border:1px solid #694883!important;border-radius:22px!important;background:#24172f!important;box-shadow:0 30px 100px #0a061bb3!important;color:#f5eafa}
.stellar-stock-window .admin-modal-content>div{display:flex;flex-direction:column;max-height:calc(100dvh - 42px);min-height:0}
body[data-app="admin"] .stellar-stock-window .starby-stock-modal-head{flex:none;padding:24px 64px 22px 24px!important;gap:14px;background:radial-gradient(ellipse at top left,#533268 0,transparent 75%),#2f1d40;border-bottom:1px solid #513462!important;margin:0!important}
.stellar-stock-window .stock-window-kicker{display:block;color:#c5a4dc;font-size:9px;font-weight:700;letter-spacing:1.6px;margin-bottom:7px}
body[data-app="admin"] .stellar-stock-window .starby-stock-modal-head h2{font-size:25px!important;line-height:1.2;letter-spacing:-.6px;color:#f8efff!important;margin:0!important;overflow-wrap:anywhere}
body[data-app="admin"] .stellar-stock-window .starby-stock-modal-head p{color:#c4adcf!important;font-size:12px;line-height:1.5;margin:7px 0 0!important}
body[data-app="admin"] .stellar-stock-window .starby-stock-modal-icon{flex:0 0 44px;width:44px;height:44px;border-radius:13px;background:#684386!important;border:1px solid #9164ae;box-shadow:none!important;color:#edd8ff;font-size:25px}
body[data-app="admin"] .stellar-stock-window .modal-close{top:17px!important;right:17px!important;width:32px!important;height:32px!important;min-height:32px!important;padding:0!important;border-radius:10px!important;border:1px solid #78548e!important;background:#422b55!important;color:#e5cdef!important;box-shadow:none!important;font-size:22px!important;line-height:1!important}
.stellar-stock-window .stock-window-scroll{overflow-y:auto;min-height:0;padding:20px 24px;scrollbar-width:thin;scrollbar-color:#7e5596 #24172f;overscroll-behavior:contain}
.stellar-stock-window .stock-window-scroll::-webkit-scrollbar{width:6px}
.stellar-stock-window .stock-window-scroll::-webkit-scrollbar-thumb{background:#7e5596;border-radius:8px}
body[data-app="admin"] .stellar-stock-window .starby-stock-form{display:grid;grid-template-columns:1fr!important;gap:14px;margin:0!important}
.stellar-stock-window .stock-window-section{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;padding:18px;border:1px solid #503360;border-radius:15px;background:#2b1b38;min-width:0}
.stellar-stock-window .stock-window-section h3{grid-column:1/-1;margin:0 0 2px;font-size:13px;font-weight:650;color:#ead5f7}
body[data-app="admin"] .stellar-stock-window .starby-stock-form label{font-size:11px!important;font-weight:600!important;gap:8px!important;color:#d6bfe4!important;min-width:0}
.stellar-stock-window .full,.stellar-stock-window .stock-window-hint{grid-column:1/-1!important}
body[data-app="admin"] .stellar-stock-window input,body[data-app="admin"] .stellar-stock-window select,body[data-app="admin"] .stellar-stock-window textarea{box-sizing:border-box!important;width:100%!important;min-width:0!important;margin:0!important;padding:11px 12px!important;min-height:42px;border:1px solid #66457d!important;border-radius:9px!important;background:#20142c!important;color:#f5eafa!important;font:inherit;font-size:13px!important;box-shadow:none!important;color-scheme:dark}
body[data-app="admin"] .stellar-stock-window textarea{min-height:66px!important;resize:vertical}
.stellar-stock-window input::placeholder,.stellar-stock-window textarea::placeholder{color:#a58bb8!important}
body[data-app="admin"] .stellar-stock-window :is(input,select,textarea,button):focus-visible{outline:2px solid #c59be5!important;outline-offset:3px}
.stellar-stock-window label small,.stellar-stock-window .stock-window-hint{color:#bda3cf;font-size:11px;line-height:1.6;font-weight:400;margin:0}
body[data-app="admin"] .stellar-stock-window .starby-stock-balance-card{margin:0!important;background:#352242!important;border:1px solid #604078!important;border-radius:11px!important;padding:14px!important;display:flex;align-items:center;justify-content:space-between;gap:12px}
.stellar-stock-window .starby-stock-balance-card>div{display:grid;gap:5px;min-width:0}
body[data-app="admin"] .stellar-stock-window .starby-stock-balance-card strong{color:#f3ddff!important;font-size:23px!important}
body[data-app="admin"] .stellar-stock-window :is(.starby-stock-balance-card,.starby-stock-sum-preview) :is(span,small){color:#c7acd8;font-size:11px}
body[data-app="admin"] .stellar-stock-window .starby-stock-sum-preview{display:grid;grid-template-columns:1fr auto;gap:10px;margin:0!important;padding:14px!important;background:#392448!important;border:1px solid #75508c!important;border-radius:11px!important}
body[data-app="admin"] .stellar-stock-window .starby-stock-sum-preview strong{color:#edcfff!important;font-size:15px}
.stellar-stock-window .starby-stock-sum-preview small{grid-column:1/-1;line-height:1.5}
body[data-app="admin"] .stellar-stock-window .starby-stock-modal-actions{position:static!important;flex:none;display:flex;flex-wrap:wrap;gap:8px;margin:0!important;padding:15px 24px!important;background:#2c1b39!important;border-top:1px solid #513462!important}
body[data-app="admin"] .stellar-stock-window .starby-stock-modal-actions button{min-height:40px!important;padding:10px 16px!important;border-radius:9px!important;background:#7445a5!important;border:1px solid #a978d0!important;color:#fff!important;box-shadow:none!important;font-size:12px!important;font-weight:600!important}
body[data-app="admin"] .stellar-stock-window .starby-stock-modal-actions :is(.secondary,.starby-stock-subtract-action){background:#3a264b!important;border-color:#705087!important;color:#e7cfef!important}
body[data-app="admin"] .stellar-stock-window .starby-stock-modal-actions .danger-btn{background:#452637!important;border-color:#80516a!important;color:#efb2c8!important}
body[data-app="admin"] .stellar-stock-window button:hover{filter:brightness(1.13)}
body[data-app="admin"] .stellar-stock-window :is(.starby-item-detail-status,.starby-item-detail-grid){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:0 0 16px;padding:16px;background:#332040!important;border:1px solid #604078!important;border-radius:13px}
.stellar-stock-window .starby-item-detail-status>div,.stellar-stock-window .starby-item-detail-grid>div{display:grid;gap:7px;padding:8px!important;background:transparent!important;border:0!important;min-width:0}
body[data-app="admin"] .stellar-stock-window .starby-item-detail-status strong{font-size:22px!important;color:#eed5ff!important}
body[data-app="admin"] .stellar-stock-window .starby-item-detail-grid strong{font-size:13px;color:#eddaF7}
.stellar-stock-window .starby-item-detail-status span,.stellar-stock-window .starby-item-detail-grid span{font-size:11px;color:#c1a4d2}
body[data-app="admin"] .stellar-stock-window :is(.starby-item-related,.starby-item-movements){margin:16px 0 0;padding:16px;border:1px solid #503360;border-radius:13px;background:#2b1b38}
.stellar-stock-window :is(.starby-item-related,.starby-item-movements) h3{margin:0 0 12px;color:#ead5f7;font-size:13px}
.stellar-stock-window :is(.starby-item-related,.starby-item-movements) p{color:#bda3cf;font-size:12px;line-height:1.6}
.stellar-stock-window .starby-item-movements article{border-color:#503360!important;padding:12px 0!important}
.stellar-stock-window .starby-item-movements small{color:#bda3cf!important}
body[data-app="admin"] .stellar-stock-window .starby-item-related span{background:#493058;border-color:#77528c;color:#e6cbee}
@media(max-width:560px){
 body[data-app="admin"] .stellar-stock-window{padding:10px!important}
 body[data-app="admin"] .stellar-stock-window .admin-modal-content{max-height:calc(100dvh - 20px)!important;border-radius:16px!important}
 .stellar-stock-window .admin-modal-content>div{max-height:calc(100dvh - 22px)}
 body[data-app="admin"] .stellar-stock-window .starby-stock-modal-head{padding:20px 52px 18px 16px!important;gap:10px}
 body[data-app="admin"] .stellar-stock-window .starby-stock-modal-head h2{font-size:21px!important}
 .stellar-stock-window .stock-window-kicker{font-size:8px;letter-spacing:1px}
 body[data-app="admin"] .stellar-stock-window .starby-stock-modal-icon{display:none}
 .stellar-stock-window .stock-window-scroll{padding:14px}
 .stellar-stock-window .stock-window-section{padding:14px;gap:12px;grid-template-columns:1fr}
 body[data-app="admin"] .stellar-stock-window .starby-stock-modal-actions{padding:12px 14px!important}
 body[data-app="admin"] .stellar-stock-window .starby-stock-modal-actions button{flex:1;padding:10px!important}
 .stellar-stock-window .starby-modal-spacer{display:none}
}

/* Movements are bound to the item used to open the window. */
.stellar-stock-window .stock-fixed-item{min-width:0;color:#f3ddff;font-size:18px;line-height:1.35;overflow-wrap:anywhere}
body[data-app="admin"] :is(#starbySumStockModal,#starbySubtractStockModal).stellar-stock-window .modal-close{
 background:#d51f35!important;border-color:#ff6376!important;color:#fff!important;box-shadow:0 0 10px #ff294338!important;
}
body[data-app="admin"] #starbySumStockModal.stellar-stock-window .starby-stock-modal-actions .starby-inventory-primary-button{
 background:#183e30!important;border-color:#49ad7d!important;color:#c0ffdd!important;box-shadow:0 0 14px #45d58c40,inset 0 0 8px #45d58c12!important;
}
body[data-app="admin"] #starbySumStockModal.stellar-stock-window .starby-stock-modal-actions .starby-inventory-primary-button:hover{background:#22533e!important;box-shadow:0 0 18px #45d58c66!important}
body[data-app="admin"] #starbySubtractStockModal.stellar-stock-window .starby-stock-modal-actions .starby-stock-subtract-confirm{
 background:#4e2030!important;border-color:#d35873!important;color:#ffd4dc!important;box-shadow:0 0 14px #f15b7840,inset 0 0 8px #f15b7812!important;
}
body[data-app="admin"] #starbySubtractStockModal.stellar-stock-window .starby-stock-modal-actions .starby-stock-subtract-confirm:hover{background:#67283b!important;box-shadow:0 0 18px #f15b7866!important}

/* Consistent close and primary actions for details and ingredient forms. */
body[data-app="admin"] :is(#starbyIngredientModal,#starbyItemDetailsModal).stellar-stock-window .modal-close{
 background:#d51f35!important;border-color:#ff6376!important;color:#fff!important;box-shadow:0 0 10px #ff294338!important;
}
body[data-app="admin"] #starbyIngredientModal.stellar-stock-window .starby-stock-modal-actions .starby-inventory-primary-button,
body[data-app="admin"] #starbyItemDetailsModal.stellar-stock-window .starby-stock-modal-actions .starby-inventory-add-button{
 background:#183e30!important;border-color:#49ad7d!important;color:#c0ffdd!important;box-shadow:0 0 14px #45d58c40,inset 0 0 8px #45d58c12!important;
}
body[data-app="admin"] #starbyIngredientModal.stellar-stock-window .starby-stock-modal-actions .starby-inventory-primary-button:hover,
body[data-app="admin"] #starbyItemDetailsModal.stellar-stock-window .starby-stock-modal-actions .starby-inventory-add-button:hover{
 background:#22533e!important;box-shadow:0 0 18px #45d58c66!important;
}
body[data-app="admin"] #starbyItemDetailsModal.stellar-stock-window .starby-stock-modal-actions .starby-stock-subtract-action{
 background:#4e2030!important;border-color:#d35873!important;color:#ffd4dc!important;box-shadow:0 0 14px #f15b7840,inset 0 0 8px #f15b7812!important;
}
body[data-app="admin"] #starbyItemDetailsModal.stellar-stock-window .starby-stock-modal-actions .starby-stock-subtract-action:hover{
 background:#67283b!important;box-shadow:0 0 18px #f15b7866!important;
}
