/* Contract status row colors – loaded after V6/mobile compatibility styles. */
#offersTable tbody tr:has(td[data-label="حالة العقد"] .status-badge.bad) td{
  background:#FFF1F1!important;
  border-bottom-color:#F6DCDC!important;
}
#offersTable tbody tr:has(td[data-label="حالة العقد"] .status-badge.bad) td.sticky-contract,
#offersTable tbody tr:has(td[data-label="حالة العقد"] .status-badge.bad) td.sticky-owner,
#offersTable tbody tr:has(td[data-label="حالة العقد"] .status-badge.bad) td.actions-sticky{
  background:#FFECEC!important;
}
#offersTable tbody tr:has(td[data-label="حالة العقد"] .status-badge.bad){
  border-color:#F1BDBD!important;
  border-inline-start-color:#D96565!important;
}

#offersTable tbody tr:has(td[data-label="حالة العقد"] .status-badge.warn) td{
  background:#F1F7FF!important;
  border-bottom-color:#DCE9FA!important;
}
#offersTable tbody tr:has(td[data-label="حالة العقد"] .status-badge.warn) td.sticky-contract,
#offersTable tbody tr:has(td[data-label="حالة العقد"] .status-badge.warn) td.sticky-owner,
#offersTable tbody tr:has(td[data-label="حالة العقد"] .status-badge.warn) td.actions-sticky{
  background:#EAF3FF!important;
}
#offersTable tbody tr:has(td[data-label="حالة العقد"] .status-badge.warn){
  border-color:#BFD6F5!important;
  border-inline-start-color:#5C91D8!important;
}

/* Keep selected offer indication visible while preserving the status color. */
#offersTable tbody tr.offer-row-selected:has(td[data-label="حالة العقد"] .status-badge.bad),
#offersTable tbody tr.offer-row-selected:has(td[data-label="حالة العقد"] .status-badge.warn){
  box-shadow:0 0 0 2px rgba(68,184,175,.18),0 6px 16px rgba(21,100,107,.08)!important;
}

/* Quick status switch in the contracts list (contract-status-quick.js) */
#offersTable .status-switch{font-family:inherit;line-height:1.5;cursor:pointer;min-height:28px;padding:3px 9px 3px 7px;transition:box-shadow .15s,transform .1s}
#offersTable .status-switch:hover{box-shadow:0 0 0 3px rgba(21,100,107,.12)}
#offersTable .status-switch:active{transform:scale(.97)}
#offersTable .status-switch:focus-visible{outline:2px solid #198D9A;outline-offset:2px}
#offersTable .status-switch[aria-expanded="true"]{box-shadow:0 0 0 3px rgba(21,100,107,.2)}
#offersTable .status-switch-caret{opacity:.7;flex:none}
#offersTable .status-switch.is-saving{opacity:.6;cursor:progress}
#offersTable .status-switch.is-saving .status-switch-caret{animation:statusSpin .8s linear infinite}
@keyframes statusSpin{to{transform:rotate(360deg)}}
.status-quick-menu{position:fixed;z-index:1200;min-width:190px;padding:6px;border:1px solid #DCE7E8;border-radius:14px;background:#fff;box-shadow:0 14px 40px rgba(16,52,56,.18);direction:rtl;animation:statusMenuIn .12s ease-out}
@keyframes statusMenuIn{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}
.status-quick-head{padding:6px 10px 6px;font-size:11.5px;font-weight:800;color:#6B7F83}
.status-quick-option{display:flex;align-items:center;gap:9px;width:100%;min-height:40px;padding:8px 10px;border:0;border-radius:10px;background:transparent;font:inherit;font-size:14px;font-weight:700;color:#1E2626;text-align:right;cursor:pointer}
.status-quick-option:hover,.status-quick-option:focus-visible{background:#F1F7F7;outline:none}
.status-quick-option:focus-visible{box-shadow:inset 0 0 0 2px #198D9A}
.status-quick-dot{width:10px;height:10px;border-radius:50%;flex:none}
.status-quick-option.tone-ok .status-quick-dot{background:#1E9E62}
.status-quick-option.tone-warn .status-quick-dot{background:#E2A320}
.status-quick-option.tone-bad .status-quick-dot{background:#D24B4B}
.status-quick-label{flex:1}
.status-quick-check{visibility:hidden;color:#15646B;font-weight:900}
.status-quick-option.is-current{background:#F4F9F9}
.status-quick-option.is-current .status-quick-check{visibility:visible}
.status-undo-toast{display:flex;align-items:center;gap:12px}
.status-undo-toast>span{flex:1}
.status-undo-btn{flex:none;padding:5px 12px;border-radius:8px;border:1px solid #15646B;background:#fff;color:#15646B;font:inherit;font-weight:800;font-size:12.5px;cursor:pointer}
.status-undo-btn:hover{background:#15646B;color:#fff}
@media(max-width:760px){.status-quick-option{min-height:46px;font-size:15px}#offersTable .status-switch{min-height:32px;padding:4px 11px 4px 9px;font-size:12px}}
@media(prefers-reduced-motion:reduce){.status-quick-menu{animation:none}#offersTable .status-switch.is-saving .status-switch-caret{animation:none}}
