/* Screen-only interaction/alignment rules; printed tickets retain their layout. */
@media screen {
 .content,.card,.header-row,.service-columns>*{min-width:0}
 .header-row{flex-wrap:wrap;align-items:center}
 .grid>label,.service-fields>label,.part-column{min-width:0}
 .grid>label>label{margin:0;line-height:1.3}
 input,select,textarea{min-width:0;max-width:100%;box-sizing:border-box}
 .actions-row{row-gap:8px}
 .table-scroll{max-width:100%}
 #scan-message{max-height:7rem;overflow-y:auto;overflow-wrap:anywhere}
 #items-table tr,.service-part,.service-device{scroll-margin-block:96px}
 .scanner-row-active{outline:2px solid #14b8ff;outline-offset:-2px;background-color:#eaf8ff!important}
 #items-table .qty,#items-table .price,#items-table .line-total{font-variant-numeric:tabular-nums;text-align:right}
 #items-table .line-total{white-space:nowrap}
 .service-part input[type=number]{font-variant-numeric:tabular-nums;text-align:right}
 .service-part strong{line-height:1.4;overflow-wrap:anywhere}
}
@media screen and (min-width:701px){
 #items-table{table-layout:fixed}
 #items-table th:first-child,#items-table td:first-child{width:3rem}
 #items-table th:nth-child(3),#items-table td:nth-child(3),#items-table th:nth-child(4),#items-table td:nth-child(4){width:7.5rem;text-align:right}
 #items-table th:nth-child(5),#items-table td:nth-child(5){width:7rem;text-align:right}
 #items-table th:last-child,#items-table td:last-child{width:3.5rem;text-align:center}
}
@media screen and (min-width:701px) and (max-width:1000px){
 #items-table th:nth-child(3),#items-table td:nth-child(3),#items-table th:nth-child(4),#items-table td:nth-child(4){width:5.5rem}
 #items-table th:nth-child(5),#items-table td:nth-child(5){width:5rem}
}
/* Filter labels must not reserve bottom margin below their controls. */
@media screen {
 .service-filters{align-items:flex-end}
 .service-filters label{margin:0}
 .service-filters input,.service-filters select,.service-filters>.btn{height:40px;box-sizing:border-box}
 .service-filters>a{display:flex;align-items:center;justify-content:center;min-height:40px;white-space:nowrap}
}

@media screen {
 .sidebar>a{font-size:14px;font-weight:500;line-height:1.4}
 .menu-group{color:#fff;border:0;border-radius:0;background:transparent}
 .menu-group>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;list-style:none;padding:12px;border-radius:8px;cursor:pointer;font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:#b8c7da;transition:background .15s,color .15s}
 .menu-group>summary::-webkit-details-marker{display:none}
 .menu-group>summary::after{content:'';width:7px;height:7px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(-45deg);margin-right:3px;transition:transform .15s;flex-shrink:0}
 .menu-group[open]>summary::after{transform:rotate(45deg)}
 .menu-group[open]>summary{color:#e2eaf4}
 .menu-group>summary:hover{background:rgba(255,255,255,.06);color:#fff}
 .menu-group>div{display:flex;flex-direction:column;margin:3px 0 8px 15px;padding:0 0 0 8px;border-left:1px solid #334155;gap:3px}
 .menu-group>div>a{display:block;font-size:13px;font-weight:400;padding:10px 12px;line-height:1.4;border-radius:7px;color:#c6d3e3}
 .sidebar a[aria-current=page]{background:rgba(20,184,255,.14);color:#7dd3fc}
 .menu-group>summary:focus-visible{outline:2px solid #38bdf8;outline-offset:2px}
}

@media screen{.service-part.stock-only-part{grid-template-columns:minmax(0,2fr) minmax(80px,1fr) auto}.part-column .service-part.stock-only-part{grid-template-columns:minmax(0,1fr) auto}.part-column .service-part.stock-only-part>strong,.part-column .service-part.stock-only-part>label:first-child{grid-column:1/-1}.stock-only-part>label{margin-bottom:0}.stock-only-part>.btn{align-self:end}}

@media screen {
 #scan-message:empty{display:none}
 .row-stock-badge{display:inline-block;max-width:100%;margin-top:5px;padding:2px 6px;border-radius:4px;background:#eef3f8;color:#475569;font-size:11px;font-weight:500;line-height:1.5;font-variant-numeric:tabular-nums;white-space:normal}
 .row-stock-badge.stock-warning{background:#fff4d5;color:#854d0e}
 .row-stock-badge.stock-insufficient{background:#fee2e2;color:#b91c1c;font-weight:700}
}
@media print{.row-stock-badge{display:none!important}}

@media screen {
 .row-stock-badge{display:inline-flex;align-items:center;gap:5px;background:transparent;padding:0 2px;color:#475569;font-size:12px;font-weight:500}
 .row-stock-badge::before{content:'';display:block;width:7px;height:7px;flex:0 0 7px;border-radius:50%;background:#00884a}
 .row-stock-badge.stock-warning{background:transparent;color:#475569}
 .row-stock-badge.stock-warning::before{background:#00884a}
 .row-stock-badge.stock-insufficient{background:transparent;color:#b91c1c}
 .row-stock-badge.stock-insufficient::before{background:#dc2626}
}

@media screen {
 #items-table td.has-stock-badge{position:relative}
 #items-table td.has-stock-badge .product-input{padding-right:90px}
 #items-table td.has-stock-badge .row-stock-badge{position:absolute;right:20px;top:50%;transform:translateY(-50%);margin:0;max-width:82px;white-space:nowrap;pointer-events:auto}
}
@media screen and (max-width:700px){
 #items-table td.has-stock-badge .row-stock-badge{top:auto;bottom:14px;right:12px;transform:none}
}

@media screen{
 .row-stock-badge::before{display:none!important;content:none}
 .row-stock-badge{gap:3px}
 .row-stock-badge .stock-dot{display:inline-block;width:6px;height:6px;flex:0 0 6px;border-radius:50%;background:#00884a}
 .row-stock-badge.stock-insufficient .stock-dot{background:#dc2626}
}

@media screen{
 .row-stock-badge{gap:5px;color:#8b929a;font-size:12px;font-weight:400}
 .row-stock-badge.stock-warning{color:#8b929a}
 .row-stock-badge .stock-dot{width:8px;height:8px;flex-basis:8px;background:#00884a}
 .row-stock-badge.stock-insufficient{color:#b91c1c}
}

@media screen {
 .stock-table th,.stock-table td{vertical-align:middle}
 .stock-actions{display:flex;align-items:center;gap:8px}
 .stock-table td.stock-row-actions .stock-actions>.btn{display:inline-flex;align-items:center;justify-content:center;width:auto;margin:0;min-height:32px;line-height:18px;white-space:nowrap;padding:7px 10px}
 .stock-table td:nth-child(4),.stock-table td:nth-child(5),.stock-table td:nth-child(6){white-space:nowrap;font-variant-numeric:tabular-nums}
 .stock-table td:first-child{overflow-wrap:anywhere;line-height:1.4}
}
@media screen and (min-width:701px){
 .stock-table{min-width:980px}
 .stock-table th{position:sticky;top:0;background:#fff;z-index:1}
 .stock-table th:nth-child(2),.stock-table td:nth-child(2),.stock-table th:nth-child(3),.stock-table td:nth-child(3){min-width:100px}
 .stock-table th:nth-child(4),.stock-table td:nth-child(4){min-width:150px}
 .stock-table th:nth-child(5),.stock-table td:nth-child(5){min-width:85px;text-align:right}
 .stock-table th:nth-child(6),.stock-table td:nth-child(6){min-width:95px;text-align:right}
 .stock-table .stock-row-actions{width:220px;min-width:220px;padding-left:16px}
 .stock-table th:last-child{padding-left:16px}
}
@media screen and (max-width:700px){.stock-actions{flex-wrap:wrap}.stock-table td.stock-row-actions .stock-actions>.btn+.btn{margin-top:0}}

@media screen and (max-width:700px){.stock-table td.stock-row-actions .stock-actions>.btn{min-height:40px}}

@media screen{.stock-product-name{display:flex;align-items:flex-start;gap:8px}.stock-product-name>span{min-width:0}.stock-product-name>.product-select{flex:0 0 18px;width:18px;height:18px;margin:2px 0 0}}

@media screen{.part-column .chargeable-accessory>label:first-child,.part-column .chargeable-accessory>strong{grid-column:1/-1}.chargeable-accessory>label{margin-bottom:0}}
