/* TEST Swift Desk V83: screenshot-matched compact bill line cards.
   Presentation only, scoped to mobile and to JS-enhanced new bill page.
   The original editable table remains available without JavaScript. */
@media screen and (max-width:850px){
 body.swift-bill-cards-ready #unified-new-bill .swift-bill-card{
   display:block!important;overflow:visible!important;min-width:0!important;
   border:1px solid #dbe5ee;border-radius:11px;background:#fff;padding:0 12px;
 }
 body.swift-bill-cards-ready #unified-new-bill .swift-bill-card-heading{
   display:flex;justify-content:space-between;align-items:center;gap:8px;
   padding:12px 0 7px;color:#142f45;
 }
 body.swift-bill-cards-ready #unified-new-bill .swift-bill-count{font-size:13px;font-weight:800}
 body.swift-bill-cards-ready #unified-new-bill .swift-bill-legend{color:#758799;font-size:10px;white-space:nowrap}
 body.swift-bill-cards-ready #unified-new-bill .bill-cart-table{
   display:block!important;width:100%!important;max-width:100%!important;
   min-width:0!important;table-layout:auto!important;border:0!important;
   background:transparent!important;margin:0!important;
 }
 body.swift-bill-cards-ready #unified-new-bill .bill-cart-table thead{display:none!important}
 body.swift-bill-cards-ready #unified-new-bill .bill-cart-table tbody{
   display:block!important;min-width:0!important;width:100%!important;
 }
 body.swift-bill-cards-ready #unified-new-bill .bill-cart-table tbody tr.swift-bill-line{
   display:grid!important;grid-template-columns:minmax(0,1fr) max-content!important;
   grid-template-rows:auto auto auto auto!important;
   gap:7px 10px!important;align-items:start;
   margin:0!important;padding:13px 0!important;min-width:0!important;
   border:0!important;border-bottom:1px solid #dce5ed!important;
   border-radius:0!important;box-shadow:none!important;background:#fff!important;
 }
 body.swift-bill-cards-ready #unified-new-bill .bill-cart-table tbody tr.swift-bill-line:last-child{
   border-bottom:none!important;
 }
 body.swift-bill-cards-ready #unified-new-bill .bill-cart-table tbody tr.swift-bill-line.bill-line-invalid{
   background:#fff0f0!important;outline:1px solid #bb2336;border-radius:6px!important;
 }
 body.swift-bill-cards-ready #unified-new-bill .bill-cart-table tbody tr.swift-bill-line.prescription-stock-shortage{
   background:#fff7f5!important;border-left:3px solid #b92e39!important;
   padding-left:8px!important;
 }
 body.swift-bill-cards-ready #unified-new-bill .bill-cart-table tbody tr.swift-bill-line td{
   display:block;min-width:0;max-width:100%;padding:0!important;
   margin:0!important;border:0!important;background:transparent!important;
   font-size:12px;vertical-align:top;overflow-wrap:anywhere;
 }
 body.swift-bill-cards-ready #unified-new-bill .bill-cart-table tbody tr.swift-bill-line td::before{display:none!important}
 body.swift-bill-cards-ready #unified-new-bill .bill-cart-table tbody tr.swift-bill-line td:nth-child(1){
   grid-column:1;grid-row:1;
 }
 body.swift-bill-cards-ready #unified-new-bill .bill-cart-table tbody tr.swift-bill-line td:nth-child(2){
   grid-column:1/-1;grid-row:3;display:none!important;
 }
 body.swift-bill-cards-ready #unified-new-bill .bill-cart-table tbody tr.swift-bill-line td:nth-child(3){
   grid-column:1/-1;grid-row:2;
 }
 body.swift-bill-cards-ready #unified-new-bill .bill-cart-table tbody tr.swift-bill-line td:nth-child(4){
   grid-column:2;grid-row:1;justify-self:end;text-align:right;
 }
 body.swift-bill-cards-ready #unified-new-bill .bill-cart-table tbody tr.swift-bill-line td:nth-child(5){
   grid-column:1/-1;grid-row:4;display:none!important;
 }
 body.swift-bill-cards-ready #unified-new-bill .bill-cart-table tbody tr.swift-bill-line .swift-bill-line-heading{
   display:flex;align-items:start;justify-content:space-between;gap:8px;min-width:0;
 }
 body.swift-bill-cards-ready #unified-new-bill .bill-cart-table .swift-bill-remove{
   display:inline-flex!important;flex:0 0 30px;align-items:center;justify-content:center;
   min-width:30px!important;width:30px!important;min-height:30px!important;height:30px!important;
   margin:0!important;padding:0!important;border:1px solid #e7d2d0!important;
   border-radius:8px!important;background:#fffafa!important;color:#9b2937!important;
   font-size:19px!important;font-weight:600!important;line-height:1!important;
   touch-action:manipulation;cursor:pointer;
 }
 body.swift-bill-cards-ready #unified-new-bill .bill-cart-table .swift-bill-remove:disabled{
   opacity:.4;cursor:not-allowed;
 }
 body.swift-bill-cards-ready #unified-new-bill .bill-cart-table tbody tr.swift-bill-line .swift-bill-title-stack{
   min-width:0;flex:1 1 auto;display:flex;flex-direction:column;gap:2px;
 }
 body.swift-bill-cards-ready #unified-new-bill .swift-bill-line-name{
   display:block;color:#112b41;font-size:12.5px;font-weight:800;line-height:1.35;
   overflow-wrap:anywhere;
 }
 body.swift-bill-cards-ready #unified-new-bill .swift-bill-line-meta{
   color:#708399;font-size:10.5px;line-height:1.3;
 }
 body.swift-bill-cards-ready #unified-new-bill .bill-cart-table .swift-bill-line td:nth-child(4) output{
   display:block!important;min-width:55px!important;
   padding:0!important;margin:0!important;white-space:nowrap!important;
   color:#122d43;font-size:12.5px!important;font-weight:800!important;
   line-height:1.4;text-align:right;
 }
 body.swift-bill-cards-ready #unified-new-bill .swift-bill-quantity-bar{
   display:flex;align-items:center;justify-content:space-between;gap:6px;
   width:100%;min-height:40px;padding-top:1px;
 }
 body.swift-bill-cards-ready #unified-new-bill .swift-bill-quantity-label{
   flex:1 1 auto;color:#73859b;font-size:10.5px;line-height:1.2;
 }
 body.swift-bill-cards-ready #unified-new-bill .swift-bill-stepper{
   display:inline-flex;align-items:center;justify-content:flex-end;
   gap:5px;flex:0 0 auto;min-height:36px;
 }
 body.swift-bill-cards-ready #unified-new-bill .swift-bill-stepper-button{
   display:inline-flex;align-items:center;justify-content:center;
   width:34px;min-width:34px;height:34px;min-height:34px;
   padding:0!important;border:1px solid #d8e5ee!important;border-radius:9px!important;
   background:#fff!important;color:#1e4e70!important;
   font-size:19px;line-height:1;font-weight:600;
   touch-action:manipulation;cursor:pointer;
 }
 body.swift-bill-cards-ready #unified-new-bill .swift-bill-stepper-button:disabled{
   opacity:.42;cursor:not-allowed;background:#f5f7f8!important;
 }
 body.swift-bill-cards-ready #unified-new-bill .swift-bill-quantity-input.control{
   appearance:textfield;-moz-appearance:textfield;
   display:block!important;box-sizing:border-box!important;
   min-width:48px!important;width:53px!important;max-width:72px!important;
   min-height:34px!important;height:34px!important;margin:0!important;
   padding:0 3px!important;text-align:center!important;
   border:0!important;background:transparent!important;box-shadow:none!important;
   font-size:12px!important;color:#102e45!important;font-weight:800!important;
 }
 body.swift-bill-cards-ready #unified-new-bill .swift-bill-quantity-input::-webkit-inner-spin-button,
 body.swift-bill-cards-ready #unified-new-bill .swift-bill-quantity-input::-webkit-outer-spin-button{
   -webkit-appearance:none;margin:0;
 }
 body.swift-bill-cards-ready #unified-new-bill .swift-bill-line td:nth-child(1)>input.control{
   display:none!important;
 }
 body.swift-bill-cards-ready #unified-new-bill .swift-bill-line td:nth-child(1)>.swift-bill-edit-toggle{
   display:inline-flex;align-items:center;min-height:28px;
   border:0!important;background:none!important;box-shadow:none!important;
   padding:2px 0!important;margin:3px 0 0!important;
   font-size:10px;color:#2c7092;font-weight:700;
 }
 body.swift-bill-cards-ready #unified-new-bill .swift-bill-line td:nth-child(1)>select.control{
   display:none!important;
 }
 body.swift-bill-cards-ready #unified-new-bill .swift-bill-line[data-swift-batch-required="1"] td:nth-child(1)>select.control{
   display:block!important;margin-top:6px;max-width:100%;
 }
 body.swift-bill-cards-ready #unified-new-bill .swift-bill-line td:nth-child(1)>small{
   display:block;margin-top:5px;line-height:1.3;
 }
 body.swift-bill-cards-ready #unified-new-bill .bill-cart-table tbody tr.swift-bill-line.swift-bill-editing td:nth-child(1)>input.control{
   display:block!important;margin:9px 0 6px!important;
   min-height:42px;width:100%;
 }
 body.swift-bill-cards-ready #unified-new-bill .bill-cart-table tbody tr.swift-bill-line.swift-bill-editing td:nth-child(1)>select.control{
   display:block!important;margin-top:5px;width:100%;
 }
 body.swift-bill-cards-ready #unified-new-bill .bill-cart-table tbody tr.swift-bill-line.swift-bill-editing td:nth-child(2){
   display:block!important;
 }
 body.swift-bill-cards-ready #unified-new-bill .bill-cart-table tbody tr.swift-bill-line.swift-bill-editing td:nth-child(2)::before{
   display:block!important;content:"Unit price (Rs.)";color:#708399;font-size:11px;margin-bottom:5px;
 }
 body.swift-bill-cards-ready #unified-new-bill .bill-cart-table tbody tr.swift-bill-line.swift-bill-editing td:nth-child(2)>input.control{
   display:block!important;width:100%;min-height:42px;
 }
 body.swift-bill-cards-ready #unified-new-bill .bill-cart-table tbody tr.swift-bill-line.swift-bill-editing td:nth-child(5){
   display:flex!important;justify-content:flex-end;gap:6px;
 }
 body.swift-bill-cards-ready #unified-new-bill .bill-cart-table tbody tr.swift-bill-line.swift-bill-editing td:nth-child(5) button{
   min-height:36px!important;padding:6px 11px!important;
 }
 body.swift-bill-cards-ready #unified-new-bill .bill-cart-table tbody tr:not([data-cart-index]){
   display:block!important;margin:0!important;padding:15px 0!important;
   background:transparent!important;border:0!important;box-shadow:none!important;
 }
 body.swift-bill-cards-ready #unified-new-bill .bill-cart-table tbody tr:not([data-cart-index]) td{
   display:block!important;border:0!important;padding:5px!important;text-align:center;color:#6c8295;
 }
 body.swift-bill-cards-ready #unified-new-bill .bill-cart-table .bill-line-error-text{
   margin-top:6px;font-size:11px;
 }
}
@media print{
 .swift-bill-card-heading,.swift-bill-stepper-button,.swift-bill-edit-toggle{display:none!important}
}

