/* Smart item entry v6.25 — table-style, keyboard-first invoice/sales rows */
.smart-entry-panel{overflow:visible!important}
.smart-entry-panel .panel-head{margin-bottom:10px}
.smart-entry-guide{display:flex;flex-wrap:wrap;gap:7px 14px;margin:0 0 10px;padding:8px 10px;border:1px solid #dce7f2;border-radius:10px;background:#f8fbff;color:#60748a;font-size:10px}
.smart-entry-guide span{display:inline-flex;align-items:center;gap:4px;white-space:nowrap}
.smart-entry-guide kbd{display:inline-grid;min-width:23px;height:22px;place-items:center;padding:0 5px;border:1px solid #c9d6e5;border-bottom-width:2px;border-radius:5px;background:#fff;color:#183a61;font-family:inherit;font-size:9px;font-weight:900;box-shadow:0 1px 1px rgba(15,23,42,.04)}
.smart-entry-table{position:relative;overflow:visible;border:1px solid #b8cadc;border-radius:12px;background:#fff}
.smart-entry-head{display:grid;align-items:center;min-height:38px;padding:0 8px;border-bottom:1px solid #a9bdd1;border-radius:11px 11px 0 0;background:linear-gradient(180deg,#0e86ad,#08779c);color:#fff;font-size:10px;font-weight:900;text-align:center}
.smart-entry-head span{padding:0 5px;border-left:1px solid rgba(255,255,255,.22);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.smart-entry-head span:last-child{border-left:0}
.invoice-entry-head{grid-template-columns:38px 96px minmax(260px,1fr) 108px 78px 82px 112px 78px 128px 112px 38px}
.no-internal-cost .invoice-entry-head{grid-template-columns:38px 96px minmax(280px,1fr) 108px 78px 82px 112px 78px 112px 38px}
.daily-entry-head{grid-template-columns:38px minmax(320px,1fr) 82px 82px 118px 82px 112px 38px}
.smart-entry-table .invoice-items,.smart-entry-table .daily-sale-items{display:block!important}
.smart-entry-row{position:relative!important;display:grid!important;gap:0!important;align-items:stretch!important;margin:0!important;padding:0 8px!important;border:0!important;border-bottom:1px solid #cbd8e5!important;border-radius:0!important;background:#fff!important;box-shadow:none!important;overflow:visible!important}
.smart-entry-row:last-child{border-bottom:0!important;border-radius:0 0 11px 11px!important}
.smart-entry-row:nth-child(even){background:#f7fbfe!important}
.invoice-item-row.smart-entry-row{grid-template-columns:38px 96px minmax(260px,1fr) 108px 78px 82px 112px 78px 128px 112px 38px;grid-template-areas:"num type desc category qty unit price discount internal total remove"}
.no-internal-cost .invoice-item-row.smart-entry-row{grid-template-columns:38px 96px minmax(280px,1fr) 108px 78px 82px 112px 78px 112px 38px;grid-template-areas:"num type desc category qty unit price discount total remove"}
.daily-sale-row.smart-entry-row{grid-template-columns:38px minmax(320px,1fr) 82px 82px 118px 82px 112px 38px;grid-template-areas:"num desc qty unit price discount total remove"}
.smart-entry-row .field{display:flex!important;min-width:0!important;flex-direction:column!important;justify-content:center!important;gap:2px!important;margin:0!important;padding:5px 5px!important;border-left:1px solid #d7e1eb}
.smart-entry-row .field label{display:none!important}
.smart-entry-row .field input,.smart-entry-row .field select,.smart-entry-row .field textarea{width:100%!important;min-width:0!important;min-height:35px!important;height:35px!important;margin:0!important;padding:6px 8px!important;border:1px solid transparent!important;border-radius:5px!important;background:transparent!important;box-shadow:none!important;font-size:12px!important;line-height:1.5!important}
.smart-entry-row .field input:hover,.smart-entry-row .field select:hover{border-color:#bed0e2!important;background:#fff!important}
.smart-entry-row .field input:focus,.smart-entry-row .field select:focus{z-index:2;border-color:#0c8eb7!important;background:#fff!important;box-shadow:0 0 0 3px rgba(12,142,183,.13)!important}
.smart-entry-row .field select{background-position:left 8px center!important;padding-left:25px!important}
.smart-entry-row .item-stock,.smart-entry-row .daily-stock{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;clip-path:inset(50%)!important;white-space:nowrap!important;border:0!important}
.item-row-number,.daily-row-no{grid-area:num;align-self:stretch!important;width:auto!important;height:auto!important;min-width:0!important;margin:0!important;border-radius:0!important;background:transparent!important;color:#0b6092!important;display:grid!important;place-items:center!important;font-size:12px!important;font-weight:900!important;border-left:1px solid #d7e1eb}
.item-type{grid-area:type}.item-description{grid-area:desc}.item-category{grid-area:category}.item-qty{grid-area:qty}.item-unit{grid-area:unit}.item-price{grid-area:price}.item-discount{grid-area:discount}.item-internal{grid-area:internal}.item-line-total{grid-area:total}.invoice-row-remove{grid-area:remove}
.daily-description{grid-area:desc}.daily-qty{grid-area:qty}.daily-unit{grid-area:unit}.daily-price{grid-area:price}.daily-discount{grid-area:discount}.daily-line-total{grid-area:total}.daily-remove-row{grid-area:remove}
.smart-entry-row .item-description,.smart-entry-row .daily-description{position:relative}
.smart-entry-row [data-smart-item-search]{font-weight:750!important;color:#122f4e!important}
.smart-source-label{display:block;min-height:13px;margin:-1px 3px 0;color:#668197;font-size:8.5px;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.smart-source-label.is-stock{color:#087f5b}.smart-source-label.is-service{color:#8a5a08}.smart-source-label.is-warning{color:#b42318}
.item-internal{padding:5px!important;border:0!important;border-left:1px solid #d7e1eb!important;border-radius:0!important;background:transparent!important}
.item-internal small{display:none!important}
.item-line-total,.daily-line-total{align-self:stretch!important;min-width:0!important;margin:0!important;padding:5px!important;border:0!important;border-left:1px solid #d7e1eb!important;border-radius:0!important;background:transparent!important;display:grid!important;place-content:center!important;text-align:center!important;line-height:1.25!important;box-shadow:none!important}
.item-line-total small,.item-line-total span,.daily-line-total small,.daily-line-total span{font-size:8px!important;color:#668197!important}
.item-line-total b,.daily-line-total b{font-size:13px!important;color:#0c3c67!important;font-variant-numeric:tabular-nums}
.invoice-row-remove,.daily-remove-row{align-self:center!important;width:28px!important;height:28px!important;margin:0 auto!important;border:0!important;border-radius:6px!important;background:#fff1f2!important;color:#c32f43!important;font-size:17px!important;line-height:1!important}
.invoice-row-remove:hover,.daily-remove-row:hover{background:#ffe1e5!important}
.smart-item-menu{position:fixed;z-index:5000;display:none;width:min(690px,calc(100vw - 24px));max-height:min(430px,calc(100vh - 40px));overflow:hidden;border:1px solid #8fb0c8;border-radius:10px;background:#fff;box-shadow:0 22px 70px rgba(15,23,42,.24);direction:rtl}
.smart-item-menu.open{display:flex;flex-direction:column}
.smart-item-menu-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 10px;border-bottom:1px solid #b8cadb;background:linear-gradient(180deg,#0d87ae,#08789e);color:#fff}
.smart-item-menu-head b{font-size:11px}.smart-item-menu-head small{font-size:9px;color:#dff7ff}
.smart-item-qty-control{display:flex;align-items:center;gap:5px;direction:ltr}
.smart-item-qty-control button{width:29px;height:27px;border:1px solid rgba(255,255,255,.55);border-radius:5px;background:rgba(255,255,255,.13);color:#fff;font-size:17px;line-height:1;cursor:pointer}
.smart-item-qty-control output{min-width:42px;text-align:center;font-size:13px;font-weight:900;direction:ltr}
.smart-item-results{overflow:auto;overscroll-behavior:contain}
.smart-item-result,.smart-item-free{display:grid;width:100%;grid-template-columns:minmax(210px,1fr) 105px 105px 110px;align-items:center;gap:8px;min-height:48px;padding:6px 10px;border:0;border-bottom:1px solid #dbe4ec;background:#fff;color:#172b43;text-align:right;font-family:inherit;cursor:pointer}
.smart-item-result:nth-child(even){background:#f4fafc}.smart-item-result:hover,.smart-item-result.active{background:#d9f1f8!important;outline:2px solid #0c8eb7;outline-offset:-2px}
.smart-item-result strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}
.smart-item-result small{display:block;margin-top:2px;color:#698095;font-size:9px;direction:ltr;text-align:right}
.smart-item-result span{font-size:10px;text-align:center}.smart-item-result .stock-ok{color:#087f5b}.smart-item-result .stock-low{color:#b54708}.smart-item-result .price{font-weight:850;color:#123e66;font-variant-numeric:tabular-nums}
.smart-item-free{grid-template-columns:1fr auto;background:#fff9eb;color:#855c05}.smart-item-free b{font-size:11px}.smart-item-free small{color:#9b721d}
.smart-item-empty{padding:18px;text-align:center;color:#64748b;font-size:11px}
.smart-item-menu-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:6px 9px;border-top:1px solid #d4dfe9;background:#f8fafc;color:#60748a;font-size:9px}
.smart-item-menu-foot kbd{padding:1px 4px;border:1px solid #cbd5e1;border-radius:4px;background:#fff;font-family:inherit}
@media(max-width:1250px){
  .smart-entry-head{display:none}
  .smart-entry-table{border:0;background:transparent}
  .smart-entry-row{margin-bottom:10px!important;padding:10px!important;border:1px solid #cbd8e5!important;border-radius:12px!important;background:#fff!important;gap:7px!important}
  .smart-entry-row .field{padding:0!important;border:0!important}.smart-entry-row .field label{display:block!important;margin:0 0 3px!important;font-size:9px!important;color:#66798e!important}
  .item-row-number,.daily-row-no{width:30px!important;height:30px!important;align-self:center!important;border:0;border-radius:8px!important;background:#e8f3ff!important}
  .invoice-item-row.smart-entry-row{grid-template-columns:34px 100px repeat(4,minmax(0,1fr)) 34px;grid-template-areas:"num type desc desc desc total remove" ". category category qty unit price ." ". discount discount internal internal internal ."}
  .no-internal-cost .invoice-item-row.smart-entry-row{grid-template-columns:34px 100px repeat(4,minmax(0,1fr)) 34px;grid-template-areas:"num type desc desc desc total remove" ". category category qty unit price ." ". discount discount discount discount discount ."}
  .daily-sale-row.smart-entry-row{grid-template-columns:34px repeat(5,minmax(0,1fr)) 34px;grid-template-areas:"num desc desc desc total total remove" ". qty unit price price discount ."}
  .item-line-total,.daily-line-total{min-height:45px;border:1px solid #d7e5f2!important;border-radius:8px!important;background:#f2f8fd!important}
  .invoice-row-remove,.daily-remove-row{grid-area:remove}
}
@media(max-width:720px){
  .smart-entry-guide{display:none}.smart-entry-panel .panel-head{align-items:flex-start;flex-direction:column}.smart-entry-panel .panel-head .btn{width:100%}
  .invoice-item-row.smart-entry-row,.no-internal-cost .invoice-item-row.smart-entry-row{grid-template-columns:30px 1fr 1fr 30px;grid-template-areas:"num type total remove" "desc desc desc desc" "category category qty unit" "price price discount discount" "internal internal internal internal"}
  .no-internal-cost .invoice-item-row.smart-entry-row{grid-template-areas:"num type total remove" "desc desc desc desc" "category category qty unit" "price price discount discount"}
  .daily-sale-row.smart-entry-row{grid-template-columns:30px 1fr 1fr 30px;grid-template-areas:"num total total remove" "desc desc desc desc" "qty unit price price" "discount discount discount discount"}
  .smart-item-menu{width:calc(100vw - 16px);max-height:60vh;border-radius:12px}
  .smart-item-result{grid-template-columns:1fr 78px}.smart-item-result span:nth-of-type(1){display:none}.smart-item-result .price{display:block}.smart-item-menu-head small{display:none}
}
.smart-item-free:hover,.smart-item-free.active{background:#fff1bf!important;outline:2px solid #d69e16;outline-offset:-2px}

/* v6.26 daily-sale procurement and purchase-cost columns */
.daily-entry-head{grid-template-columns:38px 132px minmax(230px,1fr) 76px 72px 108px 112px 72px 104px 38px}
.daily-sale-row.smart-entry-row{grid-template-columns:38px 132px minmax(230px,1fr) 76px 72px 108px 112px 72px 104px 38px;grid-template-areas:"num procurement desc qty unit cost price discount total remove"}
.daily-procurement{grid-area:procurement}.daily-cost{grid-area:cost}.daily-description{grid-area:desc}.daily-qty{grid-area:qty}.daily-unit{grid-area:unit}.daily-price{grid-area:price}.daily-discount{grid-area:discount}.daily-line-total{grid-area:total}.daily-remove-row{grid-area:remove}
@media(max-width:1250px){.daily-sale-row.smart-entry-row{grid-template-columns:34px 110px repeat(5,minmax(0,1fr)) 34px;grid-template-areas:"num procurement desc desc total total total remove" ". . qty unit cost price discount ."}}
@media(max-width:720px){.daily-sale-row.smart-entry-row{grid-template-columns:30px 1fr 1fr 30px;grid-template-areas:"num procurement total remove" "desc desc desc desc" "qty unit cost cost" "price price discount discount"}}
