
.autosave-status{position:sticky;top:10px;z-index:20;margin:12px 0;padding:9px 12px;border-radius:8px;background:#292929;color:#ccc;text-align:center}
.autosave-status.saving{color:#f0c14e}
.autosave-status.saved{background:#164b2a;color:#d9ffe4}
.autosave-status.error{background:#5b1f24;color:#ffd9dc}
.derived-box{background:#191919;border:1px solid #444;border-radius:8px;padding:10px;display:flex;justify-content:space-between;gap:10px;margin:5px 0}
.calculated-prices{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:8px}
.calculated-prices>div{background:#191919;border:1px solid #444;border-radius:8px;padding:9px;display:flex;flex-direction:column;gap:5px}
.calculated-prices strong{color:#f0c14e}
.products-grid{grid-template-columns:repeat(6,minmax(0,1fr))}
@media(max-width:1200px){.products-grid{grid-template-columns:repeat(3,1fr)}}
@media(max-width:850px){.products-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:600px){.products-grid{grid-template-columns:1fr}.calculated-prices{grid-template-columns:1fr}}

.raw-price-control{display:grid;grid-template-columns:42px 1fr 42px;gap:6px;align-items:center}
.price-arrow{height:42px;padding:0;border-radius:8px;background:#3a3a3a;color:#f0c14e;font-size:18px;border:1px solid #555}
.price-arrow:hover{background:#4a4a4a}
.price-arrow:active{transform:scale(.96)}

@media(max-width:1450px){.products-grid{grid-template-columns:repeat(4,1fr)}}
@media(max-width:1050px){.products-grid{grid-template-columns:repeat(3,1fr)}}
@media(max-width:800px){.products-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:600px){.products-grid{grid-template-columns:1fr}}

.delete-product-btn{
    width:100%;
    margin-top:10px;
    background:#7d1f2b;
    color:#fff;
    border:1px solid #a63846;
}
.delete-product-btn:hover{background:#9a2837}
.delete-product-btn:disabled{opacity:.6;cursor:not-allowed}

/* نسخه 76.42: کارت‌های فشرده کالا */
.products-grid{gap:8px!important}
.products-grid .product-card{padding:9px!important;gap:5px!important;align-content:start}
.products-grid .product-card>label{margin:0!important;font-size:12px!important;line-height:1.15}
.products-grid .product-card>input:not([type=hidden]),
.products-grid .product-card>select{min-height:34px!important;height:34px!important;padding:5px 7px!important}
.products-grid .compact-fields{display:grid;grid-template-columns:minmax(0,2fr) minmax(78px,.8fr);gap:6px;grid-column:1/-1}
.products-grid .compact-fields label{display:flex;flex-direction:column;gap:3px;margin:0;font-size:12px}
.products-grid .compact-fields input,.products-grid .compact-fields select{width:100%;height:34px;min-height:34px;padding:5px 7px}
.products-grid .checks{display:flex!important;flex-wrap:nowrap!important;justify-content:space-between;align-items:center;padding:5px 6px!important;gap:4px!important;margin:2px 0!important}
.products-grid .checks label{font-size:11px!important;white-space:nowrap;gap:3px!important}
.products-grid .checks input[type=checkbox]{width:16px!important;height:16px!important}
.products-grid .calculated-prices{margin-top:2px!important;gap:5px!important}
.products-grid .calculated-prices>div{padding:6px!important;gap:2px!important}
.products-grid .derived-box{padding:6px!important;margin:2px 0!important;gap:5px!important}
.products-grid .raw-price-control{gap:4px!important}
.products-grid .price-arrow{height:34px!important}
.products-grid .product-board-toggle,.products-grid .product-telegram-toggle{min-height:30px!important;padding:4px 5px!important;margin:0!important}
.products-grid .delete-product-btn{margin-top:2px!important;padding:6px!important;min-height:32px!important}
.products-grid .product-help{display:none!important}
@media(max-width:600px){.products-grid .compact-fields{grid-template-columns:1fr}}

/* نسخه 76.43: کاهش بیشتر ارتفاع کارت‌های کالا */
.products-grid .product-card{
    gap:4px!important;
    padding:7px!important;
}
.products-grid .compact-fields{
    gap:5px!important;
}
.products-grid .compact-fields label{
    display:grid!important;
    grid-template-columns:max-content minmax(0,1fr)!important;
    align-items:center!important;
    gap:5px!important;
    min-width:0!important;
    font-size:11px!important;
    white-space:nowrap!important;
}
.products-grid .compact-fields label span{
    margin:0!important;
    line-height:1!important;
}
.products-grid .compact-fields input,
.products-grid .compact-fields select{
    height:30px!important;
    min-height:30px!important;
    padding:3px 5px!important;
    min-width:0!important;
}
.products-grid .inline-field{
    display:grid!important;
    grid-template-columns:minmax(72px,max-content) minmax(0,1fr)!important;
    align-items:center!important;
    gap:5px!important;
    width:100%!important;
    min-width:0!important;
    margin:0!important;
}
.products-grid .inline-field>label{
    margin:0!important;
    font-size:11px!important;
    line-height:1.05!important;
    white-space:nowrap!important;
}
.products-grid .inline-field>input,
.products-grid .inline-field>select{
    width:100%!important;
    min-width:0!important;
    height:30px!important;
    min-height:30px!important;
    margin:0!important;
    padding:3px 6px!important;
    font-size:12px!important;
    box-sizing:border-box!important;
}
.products-grid .inline-field>.raw-price-control{
    width:100%!important;
    min-width:0!important;
    height:30px!important;
    min-height:30px!important;
    margin:0!important;
}
.products-grid .inline-field .raw-price-control input.money-input,
.products-grid .inline-field .price-arrow{
    height:30px!important;
    min-height:30px!important;
}
.products-grid .inline-field .price-arrow{
    width:24px!important;
    min-width:24px!important;
}
.products-grid .checks{
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    align-items:center!important;
    justify-items:center!important;
    gap:2px!important;
    min-height:29px!important;
    padding:3px 4px!important;
}
.products-grid .checks label{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    margin:0!important;
    font-size:10.5px!important;
    white-space:nowrap!important;
}
.products-grid .checks input[type=checkbox]{
    width:14px!important;
    height:14px!important;
    margin-left:3px!important;
}
.products-grid .calculated-prices{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
}
.products-grid .product-board-toggle,
.products-grid .product-telegram-toggle{
    min-height:27px!important;
    padding:3px 4px!important;
    font-size:10.5px!important;
    line-height:1.1!important;
}
.products-grid .delete-product-btn{
    min-height:29px!important;
    height:29px!important;
    padding:3px 5px!important;
}
@media(max-width:600px){
    .products-grid .compact-fields{grid-template-columns:1fr!important}
    .products-grid .inline-field{grid-template-columns:105px minmax(0,1fr)!important}
}

/* نسخه 76.44: چینش قطعی ردیفی وضعیت‌های کالا */
.products-grid .product-card .checks{
    display:flex!important;
    flex-direction:row!important;
    flex-wrap:nowrap!important;
    align-items:center!important;
    justify-content:space-between!important;
    width:100%!important;
    min-width:0!important;
    gap:4px!important;
    padding:3px 5px!important;
    box-sizing:border-box!important;
}
.products-grid .product-card .checks label{
    display:inline-flex!important;
    flex:1 1 0!important;
    flex-direction:row!important;
    align-items:center!important;
    justify-content:center!important;
    width:auto!important;
    min-width:0!important;
    margin:0!important;
    padding:0!important;
    white-space:nowrap!important;
    line-height:1!important;
}
.products-grid .product-card .checks input[type="checkbox"]{
    flex:0 0 auto!important;
    margin:0 0 0 3px!important;
}