/* V86: mobile lines are compact receipts, not a five-column edit form.
   All underlying inputs and desktop table behaviour remain unchanged. */
@media screen and (max-width:850px){
 body.swift-bill-cards-ready #unified-new-bill .bill-cart-table tbody tr.swift-bill-line{
   grid-template-columns:minmax(0,1fr) auto!important;
   grid-template-rows:auto auto!important;
   gap:2px 8px!important;
   padding:10px 0!important;
 }
 body.swift-bill-cards-ready #unified-new-bill .swift-bill-line td:nth-child(1){grid-column:1;grid-row:1;align-self:center}
 body.swift-bill-cards-ready #unified-new-bill .swift-bill-line td:nth-child(3){grid-column:2;grid-row:1;align-self:center}
 body.swift-bill-cards-ready #unified-new-bill .swift-bill-line td:nth-child(4){grid-column:2;grid-row:2;text-align:right}
 body.swift-bill-cards-ready #unified-new-bill .swift-bill-line td:nth-child(5){
   display:block!important;grid-column:1;grid-row:2;align-self:center;
 }
 body.swift-bill-cards-ready #unified-new-bill .swift-bill-line td:nth-child(5) button{
   min-height:25px!important;padding:2px 5px!important;font-size:10px!important;
   background:transparent!important;border:0!important;color:#5b7185!important;
 }
 body.swift-bill-cards-ready #unified-new-bill .swift-bill-line .swift-bill-line-meta{font-size:10px!important}
 body.swift-bill-cards-ready #unified-new-bill .swift-bill-quantity-bar{width:auto!important;min-height:34px!important}
 body.swift-bill-cards-ready #unified-new-bill .swift-bill-quantity-label{display:none!important}
 body.swift-bill-cards-ready #unified-new-bill .swift-bill-stepper-button{width:30px!important;min-width:30px!important;height:32px!important;min-height:32px!important}
 body.swift-bill-cards-ready #unified-new-bill .swift-bill-quantity-input.control{min-width:38px!important;width:43px!important;max-width:64px!important}
 body.swift-bill-cards-ready #unified-new-bill .swift-bill-line td:nth-child(1)>input.control,
 body.swift-bill-cards-ready #unified-new-bill .swift-bill-line td:nth-child(2),
 body.swift-bill-cards-ready #unified-new-bill .swift-bill-line .swift-bill-edit-toggle{display:none!important}
 body.swift-bill-cards-ready #unified-new-bill .swift-bill-line[data-swift-batch-required="1"] td:nth-child(1)>select.control{display:block!important}
}
