/* UpBusiness CRM — identidade UpBusiness: azul #1078FB, preto quente, tons pastel de azul. Sem fontes externas. */
:root {
  --bg: #f2f7ff; --ink: #0d0906; --muted: #7c8593; --line: #ffffffad; --glass: #ffffff59; --glass2: #ffffffb8;
  --petrol: #1078fb; --petrol2: #4b9bfc; --brand-soft: #eef5ff; --brand-line: #cfe3fe; --danger: #b25b67; --ok: #5f9a82; --warn: #b8913f; --amber-bg: #fbf3dc;
  --r-menu: 20px; --r-col: 17px; --r-card: 13px; --r-panel: 18px; --r-dialog: 22px;
  --shadow: 0 5px 18px #182c3d07; --shadow2: 0 18px 50px #1c34490f;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; height: 100dvh; overflow: hidden; color: var(--ink); font: 14px/1.45 "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: radial-gradient(ellipse at 82% 0%, #d6e8ff, transparent 45%), radial-gradient(ellipse at 20% 90%, #e6f0ff, transparent 45%), var(--bg);
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid #1078fb; outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.stack { display: grid; gap: 10px; }

/* ---------- workspace ---------- */
.workspace { display: flex; height: 100dvh; padding: 12px; gap: 12px; }
.sidebar {
  width: 210px; flex: none; display: flex; flex-direction: column; gap: 6px; padding: 16px 12px; border-radius: var(--r-menu);
  background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(18px); box-shadow: var(--shadow2);
  transition: width .2s ease, opacity .2s ease, padding .2s ease; overflow-y: auto;
}
.sidebar.collapsed { width: 0; padding: 0; opacity: 0; border: 0; overflow: hidden; }
.brand { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 6px 10px; }
.brand b { font-size: 20px; font-weight: 650; letter-spacing: -.3px; }
.brand b span { color: #7fb8a5; font-weight: 300; margin-left: 2px; }
.brand-logo { display: flex; align-items: center; gap: 6px; min-width: 0; flex: 1 1 auto; }
.brand-logo img { height: auto; max-height: 17px; width: auto; min-width: 0; display: block; flex: 0 1 auto; }
.brand .brand-logo span { flex: none; white-space: nowrap; line-height: 1.3; font-size: 9px; font-weight: 700; letter-spacing: 1.2px; color: #fff; background: var(--petrol); border-radius: 999px; padding: 2px 7px; margin: 0 0 1px; }
.login-logo { width: 190px; height: auto; display: block; margin-bottom: 4px; }
.collapse-btn { width: 30px; height: 30px; border-radius: 10px; border: 1px solid var(--line); background: #ffffff70; display: grid; place-items: center; padding: 0; }
.collapse-btn svg { width: 16px; height: 16px; stroke: var(--ink); fill: none; stroke-width: 1.6; }
.ws-card { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 14px; background: #ffffff63; border: 1px solid var(--line); margin-bottom: 6px; }
.ws-icon { width: 30px; height: 30px; border-radius: 10px; background: var(--brand-line); display: grid; place-items: center; font-weight: 650; color: var(--petrol); }
.ws-icon.has-logo { background: #fff; overflow: hidden; padding: 3px; }
.ws-icon img, .logo-preview img { width: 100%; height: 100%; object-fit: contain; display: block; }
.ws-card.clickable { cursor: pointer; }
.ws-card.clickable:hover { background: #ffffffa8; }
.ws-card.clickable:focus-visible { outline: 2px solid var(--petrol); outline-offset: 2px; }
.logo-preview { width: 96px; height: 96px; border-radius: 18px; border: 1px solid var(--line); background: #fff; padding: 8px; }
.logo-preview:empty { display: none; }
.ws-card small { display: block; font-size: 10px; letter-spacing: 1px; color: var(--muted); }
.ws-card div { min-width: 0; }
.ws-card strong { display: block; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav a, .nav button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 12px; border: 1px solid transparent;
  background: none; text-align: left; text-decoration: none; color: var(--ink); font-size: 13px;
}
.nav a:hover, .nav button:hover { background: #ffffff55; }
.nav .active { background: var(--brand-soft); border-color: var(--brand-line); color: var(--petrol); font-weight: 650; }
.nav .ico { width: 18px; text-align: center; color: var(--petrol); }
.nav .sep { height: 1px; background: #ffffff90; margin: 8px 4px; }
.nav .bottom { margin-top: auto; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; padding-top: 12px; position: relative; }
.master-banner { padding: 6px 12px; margin-bottom: 8px; border-radius: 12px; background: #fdf3e1; border: 1px solid #f3dfb5; display: flex; gap: 10px; align-items: center; font-size: 12px; }
.master-banner a { color: var(--petrol); font-weight: 600; }
.header { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 10px; }
.hamb { width: 36px; height: 36px; border-radius: 12px; border: 1px solid var(--line); background: #ffffff80; font-size: 18px; line-height: 1; }
.crumb { font-size: 10px; letter-spacing: 1.4px; color: var(--muted); margin-bottom: 8px; }
.header h1 { font-size: 26px; line-height: 1.2; margin: 4px 0 0; font-weight: 600; letter-spacing: -.4px; }
.btn {
  border: 1px solid #ffffffc0; background: #ffffffa0; border-radius: 11px; padding: 8px 13px; font-size: 13px; box-shadow: var(--shadow);
  min-height: 36px;
}
.btn:hover { background: #fff; }
.btn.primary { background: var(--petrol); color: #fff; border-color: transparent; border-radius: 999px; }
.btn.primary:hover { background: #0a68dd; }
.btn.primary:hover { filter: brightness(1.05); }
.btn.danger { color: var(--danger); }
.btn.sm { min-height: 30px; padding: 5px 10px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.new-contact { padding: 9px 14px; margin-left: auto; }

.metrics { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.metric { display: flex; align-items: baseline; gap: 10px; padding: 5px 11px; border-radius: 10px; background: var(--glass); border: 1px solid var(--line); }
.metric small { font-size: 10px; color: var(--muted); letter-spacing: .4px; }
.metric b { font-size: 18px; font-weight: 600; }
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.toolbar select, .toolbar input, .field input, .field select, .field textarea {
  padding: 8px 10px; border-radius: 11px; border: 1px solid #ffffffd0; background: #ffffffb0; min-height: 36px;
}
.toolbar .search { width: 245px; margin-left: auto; }
.tag { font-size: 10px; padding: 2px 7px; border-radius: 99px; background: #e2ebf7; color: #4e6e8f; }
.hint { font-size: 11px; color: var(--muted); }

/* ---------- kanban ---------- */
.kanban {
  flex: 1; min-height: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(252px, 1fr); gap: 13px; overflow-x: auto;
  padding: 0 2px 14px;
}
.col { display: flex; flex-direction: column; min-height: 0; border-radius: var(--r-col); background: #ffffff35; border: 1px solid #ffffffad; }
.col.drop { background: #ffffff70; box-shadow: inset 0 0 0 2px #9bbfd8; }
.col-head { display: flex; align-items: center; gap: 8px; padding: 15px 14px 12px; font-size: 12px; font-weight: 600; }
.dot { width: 8px; height: 8px; border-radius: 50%; box-shadow: 0 0 0 4px #ffffff80; flex: none; }
.col-head .count { margin-left: auto; font-size: 10px; color: var(--muted); font-weight: 400; }
.col-body { overflow-y: auto; padding: 0 10px 50px; min-height: 160px; flex: 1; }
.col-empty { font-size: 11px; color: var(--muted); text-align: center; padding: 18px 6px; border: 1px dashed #ffffffd8; border-radius: 12px; }
.card {
  position: relative; background: linear-gradient(135deg, #ffffffdf, #ffffffa6); backdrop-filter: blur(12px); border: 1px solid #fff;
  border-radius: var(--r-card); padding: 12px; margin-bottom: 8px; box-shadow: var(--shadow); cursor: grab; user-select: none; touch-action: none;
  transition: transform .19s cubic-bezier(.2,.8,.2,1);
}
.card:focus-visible { outline: 2px solid #1078fb; }
.card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 11px; }
.card-top .tagline { font-size: 8px; letter-spacing: 1px; color: var(--muted); }
.grip { font-size: 19px; line-height: 10px; color: #b7c3ce; letter-spacing: -2px; }
.card-who { display: flex; gap: 9px; align-items: center; }
.avatar { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; font-size: 11px; font-weight: 650; flex: none; }
.card-who b { display: block; font-size: 12px; font-weight: 600; overflow-wrap: anywhere; }
.card-who small { font-size: 10px; color: var(--muted); }
.card-title { font-size: 10px; margin: 13px 0 12px; color: #5b6f82; overflow-wrap: anywhere; }
.card-foot { display: flex; justify-content: space-between; padding-top: 9px; border-top: 1px solid #edf1f3; font-size: 9px; color: var(--muted); }
.card-foot span:last-child { color: var(--petrol); font-weight: 600; }
.ghost { position: fixed; z-index: 1000; pointer-events: none; opacity: .96; box-shadow: 0 24px 55px #284c6c35; backdrop-filter: blur(24px); transform: rotate(2deg); margin: 0; }
.placeholder { border: 2px dashed #a9c3d6; border-radius: var(--r-card); margin-bottom: 8px; background: #ffffff40; }
.card.dragging-src { display: none; }
.more-row { display: flex; justify-content: center; padding: 6px; }

/* paletas por posição */
.p0 .dot { background: #8bb4aa; } .p0 .avatar { background: #e1efeb; color: #75a195; }
.p1 .dot { background: #89a9ce; } .p1 .avatar { background: #e2ebf7; color: #7c9cbb; }
.p2 .dot { background: #ae9ccb; } .p2 .avatar { background: #eae4f6; color: #9b88b6; }
.p3 .dot { background: #c6af81; } .p3 .avatar { background: #f2ecde; color: #b09d74; }
.p4 .dot { background: #8cbaa3; } .p4 .avatar { background: #e0f0e6; color: #7aa991; }
.p5 .dot { background: #c49ca7; } .p5 .avatar { background: #f5e6eb; color: #b18c9a; }

/* ---------- painel de conversa ---------- */
.board-wrap { flex: 1; min-height: 0; display: flex; gap: 12px; }
.board-wrap > .kanban-area { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.panel {
  width: 420px; flex: none; display: flex; flex-direction: column; min-height: 0; border-radius: var(--r-panel); background: var(--glass2);
  border: 1px solid #fff; backdrop-filter: blur(20px); box-shadow: var(--shadow2); overflow: hidden;
}
.panel-head { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-bottom: 1px solid #edf1f3; }
.panel-head .avatar { width: 33px; height: 33px; background: #e2ebf7; color: #4e6e8f; }
.panel-head b { font-size: 13px; display: block; }
.panel-head small { font-size: 11px; color: var(--muted); }
.icon-btn { margin-left: auto; width: 32px; height: 32px; border-radius: 10px; border: 1px solid #edf1f3; background: #fff; font-size: 16px; }
.context-banner { margin: 8px 14px 0; padding: 7px 10px; border-radius: 10px; background: #eef5fb; font-size: 11px; color: #4e6e8f; }
.tabs { display: flex; gap: 4px; padding: 0 14px; border-bottom: 1px solid #edf1f3; }
.tabs button { border: 0; background: none; padding: 11px 10px 9px; font-size: 12px; color: var(--muted); border-bottom: 2px solid transparent; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--petrol); font-weight: 600; }
.thread { flex: 1; overflow-y: auto; padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; }
.bubble { max-width: 82%; padding: 8px 11px; border-radius: 13px; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; box-shadow: var(--shadow); }
.bubble.in { align-self: flex-start; background: #fff; }
.bubble.out { align-self: flex-end; background: #dcebe6; }
.bubble.internal { align-self: flex-end; background: var(--amber-bg); border: 1px solid #f0dfaf; }
.bubble .meta { display: block; margin-top: 4px; font-size: 10px; color: var(--muted); }
.bubble .label { display: block; font-size: 10px; font-weight: 600; color: #9a7a2c; margin-bottom: 2px; }
.load-older { align-self: center; }
.composer { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 10px 14px 12px; border-top: 1px solid #edf1f3; }
.composer .modes { grid-column: 1 / -1; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.composer .modes button { border: 1px solid #e3e9ee; background: #fff; border-radius: 99px; padding: 3px 10px; font-size: 11px; }
.composer .modes button[aria-pressed="true"] { background: var(--petrol); color: #fff; border-color: var(--petrol); }
.composer .notice { grid-column: 1 / -1; font-size: 11px; color: #9a7a2c; }
.composer .warn { grid-column: 1 / -1; font-size: 11px; color: var(--muted); }
.composer textarea { height: 52px; max-height: 140px; resize: vertical; border-radius: 12px; border: 1px solid #e3e9ee; padding: 8px 10px; background: #fff; }
.composer .send { min-width: 39px; align-self: end; height: 40px; }
.history-list, .data-pane { flex: 1; overflow-y: auto; padding: 14px 18px; display: grid; gap: 8px; align-content: start; }
.hist-item { padding: 8px 10px; border-radius: 10px; background: #ffffffa8; font-size: 12px; }
.hist-item small { display: block; color: var(--muted); font-size: 10px; }
.box { padding: 12px; border-radius: 14px; background: #ffffffa8; border: 1px solid #fff; display: grid; gap: 8px; align-content: start; }
.box h3 { margin: 0; font-size: 13px; }
.field { display: grid; gap: 4px; font-size: 12px; }
.field > span { color: #5b6f82; }
.field textarea { min-height: 70px; resize: vertical; }
.ro { opacity: .65; }

/* ---------- inbox ---------- */
.inbox { flex: 1; min-height: 0; display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 12px; }
.inbox-list { display: flex; flex-direction: column; min-height: 0; border-radius: var(--r-panel); background: var(--glass); border: 1px solid var(--line); }
.inbox-list header { padding: 12px 14px; display: grid; gap: 8px; }
.inbox-list header input, .inbox-list header select { padding: 7px 10px; border-radius: 10px; border: 1px solid #fff; background: #ffffffb0; }
.people { overflow-y: auto; padding: 0 8px 12px; }
.person { display: flex; gap: 10px; align-items: center; width: 100%; padding: 9px; border-radius: 12px; border: 1px solid transparent; background: none; text-align: left; }
.person:hover { background: #ffffff70; }
.person[aria-current="true"] { background: #fff; border-color: #fff; }
.person b { font-size: 12px; display: block; }
.person small { font-size: 10px; color: var(--muted); }
.inbox .panel { width: auto; }
.empty-state { margin: auto; text-align: center; color: var(--muted); padding: 30px; }

/* ---------- seções genéricas ---------- */
.section { flex: 1; min-height: 0; overflow-y: auto; padding-bottom: 20px; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.inner-tabs { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.inner-tabs button { border: 1px solid #ffffffc0; background: #ffffff70; border-radius: 99px; padding: 6px 14px; font-size: 12px; }
.inner-tabs button[aria-selected="true"] { background: #fff; font-weight: 600; }
.mgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mgrid div { padding: 12px; border-radius: 12px; background: #ffffff90; }
.mgrid b { display: block; font-size: 22px; }
.mgrid small { font-size: 11px; color: var(--muted); }
table.list { width: 100%; border-collapse: collapse; font-size: 12px; }
table.list th, table.list td { text-align: left; padding: 7px 8px; border-bottom: 1px solid #ffffffd0; vertical-align: top; }
.switch { position: relative; width: 40px; height: 23px; border-radius: 99px; border: 0; background: #c9d3dc; padding: 0; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; transition: left .15s; }
.switch[aria-checked="true"] { background: var(--ok); }
.switch[aria-checked="true"]::after { left: 20px; }
.err { color: var(--danger); font-size: 12px; }
.ok { color: var(--ok); font-size: 12px; }

/* follow-up */
.fu-head { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 12px; }
.fu-head .field input, .fu-head .btn { height: 36px; min-height: 36px; }
.fu-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.fu-col { border-radius: var(--r-col); background: #ffffff35; border: 1px solid var(--line); padding: 12px; min-height: 200px; }
.fu-col.drop { box-shadow: inset 0 0 0 2px #9bbfd8; }
.fu-col h3 { margin: 0 0 10px; font-size: 13px; }
.fu-card { background: #ffffffd0; border-radius: 12px; padding: 10px; margin-bottom: 8px; display: grid; gap: 6px; font-size: 12px; overflow-wrap: anywhere; touch-action: none; }
.fu-card .acts { display: flex; gap: 6px; flex-wrap: wrap; }
.fu-done { display: grid; place-items: center; text-align: center; color: var(--muted); border: 2px dashed #c6d6e2; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal .wd { font-size: 11px; color: var(--muted); text-align: center; }
.cal button { min-height: 64px; border-radius: 12px; border: 1px solid #fff; background: #ffffff80; text-align: left; padding: 6px; display: grid; align-content: space-between; }
.cal button.today { border-color: var(--petrol); }
.cal .badge { font-size: 10px; background: #e2ebf7; border-radius: 99px; padding: 1px 6px; justify-self: start; }

/* diálogos */
.overlay { position: fixed; inset: 0; background: #1c2e3e40; display: grid; place-items: center; z-index: 900; padding: 16px; }
.dialog { width: min(560px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; border-radius: var(--r-dialog); background: #f8fafcf5; border: 1px solid #fff;
  box-shadow: 0 30px 80px #1c344930; padding: 20px; display: grid; gap: 12px; }
.dialog h2 { margin: 0; font-size: 18px; }
.dialog footer { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.stage-row { display: grid; grid-template-columns: minmax(0, 1fr) 120px auto auto auto; gap: 6px; align-items: center; }
.stage-row input, .stage-row select { padding: 6px 8px; border-radius: 9px; border: 1px solid #e3e9ee; }

/* login */
.login-wrap { position: fixed; inset: 0; display: grid; place-items: center; padding: 16px; z-index: 950;
  background: radial-gradient(ellipse at 82% 0%, #d6e8ff, transparent 45%), radial-gradient(ellipse at 20% 90%, #e6f0ff, transparent 45%), var(--bg); }
.login { width: min(380px, 100%); padding: 26px; border-radius: var(--r-dialog); background: #ffffffb8; border: 1px solid #fff; backdrop-filter: blur(20px); display: grid; gap: 12px; }
.login h1 { margin: 0; font-size: 22px; }

/* prospecção */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.prospect h3 { font-size: 14px; }
.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; }
.pre { white-space: pre-line; }
.tag.warn { background: #fbf3dc; color: #9a7a2c; }
.tag.st-pending { background: var(--brand-soft); color: var(--petrol); }
.tag.st-funnel { background: #e0f0e6; color: #4f8a6f; }
.tag.st-rejected { background: #f5e6eb; color: #a5677a; }
.tag.st-approved { background: #fbf3dc; color: #9a7a2c; }
.box.archived { opacity: .6; }
.panel-prospect { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 0 2px 6px; }
.funnel-row { display: grid; grid-template-columns: minmax(90px, 160px) 1fr 40px minmax(0, 150px); gap: 10px; align-items: center; font-size: 12px; }
.funnel-bar { height: 12px; border-radius: 99px; background: var(--brand-soft); overflow: hidden; }
.funnel-fill { display: block; height: 100%; width: 0; background: var(--petrol2); border-radius: 99px; transition: width .4s ease; }
.funnel-fill.won { background: #5f9a82; }
.search { min-width: 220px; }
@media (max-width: 750px) { .grid-2 { grid-template-columns: 1fr; } .funnel-row { grid-template-columns: 90px 1fr 32px; } .funnel-row small { display: none; } }

/* rastreamento */
.origin-badge { font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--brand-soft); color: var(--petrol); white-space: nowrap; }
.origin-badge.o-meta_ad, .origin-badge.o-meta_site { background: #e6eeff; color: #3b5bdb; }
.origin-badge.o-google_ads { background: #e7f5ec; color: #2f7a4f; }
.origin-badge.o-organic { background: #f1f2f4; color: #7c8593; }
.panel-origin { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 0 2px 6px; }
.panel-origin:empty { display: none; }
.mono { font-family: ui-monospace, Menlo, monospace; font-size: 11px; }
.warn-text { color: #9a7a2c; }

/* responsivo */
@media (max-width: 1200px) {
  .sidebar { width: 180px; }
  .board-wrap .panel { position: absolute; right: 0; top: 12px; bottom: 0; z-index: 50; }
}
@media (max-width: 750px) {
  .workspace { padding: 8px; gap: 8px; }
  .sidebar { width: 62px; padding: 12px 6px; }
  .sidebar .lbl, .ws-card div, .brand b { display: none; }
  .brand { justify-content: center; }
  .ws-card { justify-content: center; padding: 6px; }
  .nav a, .nav button { justify-content: center; padding: 10px 0; }
  .kanban { grid-auto-columns: minmax(240px, 85%); }
  .toolbar .search { width: 100%; height: 36px; }
  .board-wrap .panel, .inbox .panel { position: fixed; inset: 8px; width: auto; z-index: 60; }
  .inbox { grid-template-columns: 1fr; }
  .header h1 { font-size: 21px; }
  .composer { padding: 9px 10px 10px; gap: 7px; }
  .composer textarea { height: 50px; }
  .fu-cols { grid-template-columns: 1fr; }
  .fu-head .field input, .fu-head .btn { height: 40px; min-height: 40px; }
  .fu-card .btn { min-height: 40px; font-size: 11px; }
  .mgrid { gap: 6px; } .mgrid div { padding: 10px 8px; } .mgrid b { font-size: 20px; }
  .stage-row { grid-template-columns: minmax(0, 1fr) 100px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
.inbox-chat { display: flex; min-height: 0; min-width: 0; }
.inbox-chat > .panel { flex: 1; width: auto; }
.inbox-chat > .empty-state { border-radius: var(--r-panel); background: var(--glass); border: 1px solid var(--line); flex: 1; display: grid; place-items: center; }
.pane { flex: 1; min-height: 0; display: flex; flex-direction: column; }
@media (max-width: 750px) { .inbox-chat { display: none; } .chat-open .inbox-chat { display: flex; position: fixed; inset: 8px; z-index: 60; } }
@media (max-width: 750px) {
  .header { flex-wrap: wrap; align-items: center; }
  .header .grow { flex-basis: 100%; }
  .new-contact { margin-left: 0; }
  .metrics { gap: 6px; } .metric { padding: 4px 8px; } .metric b { font-size: 15px; }
  .toolbar .hint { display: none; }
}
.card-extras { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin: -6px 0 10px; }
.tag-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; }
.chip-x { border: 0; background: none; padding: 0 2px; font-size: 12px; line-height: 1; color: inherit; }
.who { margin-left: auto; width: 20px; height: 20px; border-radius: 7px; background: #e2ebf7; color: #4e6e8f; font-size: 9px; font-weight: 650; display: grid; place-items: center; }
.panel-extras { padding: 8px 18px 0; }
.panel-extras select { padding: 4px 8px; border-radius: 9px; border: 1px solid #e3e9ee; background: #fff; font-size: 12px; }
.inbox-list header .row select { flex: 1; min-width: 0; }
