/* ==========================================================================
   Comms Hub stylesheet.
   Section 1 is copied verbatim from the BE-OND / MitreLink biller app.css
   (billing.be-ond.com/static/app.css v178) so the hub shares its design
   language: slate dark theme, #4eec00 brand green, #4eec00 buttons,
   12px-radius cards, pills, tables, forms and the collapsible side nav.
   ========================================================================== */

/* ---- 1. Biller base (verbatim) ---- */
:root { color-scheme: dark; }
* { box-sizing: border-box; }
html { overflow-x: clip; }
body { font-family: ui-sans-serif, system-ui, sans-serif; margin: 24px; background: #141414; color: #f2f0ec; overflow-x: clip; }
body.has-side { margin: 0; display: flex; min-height: 100vh; max-width: 100%; }
.stage { flex: 1; min-width: 0; max-width: 100%; padding: 24px; overflow-x: clip; position: relative; z-index: 0; }
h1 { margin: 0 0 4px; font-size: 22px; }
h1.brand { display: flex; align-items: center; gap: 12px; color: #4eec00; }
h1.brand img { height: 40px; width: auto; max-width: 180px; object-fit: contain; border-radius: 8px; }
h2 { margin: 0 0 12px; font-size: 16px; }
.sub { color: #4eec00; margin-bottom: 20px; font-weight: 700; }
.grid { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.card { background: #1e1e1e; border-radius: 12px; padding: 16px 18px; margin-bottom: 16px; }
.stat { min-width: 140px; }
.stat .n { font-size: 28px; font-weight: 700; }
.stat .l { color: #9a9690; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.ok { color: #30d158; }
.bad { color: #ff6961; }
.warn { border: 1px solid #f0d48a; }
.okbox { border: 1px solid #30d158; color: #30d158; }
.errbox { border: 1px solid #ff6961; color: #ff9b94; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #2a2a2e; vertical-align: top; }
th { color: #4eec00; font-weight: 600; background: #1e1e1e; }
th a { color: #4eec00; text-decoration: none; }
th a:hover { text-decoration: underline; }
tr:hover { background: #2a2a2e; }
.pill { padding: 2px 8px; border-radius: 999px; font-size: 12px; display: inline-block; }
.pill.active { background: #163a2a; color: #30d158; }
.pill.blocked { background: #3a1515; color: #ff9b94; }
.pill.inactive { background: #2a2a2e; color: #d6d3cd; }
.pill.lead { background: #3a2f12; color: #f0d48a; }
.pill.access_point { background: #2a2a2e; color: #d6d3cd; }
.pill.open { background: #1e3b10; color: #4eec00; }
.pill.paid { background: #163a2a; color: #30d158; }
.pill.void, .pill.draft { background: #2a2a2e; color: #d6d3cd; }
.pill.other, .pill.error { background: #3a1515; color: #ff9b94; }
.pill.ok { background: #163a2a; color: #30d158; }
code { font-family: ui-monospace, monospace; }
.tablewrap { overflow: auto; max-height: 70vh; }
form.row, .row { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #9a9690; }
input, select, textarea { background: #141414; color: #f2f0ec; border: 1px solid #2a2a2e; border-radius: 8px; padding: 8px 10px; font: inherit; }
textarea { min-width: 280px; min-height: 70px; }
label.wide { min-width: min(100%, 520px); }
button, .btn { background: #4eec00; color: white; border: 0; border-radius: 8px; padding: 8px 14px; cursor: pointer; font: inherit; text-decoration: none; display: inline-block; }
button.danger, .btn.danger { background: #3a1515; }
button.ghost, .btn.ghost { background: #2a2a2e; }
form.inline { display: inline; margin-right: 6px; }
.hint { color: #9a9690; font-size: 13px; margin: 0 0 12px; }
.muted { color: #9a9690; }
a { color: #4eec00; }
.actions button, .actions .btn { font-size: 12px; padding: 4px 10px; }
nav.bar { display: flex; gap: 6px; margin: 12px 0 18px; border-bottom: 1px solid #2a2a2e; padding-bottom: 8px; align-items: center; flex-wrap: wrap; }
nav.bar a { color: #9a9690; text-decoration: none; padding: 8px 14px; border-radius: 8px 8px 0 0; font-size: 14px; font-weight: 600; }
nav.bar a:hover { color: #f2f0ec; background: #2a2a2e; }
nav.bar a.on { color: #f2f0ec; background: #1e1e1e; border: 1px solid #2a2a2e; border-bottom-color: #1e1e1e; }
nav.bar .lang, .side .lang { display: flex; margin-left: auto; border: 1px solid #2a2a2e; border-radius: 999px; overflow: hidden; }
nav.bar .lang button, .side .lang button { background: transparent; color: #9a9690; padding: 4px 10px; font-size: 11px; font-weight: 700; border: 0; border-radius: 0; }
nav.bar .lang button.on, .side .lang button.on { background: #4eec00; color: #fff; }
nav.bar .who { margin-left: 8px; color: #9a9690; font-size: 12px; font-weight: 500; padding: 8px 10px; }
/* ---- biller side nav (verbatim) ---- */
.side-slot { flex: 0 0 228px; position: relative; z-index: 400; min-height: 100vh; }
html.nav-collapsed .side-slot { flex: 0 0 64px; }
.side {
  position: absolute;
  inset: 0 auto 0 0;
  width: 228px;
  background: #0e0e0e;
  border-right: 1px solid #1e1e1e;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width .2s ease;
  z-index: 401;
}
html.nav-collapsed .side { width: 64px; }
html.nav-collapsed .side-slot:hover .side,
html.nav-collapsed .side:hover {
  width: 228px;
  box-shadow: 12px 0 28px rgba(0,0,0,.4);
}
.side-brand { padding: 16px 14px 12px; display: flex; align-items: center; justify-content: flex-start; min-height: 64px; }
.side-brand .brand { margin: 0; font-size: 15px; gap: 10px; overflow: hidden; }
.side-brand .brand img { height: 32px; max-width: 120px; }
.side-mark {
  display: block;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: contain;
  flex: 0 0 36px;
  background: #141414;
}
html.nav-collapsed .side-mark { display: block; }
html.nav-collapsed .side-brand .brand { display: none; }
html.nav-collapsed .side-slot:hover .side-brand .brand { display: flex; }
.side-nav { display: flex; flex-direction: column; gap: 2px; padding: 4px 8px; flex: 1; overflow: auto; }
.side-nav a, .side-out {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #9a9690;
  text-decoration: none;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}
.side-nav a:hover, .side-out:hover { color: #f2f0ec; background: #1e1e1e; }
.side-nav a.on { color: #f2f0ec; background: #1e3b10; }
.side .ico { width: 22px; height: 22px; flex: 0 0 22px; display: block; }
.side-foot { padding: 10px 8px 12px; display: flex; flex-direction: column; gap: 8px; border-top: 1px solid #1e1e1e; }
.side .lang { margin-left: 0; align-self: flex-start; }
.side .who { color: #7a7670; font-size: 11px; padding: 0 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-toggle {
  background: transparent;
  color: #9a9690;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.side-toggle:hover { color: #f2f0ec; background: #1e1e1e; }
html.nav-collapsed .side-toggle .ico-open { display: none; }
html:not(.nav-collapsed) .side-toggle .ico-shut { display: none; }
html.nav-collapsed .side .lbl,
html.nav-collapsed .side .who,
html.nav-collapsed .side-brand span { display: none; }
html.nav-collapsed .side-slot:hover .side .lbl,
html.nav-collapsed .side-slot:hover .side .who,
html.nav-collapsed .side-slot:hover .side-brand span { display: inline; }
html.nav-collapsed .side-nav a, html.nav-collapsed .side-out { justify-content: center; padding-left: 0; padding-right: 0; }
html.nav-collapsed .side-slot:hover .side-nav a,
html.nav-collapsed .side-slot:hover .side-out { justify-content: flex-start; padding-left: 10px; padding-right: 10px; }
html.nav-collapsed .side .lang { display: none; }
html.nav-collapsed .side-slot:hover .side .lang { display: flex; }
html.nav-collapsed .side-brand { display: flex; justify-content: center; }
html.nav-collapsed .side-slot:hover .side-brand { justify-content: flex-start; }
.login-box { max-width: 420px; margin: 8vh auto; }
/* ---- biller confirm modal (verbatim) ---- */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 16px;
}
.modal[hidden] { display: none; }
.modal-card {
  background: #1e1e1e;
  border: 1px solid #2a2a2e;
  border-radius: 12px;
  padding: 22px 24px;
  max-width: 420px;
  width: 100%;
}
.modal-card p { margin: 0 0 18px; font-size: 16px; line-height: 1.4; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* ==========================================================================
   2. Comms Hub components (same palette: bg #141414, panel #1e1e1e,
      side #0e0e0e, line #2a2a2e, muted #9a9690, link #4eec00, blue #4eec00)
   ========================================================================== */
[hidden] { display: none !important; }
button:disabled, .btn.disabled { opacity: .5; cursor: not-allowed; }
button.small, .btn.small { font-size: 12px; padding: 4px 10px; }
button.link { background: transparent; color: #4eec00; padding: 0; }
button.icon { background: transparent; color: #9a9690; padding: 7px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; }
button.icon:hover { background: #2a2a2e; color: #f2f0ec; }
.ico { width: 20px; height: 20px; flex: 0 0 auto; }
.ico.sm { width: 16px; height: 16px; }
.pill.demo { background: #3a2f12; color: #f0d48a; font-weight: 700; letter-spacing: .03em; }
.pill.pending { background: #3a2f12; color: #f0d48a; }
.pill.closed { background: #2a2a2e; color: #d6d3cd; }
.pill.biz-usa { background: #1e3b10; color: #4eec00; }
.pill.biz-pa { background: #134e4a; color: #5eead4; }
.pill.nc { background: #2a2a2e; color: #d6d3cd; }
.pill.tag { background: #1e1e1e; border: 1px solid #2a2a2e; color: #d6d3cd; display: inline-flex; align-items: center; gap: 6px; }
.pill.tag i { width: 8px; height: 8px; border-radius: 999px; display: inline-block; }
.pill.tag button { background: none; color: #9a9690; padding: 0 0 0 2px; line-height: 1; font-size: 14px; }

/* brand mark (biller logo treatment: rounded square image next to green text) */
.mark { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 8px; background: #4eec00; color: #0e0e0e; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; letter-spacing: -.02em; }
h1.brand .mark { width: 40px; height: 40px; font-size: 17px; }
.side-brand { gap: 10px; }
.side-brand .brand span small { display: block; color: #7a7670; font-size: 11px; font-weight: 600; }

/* business switch (styled like the biller EN/ES .lang pill) */
.seg { display: inline-flex; border: 1px solid #2a2a2e; border-radius: 999px; overflow: hidden; flex: 0 0 auto; }
.seg button { background: transparent; color: #9a9690; padding: 5px 12px; font-size: 12px; font-weight: 700; border-radius: 0; white-space: nowrap; }
.seg button.on { background: #4eec00; color: #fff; }
.side .seg { margin: 0 2px; }
.side .seg button { padding: 4px 9px; font-size: 11px; }
html.nav-collapsed .side .seg { display: none; }
html.nav-collapsed .side-slot:hover .side .seg { display: inline-flex; }
.side-nav a .count { margin-left: auto; background: #4eec00; color: #fff; border-radius: 999px; font-size: 11px; padding: 1px 7px; }
html.nav-collapsed .side-nav a .count { display: none; }
.side-nav a.soon { opacity: .6; }
.side-nav .sect { color: #3a3a3e; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; padding: 12px 10px 4px; font-weight: 700; }
html.nav-collapsed .side-nav .sect { visibility: hidden; height: 8px; padding: 0; }

/* full-height app shell */
body.has-side { height: 100vh; height: 100dvh; overflow: hidden; }
.stage.app { padding: 0; display: flex; flex-direction: column; height: 100vh; height: 100dvh; overflow: hidden; }
.stage.page { overflow-y: auto; height: 100vh; height: 100dvh; }
.mtop { display: none; }

/* ---- Inbox: list | thread | contact ---- */
.inbox { flex: 1; display: grid; grid-template-columns: 360px minmax(0, 1fr) 320px; min-height: 0; }
.col { min-height: 0; display: flex; flex-direction: column; border-right: 1px solid #1e1e1e; }
.col:last-child { border-right: 0; }
.list-head { padding: 16px 14px 10px; border-bottom: 1px solid #1e1e1e; display: flex; flex-direction: column; gap: 10px; }
.list-head .top { display: flex; align-items: center; gap: 8px; }
.list-head h1 { font-size: 20px; margin: 0; flex: 1; }
.search { position: relative; }
.search input { width: 100%; padding-left: 34px; }
.search .ico { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: #7a7670; width: 16px; height: 16px; }
.stabs { display: flex; gap: 4px; border-bottom: 1px solid #2a2a2e; margin: 0 -14px -10px; padding: 0 10px; overflow-x: auto; scrollbar-width: none; }
.stabs a { color: #9a9690; text-decoration: none; padding: 8px 10px; font-size: 13px; font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; cursor: pointer; }
.stabs a:hover { color: #f2f0ec; }
.stabs a.on { color: #f2f0ec; border-bottom-color: #4eec00; }
.stabs a .n { color: #7a7670; font-weight: 500; margin-left: 4px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filters select { padding: 6px 8px; font-size: 13px; flex: 1 1 120px; min-width: 0; }
.chk { flex-direction: row; align-items: center; gap: 6px; font-size: 13px; color: #d6d3cd; white-space: nowrap; }
.chk input { accent-color: #4eec00; width: 16px; height: 16px; }
.conv-list { overflow-y: auto; flex: 1; }
.conv { display: flex; gap: 10px; padding: 12px 14px; border-bottom: 1px solid #1e1e1e; cursor: pointer; text-decoration: none; color: inherit; position: relative; }
.conv:hover { background: #1e1e1e; }
.conv.on { background: #1e3b10; }
.conv.unread::before { content: ""; position: absolute; left: 4px; top: 50%; width: 6px; height: 6px; border-radius: 999px; background: #4eec00; transform: translateY(-50%); }
.conv .body { flex: 1; min-width: 0; }
.conv .r1 { display: flex; align-items: center; gap: 6px; }
.conv .name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.conv.unread .name { color: #fff; font-weight: 700; }
.conv .time { color: #7a7670; font-size: 12px; flex: 0 0 auto; }
.conv .subj { font-size: 13px; color: #d6d3cd; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.conv .prev { font-size: 13px; color: #9a9690; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.conv.unread .prev { color: #f2f0ec; }
.conv .meta { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; align-items: center; }
.conv .meta .pill { font-size: 11px; padding: 1px 7px; }
.conv .who { color: #7a7670; font-size: 11px; margin-left: auto; }
.avatar { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 999px; background: #2a2a2e; color: #f2f0ec; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; position: relative; }
.avatar.lg { width: 56px; height: 56px; flex-basis: 56px; font-size: 18px; }
.avatar .chb { position: absolute; right: -3px; bottom: -3px; width: 18px; height: 18px; border-radius: 999px; display: flex; align-items: center; justify-content: center; border: 2px solid #141414; }
.avatar .chb .ico { width: 10px; height: 10px; color: #fff; }
.ch-sms { background: #4eec00; } .ch-voice { background: #7c3aed; } .ch-whatsapp { background: #16a34a; }
.ch-facebook { background: #1d4ed8; } .ch-instagram { background: #db2777; } .ch-email { background: #d97706; } .ch-biller_ticket { background: #3a3a3e; }
.empty { color: #7a7670; text-align: center; padding: 48px 20px; font-size: 14px; }
.empty .ico { width: 40px; height: 40px; color: #2a2a2e; margin-bottom: 8px; }

.thread-head { padding: 12px 16px; border-bottom: 1px solid #1e1e1e; display: flex; align-items: center; gap: 10px; min-height: 64px; }
.thread-head .t { flex: 1; min-width: 0; }
.thread-head .t b { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread-head .t span { color: #9a9690; font-size: 12px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 2px; }
.thread-head .acts { display: flex; gap: 6px; align-items: center; }
.thread-head select { padding: 6px 8px; font-size: 13px; max-width: 160px; }
.back { display: none; }
.msgs { flex: 1; overflow-y: auto; padding: 18px 16px; display: flex; flex-direction: column; gap: 10px; }
.day { align-self: center; color: #7a7670; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; margin: 6px 0; }
.msg { max-width: min(560px, 82%); display: flex; flex-direction: column; gap: 4px; }
.msg .bub { padding: 9px 13px; border-radius: 12px; font-size: 14px; line-height: 1.45; white-space: pre-wrap; word-wrap: break-word; }
.msg .info { font-size: 11px; color: #7a7670; display: flex; gap: 6px; align-items: center; }
.msg.in { align-self: flex-start; }
.msg.in .bub { background: #1e1e1e; border-bottom-left-radius: 4px; }
.msg.out { align-self: flex-end; align-items: flex-end; }
.msg.out .bub { background: #1e3b10; color: #f2f0ec; border-bottom-right-radius: 4px; }
.msg.note { align-self: flex-end; align-items: flex-end; }
.msg.note .bub { background: #3a2f12; color: #f0d48a; border: 1px dashed #8a6d1f; }
.msg.event { align-self: center; max-width: 90%; }
.msg.event .bub { background: transparent; color: #7a7670; font-size: 12px; padding: 2px 8px; text-align: center; }
.ds { font-size: 11px; }
.ds.not_sent { color: #f0d48a; }
.composer { border-top: 1px solid #1e1e1e; padding: 10px 16px 14px; background: #141414; }
.composer .ctabs { display: flex; gap: 4px; margin-bottom: 8px; }
.composer .ctabs button { background: transparent; color: #9a9690; font-size: 13px; font-weight: 600; padding: 5px 10px; }
.composer .ctabs button.on { background: #1e1e1e; color: #f2f0ec; }
.composer .ctabs button.on.note { background: #3a2f12; color: #f0d48a; }
.composer .box { border: 1px solid #2a2a2e; border-radius: 12px; background: #1e1e1e; padding: 8px; }
.composer .box.note { border-color: #8a6d1f; background: #1f1a0c; }
.composer textarea { width: 100%; min-width: 0; min-height: 64px; max-height: 220px; border: 0; background: transparent; resize: none; padding: 4px 6px; outline: none; }
.composer .bar2 { display: flex; align-items: center; gap: 8px; }
.composer .bar2 .hint { margin: 0; flex: 1; font-size: 12px; }
.warnline { font-size: 12px; color: #f0d48a; display: flex; gap: 6px; align-items: center; margin-bottom: 8px; }

.contact { overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 14px; background: #141414; }
.contact .card { margin: 0; padding: 14px; }
.contact h3 { margin: 0 0 10px; font-size: 12px; color: #4eec00; text-transform: uppercase; letter-spacing: .04em; display: flex; align-items: center; justify-content: space-between; }
.chead { display: flex; gap: 12px; align-items: center; }
.chead b { font-size: 16px; display: block; }
.kv { display: grid; grid-template-columns: 22px 1fr; gap: 8px 8px; font-size: 13px; align-items: center; }
.kv .ico { color: #7a7670; width: 16px; height: 16px; }
.kv span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact label { margin-bottom: 8px; }
.contact input, .contact select, .contact textarea { width: 100%; min-width: 0; }
.contact .row { gap: 8px; }
.linked { border: 1px solid #163a2a; background: #12260c; border-radius: 8px; padding: 10px; font-size: 13px; display: flex; gap: 10px; align-items: center; }
.linked .ico { color: #30d158; }
.linked div { flex: 1; min-width: 0; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.mini { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.mini a { text-decoration: none; display: flex; gap: 6px; align-items: center; }
.contact-close { display: none; }

/* ---- pages ---- */
.page-h { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-h h1 { margin: 0; flex: 1; }
.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.cgrid .card { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.conn-h { display: flex; gap: 12px; align-items: center; }
.conn-ico { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex: 0 0 40px; }
.conn-ico .ico { color: #fff; }
.conn-h b { display: block; font-size: 15px; }
.conn-h small { color: #9a9690; }
.conn-st { display: flex; flex-direction: column; gap: 6px; font-size: 13px; border-top: 1px solid #2a2a2e; padding-top: 10px; }
.conn-st div { display: flex; justify-content: space-between; align-items: center; }
.card p { margin: 0; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #1e1e1e; border: 1px solid #2a2a2e; border-radius: 10px; padding: 10px 16px; font-size: 14px; z-index: 900; box-shadow: 0 10px 30px rgba(0,0,0,.4); transition: opacity .3s; }
.toast.err { border-color: #ff6961; color: #ff9b94; }
.modal-card { width: min(480px, 94vw); }
.modal-card h2 { margin: 0 0 12px; }
.modal-card form.stack label { width: 100%; }
.modal-card form.stack input, .modal-card form.stack select, .modal-card form.stack textarea { width: 100%; min-width: 0; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.err { color: #ff9b94; font-size: 13px; min-height: 18px; }
.drawer-bg { display: none; }

/* ---- responsive ---- */
@media (max-width: 1280px) {
  .inbox { grid-template-columns: 330px minmax(0, 1fr); }
  .inbox .contact { position: fixed; right: 0; top: 0; bottom: 0; width: min(360px, 100vw); z-index: 600; box-shadow: -12px 0 28px rgba(0,0,0,.5); border-left: 1px solid #1e1e1e; transform: translateX(105%); transition: transform .2s ease; }
  .inbox.show-contact .contact { transform: none; }
  .contact-close { display: inline-flex; }
}
@media (min-width: 1281px) { .info-btn { display: none !important; } }
@media (max-width: 860px) {
  body.has-side { display: block; }
  .side-slot { position: fixed; inset: 0 auto 0 0; z-index: 700; flex: none; min-height: 0; width: 0; }
  .side { width: 260px !important; transform: translateX(-105%); transition: transform .2s ease; box-shadow: none; }
  html.drawer-open .side { transform: none; box-shadow: 12px 0 28px rgba(0,0,0,.5); }
  html.drawer-open .drawer-bg { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.65); z-index: 650; }
  html.nav-collapsed .side .lbl, html.nav-collapsed .side .who, html.nav-collapsed .side-brand .brand, html.nav-collapsed .side .seg { display: inline-flex; }
  html.nav-collapsed .side-nav a { justify-content: flex-start; padding-left: 10px; }
  .side-toggle { display: none; }
  .mtop { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-bottom: 1px solid #1e1e1e; background: #0e0e0e; min-height: 52px; }
  .mtop .brand { margin: 0; font-size: 15px; flex: 1; gap: 8px; }
  .mtop .mark { width: 30px; height: 30px; flex-basis: 30px; font-size: 13px; }
  .mtop .seg button { padding: 4px 8px; font-size: 11px; }
  .stage.app, .stage.page { height: calc(100dvh - 52px); }
  .stage.page { padding: 16px 14px; }
  .inbox { grid-template-columns: 1fr; }
  .inbox .col.thread { display: none; }
  .inbox.has-conv .col.list { display: none; }
  .inbox.has-conv .col.thread { display: flex; }
  .back { display: inline-flex; }
  .thread-head { padding: 8px 10px; gap: 6px; }
  .thread-head .acts .assign-sel { display: none; }
  .msgs { padding: 14px 10px; }
  .msg { max-width: 88%; }
  .composer { padding: 8px 10px 10px; }
  .composer textarea { min-height: 44px; }
  .two { grid-template-columns: 1fr; }
  .cgrid { grid-template-columns: 1fr; }
  .tablewrap table { font-size: 12px; }
}

/* shell fixes */
body.has-side > #root { display: flex; flex: 1; min-width: 0; height: 100vh; height: 100dvh; }
button.side-out { background: transparent; width: 100%; border-radius: 8px; }
.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
@media (max-width: 860px) { body.has-side > #root { display: block; } }
.col { min-width: 0; }
@media (min-width: 1281px) { .contact .contact-close { display: none; } }
@media (max-width: 860px) { .inbox { grid-template-columns: minmax(0, 1fr); } .stabs { margin: 0 -14px -10px; } }
.inbox { grid-template-rows: minmax(0, 1fr); }
.contact select, .contact input, .contact textarea { font-size: 14px; }
.thread-head .subj-txt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 860px) {
  .thread-head .subj-txt, .thread-head #pend { display: none; }
  .thread-head .t span { flex-wrap: nowrap; }
}
.pill { white-space: nowrap; }
.thread-head .t span.subj-txt { display: inline; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
@media (max-width: 860px) { .thread-head .t span.subj-txt { display: none; } }

/* my account */
.acct { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; max-width: 1000px; }
.acct .card { margin: 0; }
.acct th { background: transparent; width: 40%; }
.acct form.stack input { width: 100%; max-width: 420px; }
.msgbox { margin: 0; padding: 10px 12px; font-size: 14px; background: #1e1e1e; }
a.who-link { text-decoration: none; display: block; }
a.who-link:hover { color: #f2f0ec; }
@media (max-width: 860px) { .acct { grid-template-columns: 1fr; } }
.acct form.stack label.chk { justify-content: flex-start; } .acct form.stack .chk input { width: 16px; flex: 0 0 16px; }

/* biller account card + tickets */
.bname { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 15px; }
.bgrid { display: grid; grid-template-columns: 70px 1fr; gap: 6px 10px; font-size: 13px; }
.bgrid span { color: #9a9690; }
.bgrid b.ok { color: #30d158; } .bgrid b.bad { color: #ff6961; }
.cands { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.cand { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid #2a2a2e; border-radius: 8px; background: #141414; }
.cand div { flex: 1; min-width: 0; }
.bsearch { display: flex; gap: 8px; align-items: end; margin-top: 10px; }
.bsearch label { flex: 1; margin: 0; }
.composer .ctabs button:disabled { opacity: .4; }
.conn-st div > span:first-child { min-width: 0; flex: 1; }
.conn-st div > .pill { flex: 0 0 auto; }
.conn-st div { gap: 8px; }
@media (max-width: 860px) { .tk-open { display: none; } }


/* ==========================================================================
   3. Qxopa admin theme (Ken, Nov 20): black / dark grey with neon green accent.
      Palette from qxopa.com dark theme: bg #141414, surface #1E1E1E, line #2a2a2e,
      ink #f2f0ec, muted #9a9690, accent #4EEC00 (dark #141414 text on accent).
   ========================================================================== */
:root { --bg: #141414; --surface: #1e1e1e; --side: #0e0e0e; --line: #2a2a2e; --ink: #f2f0ec; --muted: #9a9690; --accent: #4eec00; --accent-ink: #141414; --accent-soft: rgba(78, 236, 0, 0.16); }
body { font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; }
button, .btn { color: var(--accent-ink); font-weight: 600; }
button:hover:not(:disabled), .btn:hover { filter: brightness(1.08); }
button.ghost, .btn.ghost { color: var(--ink); background: #2a2a2e; }
button.ghost:hover, .btn.ghost:hover { background: #343438; filter: none; }
button.danger, .btn.danger { background: #3a1515; color: #ff9b94; }
button.link { color: var(--accent); font-weight: 500; }
button.icon { color: var(--muted); }
.seg button.on, nav.bar .lang button.on, .side .lang button.on { background: var(--accent); color: var(--accent-ink); }
.side-nav a.on { background: var(--accent-soft); color: var(--ink); box-shadow: inset 3px 0 0 var(--accent); }
.side-nav a.on .ico { color: var(--accent); }
.side-nav a .count { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.stabs a.on { border-bottom-color: var(--accent); }
.conv.on { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.msg.out .bub { background: #1e3b10; color: #eaf7e0; }
th { color: var(--muted); text-transform: uppercase; font-size: 11px; letter-spacing: .04em; }
.contact h3 { color: var(--accent); }
a { color: var(--accent); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(78, 236, 0, 0.18); }
.composer textarea:focus { box-shadow: none; }
.composer .box:focus-within { border-color: var(--accent); }
.composer .box.note:focus-within { border-color: #c9a227; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; }
.card { border: 0.5px solid var(--line); }
.mark { background: var(--accent); color: #0e0e0e; }
h1.brand, .sub { color: var(--accent); }
.pill.open { background: #1e3b10; color: var(--accent); }
.pill.active, .pill.ok { background: #163a2a; color: #30d158; }
.pill.blocked { background: #3a1515; color: #ff6961; }
.pill.biz-usa { background: #1e3b10; color: var(--accent); }
.pill.biz-pa { background: #12302c; color: #64e1c9; }
.ch-sms { background: #3a3a3e; } .ch-email { background: #b7791f; } .ch-biller_ticket { background: #3a3a3e; }
.conv.unread::before { background: var(--accent); }
.toast { background: #1e1e1e; border-color: #2a2a2e; }
.chk input, input[type=checkbox] { accent-color: var(--accent); }
.linked { background: #12260c; border-color: #2c5a16; }
.side { background: var(--side); border-right-color: #1e1e1e; }
.mtop { background: var(--side); }

/* ==========================================================================
   4. Platform build (Nov 20): bulk select, SLA, composer tools, bot, presence,
      notifications, channels wizard, contacts, team chat, marketing, reports, settings.
      Same Qxopa palette (variables from section 3). Contrast: text on #141414/#1e1e1e
      uses #f2f0ec / #9a9690 (AA); accent text uses #4eec00 on dark (AA); #141414 on accent.
   ========================================================================== */
.ico.xs { width: 12px; height: 12px; }
.grow { flex: 1 1 220px; }
kbd { background: #2a2a2e; border: 1px solid #3a3a3e; border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; font: 12px ui-monospace, monospace; color: var(--ink); }
mark { background: rgba(78, 236, 0, .25); color: var(--ink); border-radius: 3px; padding: 0 1px; }
.pill { display: inline-flex; align-items: center; gap: 4px; }
.pill.sla { background: #2a2a2e; color: #d6d3cd; }
.pill.sla.soon { background: #3a2f12; color: #f0d48a; }
.pill.sla.late { background: #3a1515; color: #ff9b94; }
.pill.pr-urgent { background: #3a1515; color: #ff9b94; font-weight: 700; }
.pill.pr-high { background: #3a2f12; color: #f0d48a; }
.pill.pr-low { background: #2a2a2e; color: #9a9690; }
.pill.bot { background: #1e2a3a; color: #9cc8ff; }
.pill.lead { background: #3a2f12; color: #f0d48a; }
.pill.error { background: #3a1515; color: #ff9b94; }

/* inbox list: select + bulk bar */
.views-sel { max-width: 130px; padding: 5px 8px; font-size: 12px; }
.conv .avatar { cursor: pointer; }
.conv .avatar .tick { display: none; position: absolute; inset: 0; border-radius: 999px; background: var(--accent); color: var(--accent-ink); align-items: center; justify-content: center; }
.conv .avatar .tick .ico { width: 18px; height: 18px; }
.conv.picked .avatar .tick { display: flex; }
.conv:hover .avatar:hover { box-shadow: 0 0 0 2px var(--accent); }
.conv.picked { background: rgba(78, 236, 0, .08); }
.bulkbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; background: #12260c; border: 1px solid #2c5a16; border-radius: 10px; padding: 6px 8px; font-size: 13px; }
.bulkbar b { margin-right: 4px; }
.bulkbar select { padding: 4px 6px; font-size: 12px; }
.filters .chk { font-size: 12px; }

/* thread: overflow menu, presence, AI summary, attachments */
.menu-wrap { position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; background: #1e1e1e; border: 1px solid var(--line); border-radius: 10px; padding: 6px; min-width: 230px; box-shadow: 0 12px 28px rgba(0,0,0,.5); display: flex; flex-direction: column; }
.menu > button, .menu > a { background: transparent; color: var(--ink); text-align: left; padding: 8px 10px; font-weight: 500; font-size: 13px; border-radius: 6px; display: flex; gap: 8px; align-items: center; text-decoration: none; }
.menu > button:hover, .menu > a:hover { background: #2a2a2e; filter: none; }
.menu-sub { padding: 8px 10px; font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px; align-items: center; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 4px 0; }
.chip { background: #2a2a2e; color: var(--ink); font-size: 11px; padding: 3px 8px; border-radius: 999px; font-weight: 600; }
.chip.on { background: var(--accent); color: var(--accent-ink); }
.presence { display: none; align-items: center; gap: 6px; padding: 4px 16px; font-size: 12px; color: #f0d48a; background: #1f1a0c; border-bottom: 1px solid #3a2f12; }
.presence.on { display: flex; }
.presence .pv { width: 20px; height: 20px; border-radius: 999px; background: #3a2f12; color: #f0d48a; font-size: 9px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.presence .pv.typing { animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .4; } }
.ai-sum { margin: 10px 16px 0; padding: 8px 12px; background: #162030; border: 1px solid #23344d; border-radius: 10px; font-size: 13px; color: #d6e6ff; }
.ai-sum b { color: #9cc8ff; display: inline-flex; gap: 4px; align-items: center; margin-right: 4px; }
.msg .bub .txt { white-space: pre-wrap; }
.msg.bot .bub { background: #162030; color: #d6e6ff; }
.att { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; padding: 6px 10px; background: rgba(0,0,0,.25); border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 13px; max-width: 100%; }
.att span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att small { color: var(--muted); }
.att.img { padding: 0; background: none; display: block; }
.att.img img { max-width: min(280px, 100%); max-height: 260px; border-radius: 8px; display: block; }
audio.att { padding: 0; height: 36px; }
.att.bad { color: #ff9b94; }

/* composer tools + popovers */
.composer { position: relative; }
.composer .ctabs { align-items: center; }
.ctools { display: inline-flex; gap: 2px; align-items: center; margin-left: auto; }
.composer .bar2 .ctools { margin-left: 0; }
.tool { background: transparent; color: var(--muted); padding: 5px 7px; border-radius: 7px; display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; cursor: pointer; flex-direction: row; }
.tool:hover { background: #2a2a2e; color: var(--ink); filter: none !important; }
#bot-suggest { color: #9cc8ff; }
.tool.busy { animation: pulse 1s infinite; }
.atts { display: flex; flex-wrap: wrap; gap: 6px; }
.atts:empty { display: none; }
.composer .atts { margin: 0 0 6px; }
.patt { background: #2a2a2e; border-radius: 999px; padding: 3px 4px 3px 10px; font-size: 12px; display: inline-flex; gap: 6px; align-items: center; }
.patt button { background: transparent; color: var(--muted); padding: 0 6px; font-size: 14px; line-height: 1; }
.pop { position: absolute; left: 16px; right: 16px; bottom: calc(100% - 6px); z-index: 60; background: #1e1e1e; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 -10px 30px rgba(0,0,0,.5); max-height: 320px; overflow-y: auto; padding: 6px; }
.pop-h { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px; font-size: 12px; color: var(--muted); }
.pop-i { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; width: 100%; text-align: left; background: transparent; color: var(--ink); padding: 8px; border-radius: 8px; font-weight: 500; font-size: 13px; }
.pop-i .muted { flex-basis: 100%; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pop-i.on, .pop-i:hover { background: var(--accent-soft); filter: none; }
.emoji { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 2px; }
.emoji button { background: transparent; font-size: 20px; padding: 6px; border-radius: 8px; }
.emoji button:hover { background: #2a2a2e; }

/* sidebar tools, notifications */
.side-tools { display: flex; gap: 4px; padding: 0 4px; flex-wrap: wrap; }
html.nav-collapsed .side-tools { flex-direction: column; }
.tool-btn { position: relative; background: transparent; color: var(--muted); padding: 7px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; }
.tool-btn:hover { background: #2a2a2e; color: var(--ink); filter: none !important; }
.tool-btn.on { color: var(--accent); }
.tool-btn.lang { font-size: 11px; font-weight: 800; min-width: 34px; }
.tool-btn.ringing { color: #ff9b94; animation: pulse .8s infinite; }
.tool-btn .count { position: absolute; top: 0; right: 0; background: var(--accent); color: var(--accent-ink); border-radius: 999px; font-size: 10px; font-weight: 800; padding: 0 5px; line-height: 16px; }
.mtop-tools { display: inline-flex; gap: 2px; }
.mtop-tools [data-lang], .mtop-tools [data-phone] { display: none; }
@media (min-width: 861px) { .mtop-tools { display: none; } }
.npanel { position: fixed; z-index: 900; width: 320px; max-height: 400px; display: flex; flex-direction: column; background: #1e1e1e; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 40px rgba(0,0,0,.6); }
.nph { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.npl { overflow-y: auto; }
.ni { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-bottom: 1px solid #262626; color: var(--ink); text-decoration: none; font-size: 13px; }
.ni span { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ni small { color: #7a7670; font-size: 11px; }
.ni.unread { box-shadow: inset 3px 0 0 var(--accent); background: rgba(78, 236, 0, .05); }
.ni:hover { background: #262626; }
.gs-r { max-height: 60vh; overflow-y: auto; margin-top: 8px; }
.gs-r h3 { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 14px 0 4px; }
.gs-i { display: flex; flex-direction: column; gap: 2px; padding: 8px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 13px; }
.gs-i:hover { background: #2a2a2e; }
.kbd-table td { border: 0; padding: 5px 8px; }
.modal-card .ring { border-color: var(--accent); }

/* generic page bits */
.banner { display: flex; gap: 12px; align-items: flex-start; }
.banner > .ico { width: 24px; height: 24px; color: var(--accent); margin-top: 2px; }
.banner.warn > .ico { color: #f0d48a; }
.card.warn { border: 1px solid #8a6d1f; }
.cgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.cgrid .card { margin: 0; }
.cgrid .span2 { grid-column: 1 / -1; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs a { color: var(--muted); text-decoration: none; padding: 8px 12px; font-size: 13px; font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.on { color: var(--ink); border-bottom-color: var(--accent); }
.row.filt { margin-bottom: 12px; align-items: center; }
.avatar.sm { width: 28px; height: 28px; flex-basis: 28px; font-size: 11px; vertical-align: middle; }
.avatar.xs { width: 22px; height: 22px; flex-basis: 22px; font-size: 9px; }
.switch { position: relative; display: inline-block; width: 38px; height: 22px; flex-direction: row; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: #3a3a3e; border-radius: 999px; cursor: pointer; transition: background .15s; }
.switch span::before { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #f2f0ec; border-radius: 999px; transition: transform .15s; }
.switch input:checked + span { background: var(--accent); }
.switch.danger input:checked + span { background: #ff6961; }
.switch input:checked + span::before { transform: translateX(16px); background: #141414; }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* channels */
.ch-card .ch-h { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.ch-card .ch-h > .ico { width: 28px; height: 28px; color: var(--accent); }
.ch-card .ch-h h2 { margin: 0; }
.ch-card .ch-h > div { flex: 1; }
.ch-card .ch-h .muted { font-size: 12px; }
.steps { display: flex; gap: 6px; padding: 0; margin: 0 0 6px; list-style: none; counter-reset: s; flex-wrap: wrap; }
.steps li { counter-increment: s; font-size: 12px; color: var(--muted); background: #262626; border-radius: 999px; padding: 3px 10px; }
.steps li::before { content: counter(s) ". "; }
.steps li.on { color: var(--accent-ink); background: var(--accent); font-weight: 700; }
.hook { display: flex; align-items: center; gap: 8px; background: #141414; border: 1px solid var(--line); border-radius: 8px; padding: 6px 6px 6px 10px; margin-bottom: 6px; font-size: 12px; flex-wrap: wrap; }
.hook span { color: var(--muted); flex-basis: 100%; }
.hook code { flex: 1; min-width: 0; word-break: break-all; color: var(--ink); }
.modal-card { max-height: 92vh; overflow-y: auto; }
.modal-card h3 { font-size: 13px; margin: 8px 0 4px; }
.modal-card label small { font-weight: 400; }

/* contacts */
.clist tr { cursor: pointer; }
.hist { display: flex; flex-direction: column; }
.hist-i { display: flex; gap: 12px; align-items: center; padding: 10px 6px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.hist-i:hover { background: #262626; }
.hist-i > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hist-i .muted { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hist-i .chb { width: 26px; height: 26px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 26px; }
.hist-i .chb .ico { width: 13px; height: 13px; color: #fff; }
.tagchk { display: inline-flex !important; margin-right: 10px; }
.tagchk i { width: 8px; height: 8px; border-radius: 999px; display: inline-block; }

/* team chat */
.team { flex: 1; display: grid; grid-template-columns: 260px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); min-height: 0; }
.team.has-thread { grid-template-columns: 260px minmax(0, 1fr) 360px; }
.rooms { background: #111; }
.room-list { flex: 1; overflow-y: auto; padding: 6px; }
.room-list .sect { color: #6a6660; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; padding: 12px 8px 4px; font-weight: 700; }
.room { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 8px; color: var(--muted); text-decoration: none; font-size: 14px; width: 100%; background: transparent; font-weight: 500; text-align: left; }
.room:hover { background: #1e1e1e; color: var(--ink); filter: none; }
.room.on { background: var(--accent-soft); color: var(--ink); }
.room.unread { color: var(--ink); font-weight: 700; }
.room .rn { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room .count { background: var(--accent); color: var(--accent-ink); border-radius: 999px; font-size: 11px; padding: 0 7px; font-weight: 700; }
.rooms-foot { padding: 10px; border-top: 1px solid #1e1e1e; display: flex; gap: 6px; flex-wrap: wrap; }
.tmain, .tthread { min-height: 0; }
.tmsgs { gap: 2px !important; }
.tm { display: flex; gap: 10px; padding: 6px 8px; border-radius: 8px; align-items: flex-start; }
.tm:hover { background: #191919; }
.tm.mentioned { background: rgba(240, 212, 138, .07); box-shadow: inset 3px 0 0 #f0d48a; }
.tm .tb { flex: 1; min-width: 0; }
.tm .th { display: flex; gap: 8px; align-items: baseline; }
.tm .th small { color: #7a7670; font-size: 11px; }
.tm .tx { font-size: 14px; line-height: 1.45; word-wrap: break-word; }
.tm .tm-act { font-size: 11px; color: #7a7670; opacity: 0; margin-left: auto; }
.tm:hover .tm-act { opacity: 1; }
.tm .tm-rep { font-size: 12px; margin-top: 2px; }
.tm.botmsg .avatar { background: #1e2a3a; color: #9cc8ff; }
.tm.botmsg.lvl-error .avatar, .tm.botmsg.lvl-error { box-shadow: inset 3px 0 0 #ff6961; }
.tm.botmsg.lvl-warning { box-shadow: inset 3px 0 0 #f0d48a; }
.tm.botmsg.lvl-success .avatar { background: #163a2a; color: #30d158; }
.mention { background: var(--accent-soft); color: var(--accent); border-radius: 4px; padding: 0 3px; font-weight: 600; }
.mention.me { background: #3a2f12; color: #f0d48a; }
.tcomp { position: relative; display: flex; gap: 6px; align-items: flex-end; flex-wrap: wrap; border-top: 1px solid #1e1e1e; padding: 10px 14px 14px; }
.tcomp .atts { flex-basis: 100%; }
.tcomp textarea { flex: 1; min-width: 0; min-height: 40px; max-height: 180px; resize: none; }
.tcomp .pop { left: 14px; right: 14px; bottom: calc(100% - 4px); }

/* marketing */
.phone-prev { margin-top: 10px; background: #0e0e0e; border-radius: 14px; padding: 12px; max-width: 320px; }
.phone-prev .bub { background: #1e1e1e; border-radius: 12px 12px 12px 4px; padding: 9px 12px; font-size: 13px; white-space: pre-wrap; }
.phone-prev small { color: var(--muted); }

/* reports */
.kpis .stat { flex: 1 1 160px; margin: 0; }
.bars { display: flex; align-items: flex-end; gap: 2px; height: 160px; border-bottom: 1px solid var(--line); }
.bar { flex: 1; display: flex; flex-direction: column-reverse; height: 100%; min-width: 2px; }
.bar span { display: block; width: 100%; }
.bar .i { background: var(--accent); border-radius: 2px 2px 0 0; }
.bar .o { background: #3a6b20; }
.bars-x { display: flex; justify-content: space-between; color: #7a7670; font-size: 11px; margin-top: 4px; }
.lg { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: middle; margin: 0 2px 0 8px; }
.lg.in { background: var(--accent); } .lg.out { background: #3a6b20; }

/* settings */
.bh-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; padding: 10px 0; border-bottom: 1px solid var(--line); }
.bh-row .days { display: flex; flex-wrap: wrap; gap: 8px; }
.bh-row .days .chk { flex-direction: row; gap: 4px; align-items: center; }
.qr { display: block; margin: 8px auto; border-radius: 8px; background: #fff; padding: 6px; }
code.key { font-size: 14px; letter-spacing: .05em; }

/* responsive for new parts */
@media (max-width: 1100px) { .team.has-thread { grid-template-columns: 220px minmax(0, 1fr); } .team.has-thread .tthread { position: fixed; right: 0; top: 0; bottom: 0; width: min(380px, 100vw); z-index: 600; background: #141414; box-shadow: -12px 0 28px rgba(0,0,0,.5); } }
@media (max-width: 860px) {
  .team, .team.has-thread { grid-template-columns: minmax(0, 1fr); }
  .team .tmain { display: none; }
  .team.has-room .rooms { display: none; }
  .team.has-room .tmain { display: flex; }
  .team.has-thread .tthread { width: 100vw; }
  .ctools .tool span { display: none; }
  .views-sel { max-width: 96px; }
  .npanel { left: 8px !important; right: 8px; width: auto; }
  .cgrid { grid-template-columns: minmax(0, 1fr); }
  .thread-head .acts .small { padding: 4px 8px; }
  .pop { left: 8px; right: 8px; }
}
@media (min-width: 861px) { .team .back { display: none; } }
@media (max-width: 860px) {
  .stage.page .card { overflow-x: auto; }
  .stage.page .card table { min-width: 100%; }
  .mtop .brand { white-space: nowrap; overflow: hidden; }
  .mtop .brand span small { display: none; }
  .chk { white-space: normal; }
}
