/* Inbox case: live scene in Key decisions. Alerts scattered across product
   modules fly into one thread per customer. Final state is the static fallback. */
.ib-scene { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 22px 0 6px; }
.ib-col { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ib-col.after { border-color: var(--accent); }
.ib-tag { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--label); }
.ib-col.after .ib-tag { color: var(--accent); }
.ib-tag .ib-total { margin-left: auto; letter-spacing: .04em; text-transform: none; color: var(--muted); }
.ib-tag .ib-total b { color: var(--fg); font-weight: 500; }
.ib-col.after .ib-total b { color: var(--accent); }

/* modules */
.ib-mods { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ib-mod { border: 1px dashed var(--border-2); border-radius: var(--radius-sm); padding: 12px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ib-mh { display: flex; align-items: center; gap: 8px; }
.ib-mh b, .ib-th b { font-family: var(--display); font-weight: 500; font-size: 13px; letter-spacing: -.01em; color: var(--fg); }
.ib-badge { margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--st-red, #ef7a6b); color: #fff; font-family: var(--mono); font-size: 10px; line-height: 18px; text-align: center; transition: opacity .25s, transform .25s; }
.ib-badge.zero { opacity: 0; transform: scale(.6); }
.ib-mod .ib-empty { font-family: var(--mono); font-size: 10px; color: var(--label); }
.ib-n { display: flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--border); font-size: 11.5px; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: opacity .3s ease; }
.ib-n::before { content: ''; flex: none; width: 6px; height: 6px; border-radius: 1px; background: var(--st-red, #ef7a6b); }
.ib-n em { font-style: normal; color: var(--muted); }
.ib-n.gone { opacity: .22; }
.ib-n.gone::before { background: var(--border-2); }
.ib-note { margin-top: auto; font-size: 12.5px; color: var(--muted); }

/* threads */
.ib-threads { display: flex; flex-direction: column; gap: 8px; }
.ib-thread { flex: 1; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--panel-2); padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.ib-th { display: flex; align-items: center; gap: 8px; }
.ib-av { flex: none; width: 18px; height: 18px; border-radius: 50%; background: var(--panel); border: 1px solid var(--border-2); }
.ib-th .ib-cnt { margin-left: auto; font-family: var(--mono); font-size: 10px; color: var(--label); }
.ib-th .ib-cnt b { color: var(--accent); font-weight: 500; }
.ib-cards { display: flex; flex-direction: column; gap: 5px; }
.ib-card { display: flex; align-items: center; gap: 8px; padding: 6px 9px; border-radius: 6px; background: var(--panel); border: 1px solid var(--border); font-size: 11.5px; color: var(--fg); white-space: nowrap; }
.ib-card i { margin-left: auto; font-style: normal; font-family: var(--mono); font-size: 9.5px; color: var(--label); }
.ib-card.slot { opacity: 0; }
.ib-card.in { opacity: 1; animation: ibLand .35s cubic-bezier(.16,1,.3,1); }
@keyframes ibLand { from { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-weak); } to { border-color: var(--border); box-shadow: none; } }

/* the flying copy */
.ib-ghost { position: absolute; z-index: 5; margin: 0; pointer-events: none; box-shadow: var(--shadow); border-color: var(--accent); transition: transform .62s cubic-bezier(.65,0,.35,1), opacity .2s ease; }

@media (max-width: 820px) { .ib-scene { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .ib-card.in { animation: none; } }
