/* R491 — readable Telegram conversation rows, stage semantics, full-height chat.
   All controls remain native selectors; colour reports their selected state only.
   This is loaded after legacy Inbox styles to settle conflicting fixed heights. */
@media (min-width:711px){
 .r201-nav-stack.r206-inbox-nav + .inbox.r165-inbox.r202-resizable:not(.r165-maximized){
  height:var(--r491-inbox-height,calc(100dvh - 185px))!important;
  display:grid!important;grid-template-rows:minmax(0,1fr)!important;
  max-height:none!important;min-height:420px!important;overflow:hidden!important;
 }
 .r201-nav-stack.r206-inbox-nav + .r165-inbox.r202-resizable>.threads{
  min-height:0!important;height:100%!important;max-height:none!important;overflow-y:auto!important;
 }
 .r201-nav-stack.r206-inbox-nav + .r165-inbox.r202-resizable>.conversation{
  display:flex!important;flex-direction:column!important;height:100%!important;
  min-height:0!important;max-height:none!important;overflow:hidden!important;
 }
 .r201-nav-stack.r206-inbox-nav + .r165-inbox.r202-resizable .conversation-body{
  display:flex;min-height:0!important;flex:1 1 0!important;overflow-y:auto!important;
 }
 .r201-nav-stack.r206-inbox-nav + .r165-inbox.r202-resizable .conversation-header,
 .r201-nav-stack.r206-inbox-nav + .r165-inbox.r202-resizable .composer{flex:0 0 auto!important}
}
.r165-inbox .r489-contact-card{position:relative!important;}
.r165-inbox .r489-contact-card>.r491-chat-time{
 position:absolute;left:9px;top:4px;font-size:9px;font-weight:600;
 letter-spacing:.01em;line-height:12px;color:var(--muted,#98adc1);opacity:.92;
 font-variant-numeric:tabular-nums;pointer-events:none;
}
.r165-inbox .r489-contact-card:has(>.r491-chat-time)>.r477-avatar-trigger{
 margin-top:17px!important;
}
/* The pipeline selector is coloured separately from the manager-reviewed case outcome.
   Spam/lost don't certify misconduct; won doesn't certify payment. */
.r165-inbox .r489-thread-meta>.r281-stage-line select[data-r491-stage]{
 background:var(--r491-stage-bg,transparent)!important;
 border-color:var(--r491-stage-border,var(--line,#72889a50))!important;
 color:var(--r491-stage-text,inherit)!important;
 font-weight:700!important;color-scheme:normal!important;
}
.r165-inbox .r489-thread-meta select[data-r491-stage="spam"]{--r491-stage-bg:rgba(239,68,68,.12);--r491-stage-border:rgba(239,68,68,.44);--r491-stage-text:#f87171}
.r165-inbox .r489-thread-meta select[data-r491-stage="general_support"]{--r491-stage-bg:rgba(59,130,246,.12);--r491-stage-border:rgba(59,130,246,.43);--r491-stage-text:#93c5fd}
.r165-inbox .r489-thread-meta select[data-r491-stage="lead_detected"]{--r491-stage-bg:rgba(6,182,212,.13);--r491-stage-border:rgba(6,182,212,.46);--r491-stage-text:#67e8f9}
.r165-inbox .r489-thread-meta select[data-r491-stage="qualified"]{--r491-stage-bg:rgba(139,92,246,.13);--r491-stage-border:rgba(139,92,246,.45);--r491-stage-text:#c4b5fd}
.r165-inbox .r489-thread-meta select[data-r491-stage="negotiating"]{--r491-stage-bg:rgba(245,158,11,.14);--r491-stage-border:rgba(245,158,11,.46);--r491-stage-text:#fcd34d}
.r165-inbox .r489-thread-meta select[data-r491-stage="won"]{--r491-stage-bg:rgba(34,197,94,.13);--r491-stage-border:rgba(34,197,94,.44);--r491-stage-text:#86efac}
.r165-inbox .r489-thread-meta select[data-r491-stage="lost"]{--r491-stage-bg:rgba(148,163,184,.12);--r491-stage-border:rgba(148,163,184,.4);--r491-stage-text:#cbd5e1}
.r165-inbox .r489-thread-meta select[data-r491-stage="unreviewed"]{--r491-stage-bg:rgba(148,163,184,.09);--r491-stage-border:rgba(148,163,184,.34);--r491-stage-text:#cbd5e1}
:root[data-business-theme="light"] .r489-thread-meta select[data-r491-stage="spam"]{--r491-stage-text:#b91c1c}
:root[data-business-theme="light"] .r489-thread-meta select[data-r491-stage="general_support"]{--r491-stage-text:#1d4ed8}
:root[data-business-theme="light"] .r489-thread-meta select[data-r491-stage="lead_detected"]{--r491-stage-text:#0e7490}
:root[data-business-theme="light"] .r489-thread-meta select[data-r491-stage="qualified"]{--r491-stage-text:#6d28d9}
:root[data-business-theme="light"] .r489-thread-meta select[data-r491-stage="negotiating"]{--r491-stage-text:#92400e}
:root[data-business-theme="light"] .r489-thread-meta select[data-r491-stage="won"]{--r491-stage-text:#166534}
:root[data-business-theme="light"] .r489-thread-meta select[data-r491-stage="lost"],
:root[data-business-theme="light"] .r489-thread-meta select[data-r491-stage="unreviewed"]{--r491-stage-text:#475569}
@media(max-width:710px){.r165-inbox .r489-contact-card>.r491-chat-time{top:4px;left:7px}}
