.tag.neutral,.tag.sla-normal{background:#edf1f4;color:#4e5968}
.tag.sla-yellow{background:#fff1ba;color:#795600;border:1px solid #e4bd48}
.tag.sla-red{background:#ffe0df;color:#a9202c;border:1px solid #e3a2a7}
/* The SLA badge belongs to ticket rows only; color every cell so the whole ticket is conspicuous. */
.table-wrap tbody tr:has(.tag.sla-yellow)>td{background:#fff2bd;border-bottom-color:#dec26b}
.table-wrap tbody tr:has(.tag.sla-red)>td{background:#ffe1e2;border-bottom-color:#e5a8ad}
.table-wrap tbody tr:has(.tag.sla-yellow)>td:first-child{box-shadow:inset 4px 0 #ba8500}
.table-wrap tbody tr:has(.tag.sla-red)>td:first-child{box-shadow:inset 4px 0 #b4232e}
.table-wrap tbody tr:has(.tag:is(.sla-yellow,.sla-red)) .ticket-actions .link{text-decoration:underline;text-underline-offset:2px;font-weight:600}
.late-history{display:block;margin-top:5px;color:#ae2430;font-size:15.4px}
.ticket-actions{display:flex;gap:8px;flex-wrap:wrap;min-width:125px}
.ticket-actions .link{padding:3px 0}
.unread-dot{display:inline-block;border-radius:8px;background:#c91624;color:#fff;font-size:14px;padding:2px 6px}
.detail-block{border:1px solid #e5e8ec;border-radius:10px;padding:12px 15px;margin:15px 0}
.detail-block h3{margin:0 0 10px;font-size:21px}
.detail-block p{color:#4e5968;margin:6px 0}
.sla-reason{color:#a9202c!important}
.ticket-logs{padding-left:22px;color:#59616d}
.ticket-logs li{margin:0 0 12px;padding-left:5px}
.ticket-logs time{display:block;font-size:15.4px;color:#89919c}
.ticket-logs b{color:#313a45}
dialog label[hidden]{display:none}
button:disabled{opacity:.55;cursor:wait}
.role-purchaser{background:#fff1d9;color:#8b5d13}
.role-production_lead{background:#ebe6fc;color:#6545a8}
input[readonly]{background:#f5f6f8;color:#59616d}
#unreadCount{font-size:16.8px}

/* Repair registration and coordination need the same readable width as the desktop workspace. */
#ticketDialog{width:min(1120px,calc(100vw - 32px));max-width:none;max-height:90dvh;overflow-x:hidden;overflow-y:auto}
#ticketDialog form,#ticketDialog .grid,#ticketDialog .grid>*{min-width:0}
#ticketDialog input,#ticketDialog select,#ticketDialog textarea{min-width:0;width:100%}
.aftersales-dialog{width:min(920px,calc(100vw - 32px));max-width:none;max-height:90dvh;overflow-x:hidden;overflow-y:auto}
.aftersales-dialog form,.aftersales-dialog .grid,.aftersales-dialog .grid>*{min-width:0}
.aftersales-dialog input:not([type=checkbox]),.aftersales-dialog select,.aftersales-dialog textarea{min-width:0;width:100%}
.aftersales-dialog label[hidden],.aftersales-dialog fieldset[hidden]{display:none}
.treatment-picker{display:flex;align-items:center;flex-wrap:wrap;gap:12px 22px;margin:0;border:1px solid #dce5eb;border-radius:9px;padding:13px 16px}
.treatment-picker legend{color:#566d7d;font-size:18px;padding:0 4px}
.treatment-picker label{display:flex;align-items:center;gap:8px;color:#293e4a;white-space:nowrap}
.treatment-picker .hint{width:100%}
.treatment-picker input[type=checkbox]{width:19px;height:19px;margin:0;accent-color:#b9243a}
.quick-close-confirm{display:flex;align-items:center;gap:10px;color:#8b303b}
.quick-close-confirm input[type=checkbox]{width:19px;height:19px;margin:0;flex:none;accent-color:#b9243a}
@media(max-width:620px){.aftersales-dialog .grid,#ticketDialog .grid{grid-template-columns:minmax(0,1fr)}.aftersales-dialog .wide,#ticketDialog .wide{grid-column:auto}.treatment-picker label{white-space:normal}}
