[hidden] { display: none !important; }
.inbox-topbar { height: 62px; }
#dashboard-link { color: #405552; font-size: .875rem; font-weight: 600; text-decoration: none; }
#dashboard-link:hover { text-decoration: underline; }
.inbox-shell {
  --inbox-text: #172b27;
  --inbox-muted: #526661;
  --inbox-border: #d9e2de;
  --inbox-green: #285b4b;
  --inbox-tint: #edf5f1;
  color: var(--inbox-text);
  max-width: 1330px;
  padding: clamp(22px, 4vw, 44px) clamp(16px, 5vw, 64px) 28px;
}
.inbox-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 16px; margin-bottom: 22px; }
.inbox-heading h1 { font-size: clamp(1.85rem, 4vw, 2.55rem); letter-spacing: -.045em; line-height: 1.1; margin: 0; }
#inbox-store { background: var(--inbox-tint); border: 1px solid var(--inbox-border); border-radius: 99px; color: var(--inbox-green); margin: 0; padding: 5px 11px; font-size: .82rem; font-weight: 650; overflow-wrap: anywhere; }
#inbox-status { color: var(--inbox-muted); font-size: .9rem; }
#inbox-status:empty, #thread-alert:empty { display: none; }
#inbox-layout {
  display: grid;
  grid-template-columns: minmax(325px, 365px) minmax(0, 1fr);
  min-height: min(650px, 75vh);
  background: #fff;
  border: 1px solid var(--inbox-border);
  border-radius: 18px;
  overflow: clip;
  box-shadow: 0 12px 36px #1a382507;
}
.inbox-list, .inbox-detail { min-width: 0; }
.inbox-list { display: flex; flex-direction: column; border-right: 1px solid var(--inbox-border); }
.inbox-filters, .thread-header { background: #fff; border-bottom: 1px solid var(--inbox-border); padding: 16px; }
.inbox-shell button, #inbox-channel {
  min-height: 38px;
  border: 1px solid var(--inbox-border);
  border-radius: 8px;
  padding: 5px 11px;
  background: #fff;
  color: var(--inbox-text);
  font: inherit;
  font-size: .82rem;
  font-weight: 600;
}
.inbox-shell button:not(:disabled):hover { background: var(--inbox-tint); }
.inbox-shell button:disabled { opacity: .52; cursor: not-allowed; }
.inbox-shell :focus-visible { outline: 3px solid #438c78; outline-offset: 2px; }
.inbox-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
#inbox-views { display: grid; grid-template-columns: 1.5fr .68fr 1fr; gap: 3px; padding: 3px; background: #eef2f0; border-radius: 10px; margin-bottom: 15px; }
#inbox-views button { min-height: 36px; background: transparent; border-color: transparent; padding-inline: 4px; }
#inbox-views button[aria-pressed="true"] { background: #fff; border-color: var(--inbox-border); color: var(--inbox-green); }
.inbox-field, #reply-form > label, #resolution-form > label:first-child { display: block; margin-bottom: 6px; font-size: .78rem; font-weight: 650; }
#inbox-search, .inbox-shell textarea { width: 100%; padding: 9px 11px; border: 1px solid var(--inbox-border); border-radius: 8px; background: #fff; color: inherit; font: inherit; }
#inbox-search { min-height: 42px; font-size: .9rem; }
.inbox-filter-options { margin-top: 10px; column-gap: 12px; }
.inbox-filter-options label, #resolution-form label { display: inline-flex; align-items: center; gap: 5px; min-height: 38px; font-size: .78rem; }
.inbox-shell input[type="checkbox"] { accent-color: var(--inbox-green); width: 15px; height: 15px; margin: 0; }
#inbox-rows { flex: 1; display: flex; flex-direction: column; gap: 4px; padding: 8px; }
#inbox-rows > button { text-align: start; border-color: transparent; padding: 11px; overflow-wrap: anywhere; }
#inbox-rows > button[aria-current="true"] { background: var(--inbox-tint); border-color: #b7cfc2; }
.inbox-row-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 8px; }
.inbox-row-heading strong { font-size: .94rem; }
.inbox-row-heading > span { color: var(--inbox-green); font-size: .72rem; }
#inbox-rows small { display: block; color: var(--inbox-muted); margin-top: 4px; font-weight: 450; }
.inbox-list-empty { padding: 18px 12px; font-size: .9rem; }
.inbox-list-empty p { color: var(--inbox-muted); margin: 6px 0 0; font-size: .84rem; }
.inbox-list-empty button { display: block; margin-top: 10px; color: var(--inbox-green); }
#inbox-more { margin: 8px 16px; align-self: start; }
#inbox-history { color: var(--inbox-muted); border-top: 1px solid var(--inbox-border); padding: 11px 16px; margin: 0; font-size: .73rem; }
.inbox-detail { background: #f9fbfa; }
.inbox-placeholder { display: grid; place-content: center; justify-items: center; min-height: 100%; text-align: center; padding: 32px; }
.inbox-placeholder h2 { margin: 14px 0 4px; font-size: 1.08rem; }
.inbox-placeholder p { max-width: 32ch; margin: 0; color: var(--inbox-muted); font-size: .87rem; line-height: 1.55; }
.inbox-placeholder-icon { position: relative; width: 58px; height: 58px; display: grid; place-items: center; border-radius: 16px; background: var(--inbox-tint); color: var(--inbox-green); }
.inbox-placeholder-icon::before { content: ''; width: 23px; height: 16px; border: 2px solid; border-radius: 5px; }
.inbox-placeholder-icon::after { content: ''; position: absolute; bottom: 17px; left: 20px; width: 6px; height: 6px; border: solid; border-width: 0 0 2px 2px; transform: skewY(-34deg); background: var(--inbox-tint); }
#inbox-thread { display: flex; flex-direction: column; min-height: 100%; }
#thread-title { margin: 0; font-size: 1.2rem; letter-spacing: -.02em; overflow-wrap: anywhere; }
#thread-state, #thread-alert, #reply-blocker { margin: 7px 0 10px; color: var(--inbox-muted); font-size: .82rem; overflow-wrap: anywhere; }
#thread-alert { color: #754814; }
#delete { color: #963c38; }
#inbox-older { margin: 12px 16px 0; align-self: start; }
#inbox-messages { flex: 1; display: flex; flex-direction: column; gap: 12px; list-style: none; min-height: 180px; max-height: 49vh; overflow: auto; padding: 16px; margin: 0; }
#inbox-messages li { align-self: flex-start; max-width: min(94%, 520px); padding: 10px 13px; border: 1px solid var(--inbox-border); border-radius: 12px; background: #fff; overflow-wrap: anywhere; }
#inbox-messages li[data-kind="agent"], #inbox-messages li[data-kind="staff"] { align-self: flex-end; background: var(--inbox-tint); }
#inbox-messages li[data-kind="event"] { align-self: center; text-align: center; }
#inbox-messages strong, #inbox-messages small { font-size: .74rem; color: var(--inbox-muted); }
#inbox-messages p { white-space: pre-wrap; font-size: .88rem; line-height: 1.5; margin: 4px 0; }
#inbox-messages .message-status { display: block; font-weight: 650; }
#inbox-messages [data-status="failed"], #inbox-messages [data-status="expired"], #inbox-messages [data-status="unknown"] { color: #963c38; }
#reply-form, #resolution-form { background: #fff; padding: 14px 16px; border-top: 1px solid var(--inbox-border); }
.inbox-shell textarea { resize: vertical; min-height: 64px; }
#reply-send { background: var(--inbox-green); color: #fff; border-color: transparent; }
#reply-send:not(:disabled):hover { background: #204b3e; }
#inbox-back { display: none; }
@media (max-width: 760px) {
  #inbox-layout { display: block; min-height: 0; }
  .inbox-list { min-height: 320px; border-right: 0; }
  #inbox-layout:not(.thread-open) .inbox-detail, #inbox-layout.thread-open .inbox-list { display: none; }
  #inbox-back { display: inline-block; margin: 12px 16px; }
  #inbox-messages { max-height: 45vh; }
}
.inbox-shell label { margin-top: 0; }
.inbox-filter-options label, #resolution-form label:not(:first-child) { margin: 0; }
#inbox-channel { width: auto; max-width: 100%; }
@media (max-width: 390px) {
  .inbox-shell button, #inbox-channel { min-height: 42px; }
  .inbox-filter-options { column-gap: 8px; }
}
.transcript-cards { display: flex; gap: 10px; max-width: 100%; overflow-x: auto; padding: 8px 0; }
.transcript-card { flex: 0 0 min(230px, 75vw); border: 1px solid var(--inbox-border); border-radius: 10px; background: white; padding: 12px; }
.transcript-card img { width: 100%; height: 155px; object-fit: contain; border-radius: 6px; }
.transcript-card a { display: block; margin-top: 8px; color: var(--inbox-green); font-size: .85rem; font-weight: 600; }
