/* ============================================================
   ZillerPortal — Chat assistenza «Raccoglitore» (Components/Pages/Tickets.razor)
   Copertina scura con i divisori colorati degli argomenti, chat come carte nelle tasche,
   moduli chiusi a fisarmonica. Colore = argomento (--t), rosso = urgenza.
   ≥1600 quattro colonne · 1180-1599 moduli a cassetto · 900-1179 divisori stretti ·
   <900 un pannello alla volta. Prefisso .rb-*. Barlow / Barlow Condensed (App.razor).
   ============================================================ */

.rb {
  --rb-cover: #16171B;
  --rb-cover-2: #23252C;
  --rb-cover-ink: #ECEEF2;
  --rb-cover-mute: #A9ADB8;
  --rb-page: #EEF0F3;
  --rb-paper: #FFFFFF;
  --rb-sunk: #F6F7F9;
  --rb-line: #D8DBE1;
  --rb-line-2: #E6E8EC;
  --rb-ink: #16171B;
  --rb-ink-2: #454A57;
  --rb-mute: #5E6371;
  --rb-red: #DC2626;
  --rb-red-ink: #991B1B;
  --rb-red-text: #B91C1C;
  --rb-amber: #9A4508;
  --rb-green: #15803D;
  --rb-font: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --rb-cond: 'Barlow Condensed', 'Barlow', system-ui, sans-serif;
  --rb-ease: cubic-bezier(.16, 1, .3, 1);

  position: relative;
  display: grid;
  grid-template-columns: 248px 352px minmax(0, 1fr) 300px;
  height: calc(100dvh - 56px - 48px);
  min-height: 560px;
  background: var(--rb-page);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(22, 23, 27, .08), 0 12px 32px rgba(22, 23, 27, .08);
  font-family: var(--rb-font);
  font-size: 15px;
  color: var(--rb-ink);
  scrollbar-width: thin;
  scrollbar-color: #C3C7D0 transparent;
}
.rb *, .rb *::before, .rb *::after { box-sizing: border-box; }
:where(.rb) :where(button, input, select, textarea) { font-family: inherit; color: inherit; }
.rb ::selection { background: #FDE68A; color: var(--rb-ink); }
.rb :focus-visible { outline: 2px solid var(--rb-ink); outline-offset: 2px; }
.rb-cond { font-family: var(--rb-cond); font-weight: 800; text-transform: uppercase; letter-spacing: .02em; margin: 0; }
.rb-num { font-variant-numeric: tabular-nums; }
.rb-code { font-variant-numeric: tabular-nums; color: var(--rb-mute); font-weight: 600; font-size: 13px; }
.rb-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Copertina con i divisori ───────────────────────────────── */
.rb-rail {
  position: relative; z-index: 2; display: flex; flex-direction: column; min-height: 0;
  background: var(--rb-cover); color: var(--rb-cover-ink);
  padding: 20px 0 16px 14px;
}
.rb-rail-head { padding: 0 18px 18px 6px; display: flex; flex-direction: column; gap: 2px; }
.rb-rail-head h1 { font-size: 34px; line-height: 1; color: #fff; }
.rb-rail-sum { font-size: 14px; font-weight: 600; color: var(--rb-cover-mute); }
.rb-tabs { display: flex; flex-direction: column; gap: 4px; overflow: visible; flex: 1; min-height: 0; }
.rb-tab {
  position: relative; display: flex; align-items: center; gap: 12px;
  min-height: 52px; padding: 6px 14px 6px 8px; border: 0;
  border-radius: 12px 0 0 12px; background: transparent; color: var(--rb-cover-ink);
  font-size: 14.5px; font-weight: 600; text-align: left; cursor: pointer;
  transition: background-color 160ms var(--rb-ease), color 160ms var(--rb-ease);
}
.rb-tab:hover { background: var(--rb-cover-2); }
.rb-tab-card {
  flex: none; width: 30px; height: 40px; border-radius: 5px;
  display: grid; place-items: center; background: var(--t); color: #fff; font-size: 15px;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .22), 0 2px 4px rgba(0, 0, 0, .35);
  transition: transform 200ms var(--rb-ease);
}
.rb-tab-l { flex: 1; min-width: 0; line-height: 1.15; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rb-tab-n, .rb-tab-o {
  flex: none; min-width: 26px; height: 24px; padding: 0 7px; border-radius: 12px;
  display: inline-grid; place-items: center; font-size: 13px; font-weight: 700;
}
.rb-tab-n { background: var(--rb-red); color: #fff; }
.rb-tab-o { background: var(--rb-cover-2); color: var(--rb-cover-mute); }
.rb-tab-o.zero { background: transparent; }
/* La linguetta scelta esce dalla copertina e si attacca alla pagina */
.rb-tab.on { background: var(--rb-page); color: var(--rb-ink); }
.rb-tab.on .rb-tab-card { transform: translateX(3px) rotate(-4deg); }
.rb-tab.on .rb-tab-o { background: #fff; color: var(--rb-ink-2); }
.rb-tab-edge { display: none; }
.rb-tab.on .rb-tab-edge { display: block; position: absolute; z-index: 3; right: -9px; top: 9px; bottom: 9px; width: 9px; border-radius: 0 5px 5px 0; background: var(--t); box-shadow: 2px 1px 3px rgba(22, 23, 27, .2); }
.rb-tab.on::before, .rb-tab.on::after {
  content: ""; position: absolute; right: 0; width: 14px; height: 14px; pointer-events: none;
}
.rb-tab.on::before { top: -14px; background: radial-gradient(circle at 0 0, transparent 14px, var(--rb-page) 14.5px); }
.rb-tab.on::after { bottom: -14px; background: radial-gradient(circle at 0 100%, transparent 14px, var(--rb-page) 14.5px); }

.rb-mine { display: flex; align-items: center; gap: 10px; margin: 12px 18px 0 6px; padding-top: 14px; border-top: 1px solid #2E3038; font-size: 14px; font-weight: 600; color: var(--rb-cover-mute); cursor: pointer; }
.rb-mine input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rb-mine-sw { position: relative; flex: none; width: 36px; height: 22px; border-radius: 11px; background: #3A3D46; transition: background-color 160ms; }
.rb-mine-sw::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #C9CCD4; transition: transform 200ms var(--rb-ease); }
.rb-mine input:checked + .rb-mine-sw { background: #ECEEF2; }
.rb-mine input:checked + .rb-mine-sw::after { transform: translateX(14px); background: var(--rb-cover); }
.rb-mine input:focus-visible + .rb-mine-sw { outline: 2px solid #fff; outline-offset: 2px; }

/* ── Pagina con le tasche ───────────────────────────────────── */
.rb-list { display: flex; flex-direction: column; min-height: 0; min-width: 0; padding: 20px 16px 0; gap: 12px; }
.rb-list-head h2 { font-size: 30px; line-height: 1.05; color: var(--rb-ink); }
.rb-list-head h2::after { content: ""; display: block; width: 44px; height: 5px; margin-top: 8px; border-radius: 3px; background: var(--t); }
.rb-list-head p { margin: 8px 0 0; font-size: 14px; font-weight: 600; color: var(--rb-ink-2); }

.rb-pockets { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 4px 2px 20px; margin: 0 -2px; }
/* Una card per chat: striscia in alto nel colore dell'argomento, tutto dentro lo stesso riquadro.
   (Prima era una "tasca" con una carta che ne spuntava: due riquadri sovrapposti, sembrava rotto.) */
.rb-pocket {
  position: relative; display: flex; flex-direction: column; width: 100%; flex: none;
  padding: 0; border: 1px solid var(--rb-line); border-radius: 10px; overflow: hidden;
  background: linear-gradient(var(--t), var(--t)) top / 100% 4px no-repeat, var(--rb-paper);
  box-shadow: 0 1px 2px rgba(22, 23, 27, .06);
  text-align: left; cursor: pointer;
  transition: border-color 160ms var(--rb-ease), box-shadow 160ms var(--rb-ease), background-color 160ms var(--rb-ease);
}
.rb-pocket:hover { border-color: #B9BEC8; box-shadow: 0 3px 10px rgba(22, 23, 27, .08); }
.rb-pocket.on {
  border-color: var(--rb-ink);
  background: linear-gradient(var(--t), var(--t)) top / 100% 4px no-repeat, color-mix(in srgb, var(--t) 6%, var(--rb-paper));
  box-shadow: 0 4px 14px rgba(22, 23, 27, .12);
}
.rb-pocket:focus-visible { outline: 2px solid var(--rb-ink); outline-offset: 2px; }
.rb-card { display: flex; flex-direction: column; gap: 2px; padding: 14px 14px 0; }
.rb-face { display: flex; flex-direction: column; padding: 6px 14px 12px; }
.rb-pocket.closed .rb-pocket-name, .rb-pocket.closed .rb-pocket-subj { color: var(--rb-ink-2); }
.rb-pocket-top { display: flex; align-items: baseline; gap: 10px; }
.rb-pocket-name { flex: 1; min-width: 0; font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rb-pocket.unread .rb-pocket-name { font-weight: 800; }
.rb-face .rb-tags { margin-top: 8px; }
.rb-when { font-size: 13px; font-weight: 600; color: var(--rb-mute); }
.rb-wait { font-size: 13px; font-weight: 800; color: var(--rb-ink-2); }
.rb-wait.late { color: var(--rb-red-text); }
.rb-pocket-subj { font-size: 14px; font-weight: 600; color: var(--rb-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rb-pocket-snip { font-size: 14px; color: var(--rb-mute); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rb-pocket.unread .rb-pocket-snip { color: var(--rb-ink-2); font-weight: 500; }
.rb-new {
  position: absolute; z-index: 2; top: -9px; right: 20px; height: 20px; padding: 0 8px; border-radius: 5px;
  display: inline-flex; align-items: center; background: var(--rb-ink); color: #fff;
  font-family: var(--rb-cond); font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  box-shadow: 0 2px 6px rgba(22, 23, 27, .25);
}
.rb-new--inline { position: static; margin-left: auto; box-shadow: none; }
.rb-sla { display: block; height: 4px; margin-top: 10px; border-radius: 2px; background: var(--rb-line-2); overflow: hidden; }
.rb-sla i { display: block; height: 100%; border-radius: 2px; }
.rb-sla i.ok { background: #9AA0AC; }
.rb-sla i.warn { background: #F87171; }
.rb-sla i.late { background: var(--rb-red); }

/* Tag */
.rb-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.rb-tag {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; max-width: 100%; padding: 0 8px;
  border: 0; border-radius: 6px; font-size: 12.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: #EEF0F3; color: var(--rb-ink-2);
}
.rb-tag i { font-size: 12px; }
.rb-tag.st-rispondere { background: var(--rb-red); color: #fff; font-family: var(--rb-cond); font-size: 13.5px; letter-spacing: .04em; text-transform: uppercase; }
.rb-tag.st-aperto { background: #E2E8F0; color: #1E293B; }
.rb-tag.st-lavorazione { background: #fff; color: var(--rb-ink); box-shadow: inset 0 0 0 1.5px var(--rb-ink); }
.rb-tag.st-attesa { color: var(--rb-ink-2); box-shadow: inset 0 0 0 1px #8B919D; background: repeating-linear-gradient(135deg, transparent 0 5px, rgba(22, 23, 27, .07) 5px 10px); }
.rb-tag.st-risolto, .rb-tag.st-chiuso { background: #E5E7EB; color: #374151; }
.rb-tag--topic { background: color-mix(in srgb, var(--t) 14%, #fff); color: color-mix(in srgb, var(--t) 78%, #000); }
.rb-tag--soft { background: #F1F2F5; color: var(--rb-ink-2); }
.rb-tag--prio { background: #FEE2E2; color: var(--rb-red-ink); }
.rb-tag--who { background: #fff; box-shadow: inset 0 0 0 1px var(--rb-line); }
.rb-tag--who.none { color: var(--rb-mute); box-shadow: inset 0 0 0 1px #B9BEC8; background: transparent; }
.rb-tag--gold { background: #FEF3C7; color: #854D0E; }
.rb-tag--drop { background: #FFEDD5; color: #9A3412; cursor: pointer; }
button.rb-tag--drop:hover { background: #FED7AA; }

/* Moduli a fisarmonica (filtri, scheda cliente, gestione, ordini) */
.rb-mod { flex: none; background: var(--rb-paper); border: 1px solid var(--rb-line); border-radius: 14px; overflow: hidden; transition: border-color 160ms, box-shadow 200ms; }
.rb-mod.open { border-color: #9FA5B1; box-shadow: 0 6px 18px rgba(22, 23, 27, .08); }
.rb-mod-h {
  display: grid; grid-template-columns: 22px minmax(0, 1fr) 18px; grid-template-rows: auto auto; column-gap: 10px;
  align-items: center; width: 100%; min-height: 56px; padding: 10px 14px; border: 0; background: none;
  text-align: left; cursor: pointer;
}
.rb-mod-h:hover { background: var(--rb-sunk); }
.rb-mod-h > .bi:first-child { grid-row: 1 / span 2; font-size: 18px; color: var(--rb-ink-2); }
.rb-mod-t { font-family: var(--rb-cond); font-weight: 800; font-size: 17px; text-transform: uppercase; letter-spacing: .03em; }
.rb-mod-s { grid-column: 2; font-size: 13.5px; font-weight: 500; color: var(--rb-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rb-chev { grid-column: 3; grid-row: 1 / span 2; font-size: 14px; color: var(--rb-mute); transition: transform 200ms var(--rb-ease); }
.open > .rb-mod-h .rb-chev, .rb-drawer.open .rb-chev { transform: rotate(180deg); }
.rb-mod-b { display: flex; flex-direction: column; gap: 12px; padding: 4px 14px 14px; animation: rb-unfold 220ms var(--rb-ease); }
@keyframes rb-unfold { from { opacity: 0; transform: translateY(-6px); } }

.rb-search { position: relative; display: block; }
.rb-search i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--rb-mute); font-size: 14px; pointer-events: none; }
.rb-search input { width: 100%; min-height: 44px; padding: 8px 12px 8px 36px; border: 1px solid #B9BEC8; border-radius: 10px; background: var(--rb-sunk); font-size: 15px; }
.rb-search input:focus { outline: none; border-color: var(--rb-ink); background: #fff; box-shadow: 0 0 0 3px rgba(22, 23, 27, .12); }
.rb-search input::placeholder { color: var(--rb-mute); }
.rb-search--sm input { min-height: 40px; font-size: 14px; }
.rb-views { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.rb-view {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; padding: 0 12px;
  border: 1px solid var(--rb-line); border-radius: 9px; background: #fff; font-size: 14px; font-weight: 600; cursor: pointer;
}
.rb-view b { font-size: 13px; color: var(--rb-mute); }
.rb-view:hover { border-color: #9FA5B1; }
.rb-view.on { background: var(--rb-ink); border-color: var(--rb-ink); color: #fff; }
.rb-view.on b { color: #fff; }
.rb-view.v-rispondere b { color: var(--rb-red-text); }
.rb-view.v-rispondere.on { background: var(--rb-red); border-color: var(--rb-red); }
.rb-view.v-rispondere.on b { color: #fff; }

.rb-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 40px 16px; text-align: center; color: var(--rb-ink-2); font-size: 14px; }
.rb-empty b { font-size: 16px; color: var(--rb-ink); }
.rb-empty-card { width: 52px; height: 68px; border-radius: 7px; display: grid; place-items: center; margin-bottom: 8px; font-size: 22px; background: #fff; color: var(--rb-mute); border: 2px dashed #B9BEC8; }

/* ── Chat ───────────────────────────────────────────────────── */
.rb-chat { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--rb-paper); border-left: 1px solid var(--rb-line); }
.rb-chat--empty { align-items: center; justify-content: center; gap: 6px; padding: 24px; text-align: center; color: var(--rb-ink-2); font-size: 14px; }
.rb-chat--empty b { font-size: 18px; color: var(--rb-ink); }
.rb-chat-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 14px 18px; border-bottom: 1px solid var(--rb-line-2); box-shadow: inset 0 4px 0 var(--t); }
.rb-av {
  flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--t, #64748B) 15%, #fff); color: color-mix(in srgb, var(--t, #64748B) 80%, #000);
  font-weight: 800; font-size: 15px;
}
.rb-av--lg { width: 56px; height: 56px; border-radius: 14px; font-size: 18px; }
.rb-chat-who { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.rb-chat-who > b { font-size: 19px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rb-chat-who > span { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; white-space: nowrap; }
.rb-chat-who > span > * { flex: none; }
.rb-chat-who .rb-tag { overflow: visible; }
.rb-waiting { display: inline-flex; align-items: center; gap: 4px; font-size: 13.5px; font-weight: 700; color: var(--rb-red-text); }
.rb-chat-act { display: flex; align-items: center; gap: 8px; flex: none; margin-left: auto; }
.rb-status { position: relative; display: inline-flex; }
.rb-status select {
  appearance: none; -webkit-appearance: none; min-height: 40px; padding: 0 32px 0 14px; border-radius: 10px;
  border: 1px solid transparent; font-size: 14px; font-weight: 700; cursor: pointer; background: #EEF0F3;
}
.rb-status::after { content: "\F282"; font-family: bootstrap-icons; position: absolute; right: 11px; top: 50%; transform: translateY(-50%); font-size: 12px; pointer-events: none; }
.rb-status.st-rispondere select { background: var(--rb-red); color: #fff; }
.rb-status.st-rispondere::after { color: #fff; }
.rb-status.st-aperto select { background: #E2E8F0; color: #1E293B; }
.rb-status.st-lavorazione select { background: #fff; color: var(--rb-ink); border-color: var(--rb-ink); }
.rb-status.st-attesa select { background: #fff; color: var(--rb-ink-2); border: 1px dashed #8B919D; }
.rb-status.st-risolto select, .rb-status.st-chiuso select { background: #E5E7EB; color: #374151; }
.rb-status select:focus-visible { outline: 2px solid var(--rb-ink); outline-offset: 2px; }
.rb-status option { background: #fff; color: var(--rb-ink); }

.rb-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 0 14px;
  border-radius: 10px; border: 1px solid transparent; font-size: 14px; font-weight: 700; cursor: pointer; white-space: nowrap;
  transition: background-color 160ms, border-color 160ms, transform 120ms;
}
.rb-btn:active { transform: translateY(1px); }
.rb-btn:disabled { opacity: .5; cursor: not-allowed; }
.rb-btn--ink { background: var(--rb-ink); color: #fff; }
.rb-btn--ink:hover { background: #2B2D35; }
.rb-btn--ghost { background: #fff; border-color: #B9BEC8; color: var(--rb-ink); }
.rb-btn--ghost:hover:not(:disabled) { border-color: var(--rb-ink); }
.rb-btn--ok { background: #DCFCE7; color: #166534; border-color: #BBF7D0; }
.rb-btn--ok:hover { background: #BBF7D0; }
.rb-btn--block { width: 100%; }
.rb-icon {
  flex: none; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center;
  border: 1px solid var(--rb-line); background: #fff; font-size: 16px; cursor: pointer;
}
.rb-icon:hover { border-color: var(--rb-ink); }
.rb-icon.on { background: var(--rb-ink); border-color: var(--rb-ink); color: #fff; }
.rb-back, .rb-side-btn { display: none; }

.rb-msgs { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 20px 28px 24px; background: var(--rb-sunk); }
.rb-prev { align-self: center; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; padding: 8px 12px; border-radius: 10px; border: 1px dashed #B9BEC8; font-size: 13px; font-weight: 600; color: var(--rb-ink-2); }
.rb-prev button { border: 0; border-radius: 6px; padding: 3px 9px; background: #fff; box-shadow: inset 0 0 0 1px var(--rb-line); font-size: 13px; font-weight: 700; cursor: pointer; }
.rb-prev button:hover { box-shadow: inset 0 0 0 1px var(--rb-ink); }
.rb-start { align-self: center; display: flex; flex-direction: column; align-items: center; gap: 2px; max-width: 80%; margin: 4px 0 6px; text-align: center; }
.rb-start b { font-size: 16px; }
.rb-start span { font-size: 13px; color: var(--rb-mute); }
.rb-day { align-self: center; margin: 10px 0 4px; padding: 3px 12px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px var(--rb-line); font-size: 12.5px; font-weight: 700; color: var(--rb-ink-2); }
.rb-day::first-letter { text-transform: uppercase; }
.rb-sys { align-self: center; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--rb-mute); }
.rb-msg { display: flex; }
.rb-msg.staff { justify-content: flex-end; }
.rb-msg.note { justify-content: center; }
.rb-bubble { max-width: min(68%, 600px); display: flex; flex-direction: column; padding: 9px 14px 6px; border-radius: 18px; font-size: 15px; line-height: 1.5; }
.rb-msg.cliente .rb-bubble { background: #fff; box-shadow: inset 0 0 0 1px var(--rb-line-2), 0 1px 2px rgba(22, 23, 27, .05); border-bottom-left-radius: 6px; }
/* Staff: tinta chiara dell'argomento (prima nero pieno: con card e bottoni neri non si distingueva niente). */
.rb-msg.staff .rb-bubble { background: color-mix(in srgb, var(--t) 11%, #fff); color: var(--rb-ink); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--t) 24%, #fff); border-bottom-right-radius: 6px; }
.rb-msg.note .rb-bubble { max-width: min(80%, 660px); background: #FEF9C3; box-shadow: inset 0 0 0 1px #E2C35A; color: #3F2D06; font-size: 14px; border-radius: 10px; }
.rb-bubble-k { display: inline-flex; align-items: center; gap: 5px; margin-bottom: 1px; font-size: 13px; font-weight: 700; }
.rb-msg.staff .rb-bubble-k { color: color-mix(in srgb, var(--t) 78%, #000); }
.rb-msg.note .rb-bubble-k { color: #854D0E; font-family: var(--rb-cond); font-size: 14px; letter-spacing: .04em; text-transform: uppercase; }
.rb-bubble-t { white-space: pre-wrap; overflow-wrap: anywhere; }
.rb-bubble-time { align-self: flex-end; margin-top: 2px; font-size: 12px; color: var(--rb-mute); }
.rb-msg.staff .rb-bubble-time { color: var(--rb-mute); }
.rb-msg.note .rb-bubble-time { color: #6B5414; }
/* Richiesta di deposito / sblocco e spedizione: scheda dal lato del cliente */
/* Richiesta: bordo leggero e striscia dell'argomento a sinistra (prima bordo nero spesso). */
.rb-req { width: min(80%, 560px); display: flex; flex-direction: column; gap: 10px; padding: 14px 14px 14px 16px; border-radius: 14px; border-bottom-left-radius: 6px; background: linear-gradient(var(--t), var(--t)) left / 4px 100% no-repeat, #fff; box-shadow: inset 0 0 0 1px var(--rb-line), 0 1px 4px rgba(22, 23, 27, .06); }
.rb-req .rb-tags { margin-top: 0; }
.rb-req-h { display: flex; align-items: center; gap: 10px; }
.rb-req-ic { flex: none; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-size: 18px; background: color-mix(in srgb, var(--t) 15%, #fff); color: color-mix(in srgb, var(--t) 80%, #000); }
.rb-req-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rb-req-t b { font-family: var(--rb-cond); font-size: 17px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; }
.rb-req-t small { font-size: 13px; color: var(--rb-mute); }
.rb-req-st { flex: none; height: 26px; padding: 0 10px; border-radius: 7px; display: inline-flex; align-items: center; font-size: 13px; font-weight: 800; background: #FEF3C7; color: #92400E; }
.rb-req.rs-confermata .rb-req-st { background: #E2E8F0; color: #1E293B; }
.rb-req.rs-spedita .rb-req-st { background: #DCFCE7; color: #166534; }
.rb-req.rs-rifiutata .rb-req-st { background: #E5E7EB; color: #374151; }
.rb-req.rs-spedita, .rb-req.rs-rifiutata { box-shadow: inset 0 0 0 1px var(--rb-line); }
.rb-req-note { margin: 0; font-size: 14px; color: var(--rb-ink-2); font-style: italic; }
.rb-req-res { margin: 0; display: flex; gap: 6px; align-items: flex-start; font-size: 13px; color: var(--rb-mute); }
.rb-req-by { margin: 0; font-size: 13px; font-weight: 600; color: var(--rb-mute); }
.rb-req-act { display: flex; flex-wrap: wrap; gap: 8px; }
.rb-req-confirm { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 10px; background: #FEF3C7; color: #713F12; font-size: 14px; font-weight: 600; }
.rb-req-confirm p { margin: 0; line-height: 1.45; }
.rb-tag--req { background: #FEF3C7; color: #92400E; }
/* Azioni di una richiesta nel colore dell'argomento: il nero resta per testi e titoli. */
.rb-req .rb-btn--ink, .rb-dep .rb-btn--ink { background: color-mix(in srgb, var(--t) 90%, #000); }
.rb-req .rb-btn--ink:hover:not(:disabled), .rb-dep .rb-btn--ink:hover:not(:disabled) { background: color-mix(in srgb, var(--t) 70%, #000); }

/* Sezione «Spedizioni e deposito» */
.rb-tabs-sep { margin: 14px 18px 4px 8px; padding-top: 12px; border-top: 1px solid #2E3038; font-family: var(--rb-cond); font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--rb-cover-mute); }
.rb-pocket-subj .bi { color: color-mix(in srgb, var(--t) 80%, #000); }
.rb-tag.rb-req-tag { background: #FEF3C7; color: #92400E; }
.rb-tag.rb-req-tag.rs-confermata { background: #E2E8F0; color: #1E293B; }
.rb-tag.rb-req-tag.rs-spedita { background: #DCFCE7; color: #166534; }
.rb-tag.rb-req-tag.rs-rifiutata { background: #E5E7EB; color: #374151; }
/* Fascia fissa sopra la chat: l'ombra la separa dai messaggi che scorrono sotto. */
.rb-pin { position: relative; z-index: 2; flex: none; max-height: 48%; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 12px 18px 14px; background: color-mix(in srgb, var(--t) 7%, #fff); border-bottom: 1px solid var(--rb-line); box-shadow: 0 8px 14px -10px rgba(22, 23, 27, .35); }
.rb-pin .rb-req { width: 100%; border-bottom-left-radius: 16px; }
.rb-pin-h { display: flex; align-items: center; justify-content: space-between; }
.rb-pin-h span { display: inline-flex; align-items: center; gap: 6px; font-family: var(--rb-cond); font-size: 14px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--rb-ink-2); }
.rb-icon--sm { width: 32px; height: 32px; font-size: 13px; }
.rb-req-ref { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px var(--rb-line); font-size: 13px; font-weight: 700; color: var(--rb-ink-2); }
/* Richiesta nei messaggi: una riga sola; dettagli e azioni nella fascia in evidenza in alto. */
.rb-req-line {
  display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; max-width: min(80%, 560px);
  padding: 8px 12px 8px 14px; border: 0; border-radius: 12px; cursor: pointer; text-align: left;
  background: linear-gradient(var(--t), var(--t)) left / 3px 100% no-repeat, #fff;
  box-shadow: inset 0 0 0 1px var(--rb-line); font-size: 14px; color: var(--rb-ink-2);
  transition: box-shadow 160ms var(--rb-ease);
}
.rb-req-line:hover { box-shadow: inset 0 0 0 1px #B9BEC8, 0 2px 6px rgba(22, 23, 27, .08); }
.rb-req-line.on { box-shadow: inset 0 0 0 1.5px var(--t); }
.rb-req-line:focus-visible { outline: 2px solid var(--rb-ink); outline-offset: 2px; }
.rb-req-line > .bi:first-child { font-size: 16px; color: color-mix(in srgb, var(--t) 80%, #000); }
.rb-req-line b { font-family: var(--rb-cond); font-size: 15px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; color: var(--rb-ink); }
.rb-req-line-m { font-size: 13px; color: var(--rb-mute); }
.rb-req-line .rb-tag { height: 22px; }
.rb-req-line-pin { margin-left: auto; color: var(--rb-mute); }
.rb-req-line.on .rb-req-line-pin { color: color-mix(in srgb, var(--t) 80%, #000); }
.rb-dep { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 1px var(--rb-line); }
.rb-dep-h { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; font-size: 14px; color: var(--rb-ink-2); }
.rb-dep-h b { color: var(--rb-ink); }
.rb-dep-pick { display: flex; flex-direction: column; gap: 6px; animation: rb-unfold 200ms var(--rb-ease); }
.rb-dep-pick > p { margin: 0; font-size: 14px; color: var(--rb-ink-2); }
.rb-dep-o { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 12px; border: 1px solid var(--rb-line); border-radius: 10px; cursor: pointer; }
.rb-dep-o:has(input:checked) { border-color: var(--rb-ink); box-shadow: inset 0 0 0 1px var(--rb-ink); }
.rb-dep-o input { width: 18px; height: 18px; margin: 0; accent-color: var(--rb-ink); }
.rb-dep-o > span:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rb-dep-o b { font-size: 14px; }
.rb-dep-o small { font-size: 13px; color: var(--rb-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rb-dep-o > span:last-child { flex: none; font-weight: 700; font-size: 14px; }
.rb-dep-plan { margin: 4px 0 0; padding: 10px 12px; border-radius: 10px; background: #FEF3C7; color: #713F12; font-size: 13.5px; font-weight: 600; }

.rb-closed { align-self: center; display: flex; gap: 8px; align-items: flex-start; max-width: 560px; margin: 10px 0; padding: 10px 14px; border-radius: 12px; background: #DCFCE7; color: #166534; font-size: 14px; font-weight: 600; line-height: 1.45; }

/* Composer */
.rb-composer { display: flex; flex-direction: column; gap: 10px; padding: 12px 18px 14px; border-top: 1px solid var(--rb-line-2); background: #fff; }
.rb-composer.is-note { background: #FFFBEB; border-top-color: #E2C35A; }
.rb-composer-bar { display: flex; align-items: center; gap: 10px; }
.rb-seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 11px; background: #EEF0F3; }
.rb-seg button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; font-size: 14px; font-weight: 600; color: var(--rb-ink-2); cursor: pointer; }
.rb-seg button.on { background: #fff; color: var(--rb-ink); box-shadow: 0 1px 3px rgba(22, 23, 27, .12); }
.rb-composer.is-note .rb-seg button.on { color: #854D0E; }
.rb-seg--full { display: flex; width: 100%; }
.rb-seg--full button { flex: 1; }
.rb-seg button.on.p-alta { color: var(--rb-red-ink); }
.rb-drawer { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--rb-line); background: #fff; font-size: 14px; font-weight: 700; cursor: pointer; }
.rb-drawer > .bi:first-child { color: var(--rb-ink-2); }
.rb-drawer .rb-chev { font-size: 12px; }
.rb-drawer.open { border-color: var(--rb-ink); }
.rb-quick { display: flex; flex-wrap: wrap; gap: 6px; animation: rb-unfold 200ms var(--rb-ease); }
.rb-quick button { min-height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--rb-line); background: color-mix(in srgb, var(--t) 7%, #fff); font-size: 14px; font-weight: 600; cursor: pointer; }
.rb-quick button:hover { border-color: var(--t); color: color-mix(in srgb, var(--t) 80%, #000); }
.rb-write { display: flex; gap: 10px; align-items: flex-end; }
.rb-write textarea {
  flex: 1; min-width: 0; min-height: 56px; max-height: 220px; field-sizing: content; resize: none;
  padding: 14px 16px; border: 1px solid #B9BEC8; border-radius: 14px; background: var(--rb-sunk); font-size: 15px; line-height: 1.5;
}
.rb-write textarea::placeholder { color: var(--rb-mute); }
.rb-write textarea:focus { outline: none; border-color: var(--rb-ink); background: #fff; box-shadow: 0 0 0 3px rgba(22, 23, 27, .1); }
.rb-composer.is-note textarea { background: #fff; border-color: #E2C35A; }
.rb-send {
  flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 56px; padding: 0 20px; border: 0; border-radius: 14px;
  background: var(--rb-ink); color: #fff; font-size: 15px; font-weight: 700; cursor: pointer;
  transition: background-color 160ms, transform 120ms;
}
.rb-send:hover:not(:disabled) { background: #2B2D35; }
.rb-send:active:not(:disabled) { transform: translateY(1px); }
.rb-send:disabled { background: #C3C7D0; color: #454A57; cursor: not-allowed; }
.rb-composer.is-note .rb-send:not(:disabled) { background: #A16207; }
.rb-composer-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; font-size: 13.5px; }
.rb-composer-foot > button { display: inline-flex; align-items: center; gap: 5px; border: 0; background: none; padding: 2px 0; font-weight: 700; color: var(--rb-ink-2); cursor: pointer; }
.rb-composer-foot > button:hover:not(:disabled) { color: var(--rb-ink); text-decoration: underline; text-underline-offset: 3px; }
.rb-composer-foot > button:disabled { opacity: .5; cursor: not-allowed; }
.rb-sp { flex: 1; }
.rb-kbd { padding: 1px 7px; border-radius: 5px; box-shadow: inset 0 0 0 1px var(--rb-line); font-size: 12px; font-weight: 600; color: var(--rb-mute); }
.rb-mail { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--rb-ink-2); cursor: pointer; }
.rb-mail input { width: 16px; height: 16px; margin: 0; accent-color: var(--rb-ink); }
.rb-mail.off { color: var(--rb-mute); cursor: default; }
.rb-warn { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; background: #FEF3C7; color: #713F12; font-size: 13.5px; font-weight: 600; }
.rb-toast { font-size: 13.5px; font-weight: 600; color: var(--rb-green); }
.rb-toast.err { color: #713F12; }

/* ── Moduli a destra ────────────────────────────────────────── */
.rb-side { display: flex; flex-direction: column; gap: 10px; min-height: 0; overflow-y: auto; padding: 18px 14px 24px; background: var(--rb-page); border-left: 1px solid var(--rb-line); }
.rb-side-head { display: none; align-items: center; justify-content: space-between; }
.rb-side-head b { font-size: 22px; }
.rb-side-empty { margin: 0; font-size: 14px; color: var(--rb-ink-2); }
.rb-scrim { display: none; }
.rb-cust { display: flex; align-items: center; gap: 12px; }
.rb-cust > div { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.rb-cust b { font-size: 17px; }
.rb-tier { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 6px; background: #EEF0F3; color: var(--rb-ink-2); font-family: var(--rb-cond); font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.rb-tier.gold { background: #FEF3C7; color: #854D0E; }
.rb-line { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--rb-ink-2); word-break: break-all; }
.rb-field { display: flex; flex-direction: column; gap: 6px; }
.rb-field > span { font-family: var(--rb-cond); font-size: 14px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--rb-ink-2); }
.rb-select {
  width: 100%; min-height: 42px; padding: 0 34px 0 12px; border: 1px solid #B9BEC8; border-radius: 10px; font-size: 14.5px; font-weight: 600;
  appearance: none; -webkit-appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235E6371' d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right 12px center;
}
.rb-select:focus { outline: none; border-color: var(--rb-ink); box-shadow: 0 0 0 3px rgba(22, 23, 27, .1); }
.rb-topics { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.rb-topics button {
  display: flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 10px; border-radius: 9px;
  border: 1px solid var(--rb-line); background: #fff; font-size: 13.5px; font-weight: 600; text-align: left; cursor: pointer;
}
.rb-topics button i { color: var(--t); }
.rb-topics button:hover { border-color: var(--t); }
.rb-topics button.on { background: var(--t); border-color: var(--t); color: #fff; }
.rb-topics button.on i { color: #fff; }
.rb-order { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--rb-line); background: #fff; text-align: left; cursor: pointer; }
.rb-order:hover { border-color: var(--rb-ink); }
.rb-order.linked { border-color: var(--rb-ink); background: var(--rb-sunk); }
.rb-order-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rb-order-t b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rb-order-t small { font-size: 13px; color: var(--rb-mute); }
.rb-order-p { flex: none; font-weight: 700; font-size: 14px; }
.rb-other { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--rb-line); background: #fff; text-align: left; cursor: pointer; }
.rb-other:hover { border-color: var(--t); }
.rb-other-ic { flex: none; width: 26px; height: 34px; border-radius: 4px; display: grid; place-items: center; background: var(--t); color: #fff; font-size: 13px; }
.rb-other > span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; }
.rb-other b { font-size: 14px; }
.rb-other small { font-size: 13px; color: var(--rb-mute); }
.rb-spin { display: inline-block; animation: rb-spin 1s linear infinite; }
@keyframes rb-spin { to { transform: rotate(360deg); } }

/* Contatti (componente condiviso CustomerContact) */
.rb .cc-contact { display: flex; flex-wrap: wrap; gap: 6px; }
.rb .cc-contact a { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 9px; font-size: 14px; font-weight: 700; text-decoration: none; }
.rb .cc-contact .dh-wa { background: #DCFCE7; color: #14532D !important; border: 1px solid #BBF7D0; }
.rb .cc-contact .cc-contact-btn { background: #fff; color: var(--rb-ink); border: 1px solid var(--rb-line); }
.rb .cc-contact a:hover { border-color: var(--rb-ink); }

/* Dettaglio ordine/drop (fuori da .rb: valori espliciti) */
.rb-modal { position: fixed; inset: 0; z-index: 9000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(22, 23, 27, .55); font-family: 'Barlow', system-ui, sans-serif; color: #16171B; }
.rb-modal-card { width: 100%; max-width: 520px; max-height: 90dvh; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; padding: 20px; border-radius: 18px; background: #fff; box-shadow: 0 24px 60px rgba(22, 23, 27, .3); animation: rb-unfold 220ms cubic-bezier(.16, 1, .3, 1); }
.rb-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.rb-modal-head > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rb-modal-head small { font-size: 13px; color: #5E6371; }
.rb-modal-head b { font-size: 19px; }
.rb-modal .rb-icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; border: 1px solid #D8DBE1; background: #fff; cursor: pointer; }
.rb-modal .rb-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.rb-modal .rb-tag { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px; border-radius: 6px; background: #F1F2F5; color: #454A57; font-size: 13px; font-weight: 700; }
.rb-lines { display: flex; flex-direction: column; gap: 6px; }
.rb-line-item { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 10px; background: #F6F7F9; font-size: 14px; }
.rb-line-item > span:first-child { display: flex; flex-direction: column; min-width: 0; }
.rb-line-item small { color: #5E6371; }
.rb-line-item > span:last-child { display: flex; flex-direction: column; align-items: flex-end; flex: none; color: #454A57; }
.rb-modal-total { display: flex; align-items: center; justify-content: space-between; padding-top: 12px; border-top: 1px solid #E6E8EC; font-size: 14px; color: #454A57; }
.rb-modal-total b { font-size: 22px; color: #16171B; }
.rb-modal .rb-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; border-radius: 10px; border: 1px solid #B9BEC8; background: #fff; font-weight: 700; cursor: pointer; }
.rb-modal .rb-side-empty { margin: 0; color: #454A57; font-size: 14px; }
.rb-modal .rb-num, .rb-modal .rb-code { font-variant-numeric: tabular-nums; }

/* ══ Larghezze ══════════════════════════════════════════════════ */

/* Moduli a cassetto: sotto i 1600px la chat ha la precedenza */
@media (max-width: 1599px) {
  .rb { grid-template-columns: 236px 340px minmax(0, 1fr); }
  .rb-side-btn { display: grid; }
  .rb-side {
    position: absolute; top: 0; right: 0; bottom: 0; z-index: 6; width: min(380px, 100%);
    box-shadow: -16px 0 40px rgba(22, 23, 27, .18);
    transform: translateX(105%); transition: transform 260ms var(--rb-ease);
  }
  .rb-side-head { display: flex; }
  .rb-side-open .rb-side { transform: none; }
  .rb-side-open .rb-scrim { display: block; position: absolute; inset: 0; z-index: 5; background: rgba(22, 23, 27, .3); }
}

/* Divisori stretti: solo la carta colorata e il conteggio */
@media (max-width: 1179px) {
  .rb { grid-template-columns: 84px 330px minmax(0, 1fr); }
  .rb-rail { padding-left: 10px; }
  .rb-rail-head { padding: 0 0 14px; align-items: center; }
  .rb-rail-head h1 { font-size: 22px; }
  .rb-rail-sum, .rb-tab-l, .rb-mine span:last-child { display: none; }
  .rb-tab { flex-direction: column; gap: 4px; padding: 8px 6px; min-height: 0; }
  .rb-tab-n, .rb-tab-o { min-width: 22px; height: 20px; font-size: 12px; }
  .rb-mine { margin: 12px 0 0; justify-content: center; }
}
@media (max-width: 1080px) {
  .rb { height: calc(100dvh - 56px - 40px); }
}

/* Telefono: un pannello alla volta, a tutto schermo sotto la barra del portale */
@media (max-width: 899px) {
  .rb {
    position: fixed; top: 56px; left: 0; right: 0; bottom: 0; z-index: 20;
    height: auto; min-height: 0; border-radius: 0; box-shadow: none;
    grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr);
  }
  .rb-rail { grid-row: 1; padding: 12px 0 0; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .rb-rail-head { flex-direction: row; align-items: baseline; gap: 10px; padding: 0 16px 10px; flex: 1; }
  .rb-rail-head h1 { font-size: 26px; }
  .rb-rail-sum { display: inline; font-size: 13px; }
  .rb-mine { order: 3; flex: 0 0 100%; justify-content: flex-start; margin: 0; padding: 0 16px 12px; border: 0; }
  .rb-mine span:last-child { display: inline; }
  .rb-tabs { order: 4; flex: 0 0 100%; flex-direction: row; gap: 4px; overflow-x: auto; overflow-y: hidden; padding: 0 12px; scrollbar-width: none; }
  .rb-tabs::-webkit-scrollbar { display: none; }
  .rb-tab { flex: none; flex-direction: row; gap: 8px; min-height: 48px; padding: 6px 12px 8px 8px; border-radius: 12px 12px 0 0; }
  .rb-tab-l { display: inline; max-width: 130px; font-size: 14px; }
  .rb-tab-card { width: 24px; height: 32px; font-size: 13px; }
  .rb-tab.on::before, .rb-tab.on::after, .rb-tab.on .rb-tab-edge { display: none; }
  .rb-tab.on .rb-tab-card { transform: rotate(-4deg); }
  .rb-list, .rb-chat { grid-row: 2; grid-column: 1; }
  .rb-pane-chat .rb-rail, .rb-pane-chat .rb-list { display: none; }
  .rb-pane-chat .rb-chat { grid-row: 1 / span 2; }
  .rb-pane-list .rb-chat { display: none; }
  .rb-list { padding: 14px 12px 0; }
  .rb-list-head h2 { font-size: 26px; }
  .rb-pockets:not(:hover) .rb-pocket:not(.on) { opacity: 1; }
  .rb-chat { border-left: 0; }
  .rb-back { display: grid; }
  .rb .rb-hide-sm { display: none; }
  .rb-chat-head { flex-wrap: nowrap; padding: 10px 10px 10px 12px; gap: 10px; }
  .rb-chat-who { flex: 1 1 0; }
  .rb-chat-act { margin-left: 0; }
  .rb-chat-head .rb-av { display: none; }
  .rb-chat-who > b { font-size: 17px; }
  .rb-chat-who .rb-code { display: none; }
  .rb-status select { padding-left: 10px; font-size: 13.5px; max-width: 150px; }
  .rb-msgs { padding: 14px 12px 18px; }
  .rb-bubble { max-width: 86%; }
  .rb-req { width: 94%; }
  .rb-pin { max-height: 55%; padding: 10px 12px; }
  .rb-dep-o { min-height: 52px; }
  .rb-tabs-sep { display: none; }
  .rb-req-act .rb-btn { min-height: 44px; flex: 1 1 auto; }
  .rb-composer { padding: 10px 10px calc(10px + env(safe-area-inset-bottom, 0px)); gap: 8px; }
  .rb-seg button { padding: 0 10px; white-space: nowrap; }
  .rb-seg button i, .rb-drawer .rb-chev { display: none; }
  .rb-drawer { padding: 0 10px; white-space: nowrap; }
  .rb-send span, .rb-kbd { display: none; }
  .rb-send { padding: 0 18px; }
  .rb-write textarea, .rb-search input { font-size: 16px; }
  .rb-composer-foot { font-size: 13px; gap: 0 14px; }
  .rb-composer-foot > button { min-height: 44px; }
  .rb-quick button, .rb-drawer, .rb-prev button, .rb-view, .rb-topics button { min-height: 44px; }
  .rb-seg button { min-height: 40px; }
  .rb .cc-contact a { min-height: 44px; }
  .rb-side { width: 100%; }
  .rb-modal { align-items: flex-end; padding: 0; }
  .rb-modal-card { border-radius: 18px 18px 0 0; max-height: 88dvh; padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)); }
}

@media (prefers-reduced-motion: reduce) {
  .rb *, .rb *::before, .rb *::after, .rb-modal-card { transition-duration: 0s !important; animation-duration: 0s !important; }
}
