/* CRM Fluxo v2 — Impacto Marketing e Tecnologia. Identidade laranja e preto sobre glass discreto. */
:root {
  --bg: #f3f1ef;
  --ink: #1b1816;
  --muted: #857c75;
  --line: #ffffffad;
  --accent: #ff6a13;
  --accent-2: #ff8a3d;
  --accent-ink: #1b1816;
  --accent-soft: #fff1e6;
  --accent-deep: #c24d00;
  --danger: #b4312a;
  --ok: #3f7d5c;
  --side: #161412;
  --side-ink: #f5efe9;
  --side-muted: #a59a91;
  --r-menu: 20px; --r-col: 17px; --r-card: 13px; --r-panel: 18px; --r-dialog: 22px;
  --glass: rgba(255,255,255,.62);
  --shadow: 0 5px 18px #1c120a0d;
  --ease: cubic-bezier(.2,.8,.2,1);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; height: 100dvh; overflow: hidden; font: 14px/1.45 "Segoe UI", system-ui, sans-serif; color: var(--ink);
  background: radial-gradient(ellipse at 82% 0%, #ffe3cf, transparent 45%),
              radial-gradient(ellipse at 20% 90%, #ece7e2, transparent 45%), var(--bg);
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.error-text { color: var(--danger); font-size: 12px; }

/* ---------- botões ---------- */
.btn { border: 1px solid #ffffffc8; background: #ffffffb8; border-radius: 11px; padding: 8px 13px; font-weight: 600; font-size: 13px;
  box-shadow: 0 2px 8px #1c120a0a; transition: background .15s, transform .15s; }
.btn:hover { background: #fff; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: linear-gradient(135deg, var(--accent-2), var(--accent)); color: var(--accent-ink); border-color: #ff9a5c; }
.btn.primary:hover { background: linear-gradient(135deg, #ff9550, #ff7424); }
.btn.dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn.danger { color: var(--danger); }
.btn.small { padding: 5px 9px; font-size: 12px; border-radius: 9px; }
.icon-btn { width: 30px; height: 30px; display: grid; place-items: center; padding: 0; line-height: 1; flex-shrink: 0;
  border-radius: 10px; border: 1px solid #ffffff2e; background: #ffffff14; color: inherit; }
.icon-btn svg { display: block; width: 18px; height: 18px; }

/* ---------- login ---------- */
.auth-screen { height: 100dvh; display: grid; place-items: center; padding: 16px; overflow: auto; }
.auth-card { width: min(400px, 100%); background: var(--glass); backdrop-filter: blur(18px); border: 1px solid var(--line);
  border-radius: var(--r-dialog); padding: 28px; box-shadow: 0 24px 60px #1c120a14; }
.auth-card h1 { margin: 10px 0 4px; font-size: 22px; }
.auth-card form { display: grid; gap: 12px; margin-top: 18px; }
.field { display: grid; gap: 5px; font-size: 12px; font-weight: 600; color: #4a423c; }
.field input, .field select, .field textarea { border: 1px solid #e7dfd8; background: #ffffffd9; border-radius: 10px; padding: 9px 11px;
  font-weight: 400; font-size: 14px; color: var(--ink); }
.field textarea { resize: vertical; min-height: 70px; }
.brand-mark { font-size: 36px; font-weight: 750; letter-spacing: -2px; line-height: 1; display: inline-flex; align-items: baseline; gap: 2px; }
.brand-mark .ast { color: var(--accent); font-size: .62em; letter-spacing: 0; }
.brand-sub { font-size: 10px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--muted); }

/* ---------- estrutura ---------- */
.workspace { display: flex; gap: 12px; height: 100dvh; padding: 12px; }
.sidebar { width: 210px; flex-shrink: 0; background: linear-gradient(170deg, #1f1b18f2, #121010f5); color: var(--side-ink);
  border-radius: var(--r-menu); padding: 16px 12px; display: flex; flex-direction: column; gap: 14px; overflow: hidden auto;
  box-shadow: 0 18px 40px #120a0426; transition: width .22s var(--ease), opacity .22s var(--ease), padding .22s var(--ease), margin .22s var(--ease); }
.sidebar.collapsed { width: 0; padding-left: 0; padding-right: 0; opacity: 0; margin-right: -12px; }
.side-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.side-top .brand-mark { color: #fff; }
.side-top .brand-sub { color: var(--side-muted); }
.ws-card { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 14px; background: #ffffff0f; border: 1px solid #ffffff1a; }
.ws-icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-weight: 700; background: var(--accent); color: var(--accent-ink); flex-shrink: 0; }
.ws-name { font-weight: 650; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-area { font-size: 9px; letter-spacing: 1.4px; color: var(--side-muted); text-transform: uppercase; }
.nav { display: grid; gap: 3px; }
.nav button { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; padding: 9px 10px; border-radius: 11px;
  border: 1px solid transparent; background: none; color: var(--side-ink); font-size: 13px; white-space: nowrap; }
.nav button:hover { background: #ffffff12; }
.nav button[aria-current="page"] { background: #ff6a1324; border-color: #ff6a1366; font-weight: 650; color: #fff; }
.nav .ico { width: 18px; text-align: center; color: var(--accent-2); flex-shrink: 0; }
.nav-sep { height: 1px; background: #ffffff1a; margin: 6px 4px; }
.side-bottom { margin-top: auto; display: grid; gap: 3px; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 12px 18px 0; position: relative; }
.master-banner { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 12px; margin-bottom: 8px;
  background: var(--ink); color: #fff; border-radius: 12px; font-size: 12px; }
.master-banner a { color: var(--accent-2); font-weight: 600; }
.header { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.header-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.hamburger { width: 36px; height: 36px; border-radius: 11px; border: 1px solid #ffffffc8; background: #ffffffb8; display: grid; place-items: center; padding: 0; }
.hamburger svg { width: 18px; height: 18px; display: block; }
.crumb { font-size: 8px; letter-spacing: 1.6px; color: var(--muted); text-transform: uppercase; font-weight: 700; }
.title { font-size: 26px; line-height: 1.2; margin: 4px 0 0; font-weight: 700; letter-spacing: -.4px; }
.new-contact { padding: 9px 14px; }
.metrics { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.metric { display: flex; align-items: center; gap: 10px; padding: 5px 11px; border-radius: 10px; background: #ffffff8f; border: 1px solid var(--line); }
.metric span { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .8px; }
.metric strong { font-size: 18px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 10px; }
.toolbar select, .toolbar input { padding: 8px 11px; border-radius: 10px; border: 1px solid #e7dfd8; background: #ffffffd0; }
.toolbar input[type=search] { width: 245px; }
.pill { font-size: 11px; padding: 3px 8px; border-radius: 99px; background: var(--accent-soft); color: var(--accent-deep); font-weight: 600; }
.hint { font-size: 12px; color: var(--muted); }
.view { flex: 1; min-height: 0; display: flex; flex-direction: column; }

/* ---------- kanban ---------- */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(252px, 1fr); gap: 13px; overflow-x: auto; flex: 1; min-height: 0; padding: 0 2px 14px; }
.column { border-radius: var(--r-col); background: #ffffff35; border: 1px solid #ffffffad; display: flex; flex-direction: column; min-height: 0; transition: background .15s, box-shadow .15s; }
.column.drop-target { background: #ffffff70; box-shadow: inset 0 0 0 2px #ff6a1355; }
.col-head { padding: 15px 14px 12px; display: flex; align-items: center; gap: 8px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--stage); box-shadow: 0 0 0 4px color-mix(in srgb, var(--stage) 25%, transparent); flex-shrink: 0; }
.col-title { font-size: 12px; font-weight: 600; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.col-count { font-size: 10px; color: var(--muted); background: #ffffffa0; padding: 1px 7px; border-radius: 99px; }
.col-body { flex: 1; overflow-y: auto; padding: 0 10px 50px; min-height: 160px; }
.empty-col { font-size: 11px; color: var(--muted); text-align: center; padding: 18px 8px; border: 1px dashed #d8cfc7; border-radius: 12px; }
.card { 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: 0 5px 18px #1c120a07; user-select: none; touch-action: none; transition: transform 190ms var(--ease); cursor: grab; }
.card:focus-visible { outline: 2px solid var(--accent); }
.card.hidden-origin { opacity: 0; }
.card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 11px; }
.tag { font-size: 8px; letter-spacing: 1px; color: var(--muted); font-weight: 700; }
.grip { font-size: 19px; line-height: .6; color: #c9bfb6; }
.who { display: flex; gap: 10px; align-items: center; }
.avatar { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; font-size: 11px; font-weight: 700; background: var(--avatar); color: var(--avatar-ink); flex-shrink: 0; }
.who-name { font-size: 12px; font-weight: 600; }
.who-phone { font-size: 10px; color: var(--muted); }
.card-title { font-size: 10px; margin: 13px 0 12px; color: #4a423c; overflow-wrap: anywhere; }
.card-foot { display: flex; justify-content: space-between; padding-top: 9px; border-top: 1px solid #efe9e3; font-size: 9px; color: var(--muted); }
.card-foot b { color: var(--accent-deep); font-weight: 600; }
.placeholder { border: 2px dashed #ff6a1380; border-radius: var(--r-card); margin-bottom: 8px; background: #fff3; }
.ghost { position: fixed; z-index: 1000; pointer-events: none; opacity: .96; box-shadow: 0 24px 55px #3a1c0835; transform: rotate(2deg); backdrop-filter: blur(24px); margin: 0; }
.load-more { margin: 4px auto 12px; }
.mint { --stage: #8bb4aa; --avatar: #e1efeb; --avatar-ink: #75a195; }
.blue { --stage: #89a9ce; --avatar: #e2ebf7; --avatar-ink: #7c9cbb; }
.violet { --stage: #ae9ccb; --avatar: #eae4f6; --avatar-ink: #9b88b6; }
.amber { --stage: #c6af81; --avatar: #f2ecde; --avatar-ink: #b09d74; }
.green { --stage: #8cbaa3; --avatar: #e0f0e6; --avatar-ink: #7aa991; }
.rose { --stage: #c49ca7; --avatar: #f5e6eb; --avatar-ink: #b18c9a; }
.fallback { --stage: #b9aea5; --avatar: #efe9e4; --avatar-ink: #8f847b; }

/* ---------- painel de conversa ---------- */
.board-wrap { flex: 1; min-height: 0; display: flex; gap: 12px; }
.board-wrap > .board { flex: 1; }
.panel { width: 420px; flex-shrink: 0; display: flex; flex-direction: column; min-height: 0; background: var(--glass); backdrop-filter: blur(18px);
  border: 1px solid var(--line); border-radius: var(--r-panel); margin-bottom: 14px; box-shadow: var(--shadow); overflow: hidden; }
.panel-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid #ffffffc0; }
.panel-head .avatar { width: 36px; height: 36px; }
.panel-who { flex: 1; min-width: 0; }
.panel-name { font-weight: 650; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.panel-phone { font-size: 11px; color: var(--muted); }
.close-btn { border: none; background: #ffffffa0; border-radius: 9px; width: 30px; height: 30px; font-size: 18px; line-height: 1; }
.tabs { display: flex; gap: 4px; padding: 0 14px; border-bottom: 1px solid #ffffffc0; }
.tabs button { border: none; background: none; padding: 11px 10px 9px; font-size: 13px; color: var(--muted); border-bottom: 2px solid transparent; }
.tabs button[aria-selected="true"] { color: var(--ink); font-weight: 650; border-bottom-color: var(--accent); }
.tab-body { flex: 1; min-height: 0; overflow-y: auto; }
.thread { 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: 0 2px 8px #1c120a08; }
.bubble.in { align-self: flex-start; background: #fff; border-bottom-left-radius: 4px; }
.bubble.out { align-self: flex-end; background: #2a2420; color: #fff; border-bottom-right-radius: 4px; }
.bubble.internal { align-self: flex-end; background: #fff4c7; border: 1px solid #f1df8d; color: #4c3f0a; }
.bubble .meta { display: block; font-size: 10px; opacity: .7; margin-top: 4px; }
.bubble .label { display: block; font-size: 10px; font-weight: 700; margin-bottom: 3px; }
.bubble .kind { font-style: italic; opacity: .8; }
.ref { font-size: 10px; margin-top: 5px; padding: 5px 7px; border-radius: 8px; background: #ff6a1314; color: var(--accent-deep); }
.load-older { align-self: center; }
.composer { border-top: 1px solid #ffffffc0; padding: 10px 14px 12px; display: grid; gap: 8px; }
.modes { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.modes label { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 4px 9px; border-radius: 99px; background: #ffffffa0; border: 1px solid #fff; cursor: pointer; }
.modes input { accent-color: var(--accent); }
.composer-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; align-items: end; }
.composer textarea { height: 52px; min-height: 52px; max-height: 140px; resize: vertical; border-radius: 12px; border: 1px solid #e7dfd8; padding: 9px 11px; background: #fffffff0; }
.composer .btn { min-height: 39px; }
.notice { font-size: 11px; color: var(--muted); }
.notice.internal { color: #7a6413; }
.history { padding: 14px 18px; display: grid; gap: 8px; }
.h-item { font-size: 12px; padding: 8px 10px; border-radius: 10px; background: #ffffffb0; border: 1px solid #fff; overflow-wrap: anywhere; }
.h-item time { display: block; font-size: 10px; color: var(--muted); }
.data { padding: 14px 18px; display: grid; gap: 16px; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: #5a514a; }
.fields-form { display: grid; gap: 10px; }
.opp-card { border: 1px solid #fff; background: #ffffffb0; border-radius: 13px; padding: 11px; display: grid; gap: 8px; }
.opp-card h4 { margin: 0; font-size: 13px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; }
.row > .field { flex: 1; min-width: 110px; }
.conv-block { border-top: 1px dashed #e6ddd5; padding-top: 8px; display: grid; gap: 8px; }
.events-mini { font-size: 11px; display: grid; gap: 4px; }

/* ---------- caixa de entrada ---------- */
.inbox { flex: 1; min-height: 0; display: grid; grid-template-columns: 300px minmax(0,1fr); gap: 12px; padding-bottom: 14px; }
.inbox-list { background: var(--glass); backdrop-filter: blur(18px); border: 1px solid var(--line); border-radius: var(--r-panel); display: flex; flex-direction: column; min-height: 0; }
.inbox-head { padding: 12px 14px; display: grid; gap: 8px; border-bottom: 1px solid #ffffffc0; }
.inbox-head input, .inbox-head select { padding: 8px 10px; border-radius: 10px; border: 1px solid #e7dfd8; background: #fffffff0; }
.people { overflow-y: auto; flex: 1; padding: 6px; }
.person { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; padding: 9px; border-radius: 12px; border: 1px solid transparent; background: none; }
.person:hover { background: #ffffff90; }
.person[aria-current="true"] { background: #fff; border-color: #ffb88a; }
.person .stage-chip { font-size: 10px; color: var(--accent-deep); }
.inbox-chat { min-height: 0; display: flex; }
.inbox-chat .panel { width: auto; flex: 1; margin-bottom: 0; }
.inbox-empty { flex: 1; display: grid; place-items: center; color: var(--muted); background: #ffffff55; border: 1px dashed #ddd2c8; border-radius: var(--r-panel); }
.is-inbox .crumb { display: none; }
.is-inbox .main { padding-top: 14px; }
.is-inbox .title { font-size: 25px; }
.is-inbox .panel-head { padding: 12px 18px; }
.is-inbox .panel-head .avatar { width: 33px; height: 33px; }
.is-inbox .panel-name { font-size: 13px; }
.is-inbox .tabs button { padding: 11px 0 9px; margin-right: 14px; }

/* ---------- contatos / genérico ---------- */
.surface { background: var(--glass); backdrop-filter: blur(18px); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 16px; }
.scroll { overflow-y: auto; min-height: 0; flex: 1; padding-bottom: 14px; }
.list { display: grid; gap: 6px; }
.contact-row { display: grid; grid-template-columns: 36px 1fr auto; gap: 10px; align-items: center; padding: 9px 11px; border-radius: 12px; background: #ffffffa8; border: 1px solid #fff; text-align: left; width: 100%; }
.state { padding: 24px; text-align: center; color: var(--muted); }
.state.error { color: var(--danger); }
.toast { position: fixed; right: 18px; bottom: 18px; z-index: 2000; max-width: 380px; padding: 11px 14px; border-radius: 12px; background: var(--ink); color: #fff; box-shadow: 0 14px 36px #0003; font-size: 13px; }
.toast.error { background: var(--danger); }

/* ---------- integrações / rastreamento ---------- */
.cards { display: grid; gap: 12px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.status-line { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { font-size: 11px; padding: 3px 8px; border-radius: 99px; background: #ffffffc0; border: 1px solid #eadfd6; }
.badge.ok { background: #e6f4ec; border-color: #bfdcca; color: var(--ok); }
.badge.off { background: #f6eeee; border-color: #e7cfcf; color: var(--danger); }
.badge.warn { background: var(--accent-soft); border-color: #ffcfa8; color: var(--accent-deep); }
.secret-saved::placeholder { color: #1b1816; letter-spacing: 2px; }
.saved-tag { font-size: 10px; color: var(--ok); font-weight: 700; }
.copy-line { display: flex; gap: 8px; align-items: center; }
.copy-line code { flex: 1; overflow-wrap: anywhere; font-size: 12px; background: #ffffffc0; padding: 7px 9px; border-radius: 9px; border: 1px solid #eee3da; }
.subtabs { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.subtabs button { border: 1px solid #fff; background: #ffffff90; border-radius: 11px; padding: 8px 13px; font-weight: 600; font-size: 13px; color: var(--muted); }
.subtabs button[aria-selected="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.tmetrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tmetric { padding: 12px; border-radius: 12px; background: #ffffffb0; border: 1px solid #fff; }
.tmetric strong { display: block; font-size: 22px; }
.tmetric span { font-size: 11px; color: var(--muted); }
.switch { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; font-size: 13px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { width: 40px; height: 23px; border-radius: 99px; background: #d9d0c8; position: relative; transition: background .15s; flex-shrink: 0; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; transition: transform .15s var(--ease); box-shadow: 0 1px 3px #0003; }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(17px); }
.switch input:focus-visible + .track { outline: 2px solid var(--ink); outline-offset: 2px; }
table.events { width: 100%; border-collapse: collapse; font-size: 12px; }
table.events th, table.events td { text-align: left; padding: 7px 8px; border-bottom: 1px solid #eee3da; vertical-align: top; }
.table-wrap { overflow-x: auto; }
.demo-banner { background: var(--accent); color: var(--ink); font-weight: 700; text-align: center; padding: 6px; font-size: 12px; letter-spacing: .6px; }

/* ---------- diálogos ---------- */
dialog { border: 1px solid var(--line); border-radius: var(--r-dialog); padding: 0; width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px);
  background: #fffffff2; color: var(--ink); box-shadow: 0 30px 80px #1c120a33; }
dialog::backdrop { background: #1b181633; backdrop-filter: blur(3px); }
.dlg { display: flex; flex-direction: column; max-height: calc(100dvh - 26px); }
.dlg-head { padding: 18px 20px 6px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.dlg-head h2 { margin: 0; font-size: 18px; }
.dlg-body { padding: 10px 20px; overflow-y: auto; display: grid; gap: 12px; }
.dlg-foot { padding: 12px 20px 18px; display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.dlg-foot .left { margin-right: auto; }
.stage-row { display: grid; grid-template-columns: minmax(0,1fr) 120px auto; gap: 6px; align-items: center; padding: 8px; border-radius: 12px; background: #faf6f2; border: 1px solid #f0e7df; }
.stage-row .tools { display: flex; gap: 4px; }
.stage-row input, .stage-row select { padding: 7px 9px; border-radius: 9px; border: 1px solid #e7dfd8; background: #fff; min-width: 0; }
.stage-row .transfer { grid-column: 1 / -1; font-size: 12px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.form-error { color: var(--danger); font-size: 12px; min-height: 1em; }
.field-item { display: grid; gap: 6px; padding: 10px; border-radius: 12px; background: #faf6f2; border: 1px solid #f0e7df; }

@media (max-width: 1200px) {
  .sidebar { width: 180px; }
  .panel.overlay { position: absolute; right: 18px; top: 12px; bottom: 0; z-index: 50; box-shadow: 0 24px 60px #1c120a2e; }
}
@media (max-width: 750px) {
  .workspace { padding: 8px; gap: 8px; }
  .sidebar { width: 62px; padding: 12px 8px; }
  .sidebar .brand-mark, .sidebar .brand-sub, .ws-card .ws-text, .nav .lbl { display: none; }
  .side-top { justify-content: center; }
  .ws-card { padding: 6px; justify-content: center; }
  .nav button { justify-content: center; padding: 10px 0; }
  .main { padding: 10px 6px 0; }
  .title { font-size: 21px; }
  .toolbar input[type=search] { width: 100%; height: 36px; }
  .toolbar .hint { display: none; }
  .board { grid-auto-columns: minmax(240px, 86vw); }
  .panel.overlay, .panel { position: absolute; inset: 6px 0 0 0; width: auto; z-index: 60; margin: 0; }
  .inbox { grid-template-columns: minmax(0,1fr); }
  .inbox.chat-open .inbox-list { display: none; }
  .inbox:not(.chat-open) .inbox-chat { display: none; }
  .inbox-chat .panel { position: static; }
  .is-inbox .main { padding-top: 10px; }
  .is-inbox .title { font-size: 21px; }
  .is-inbox .panel-head { padding: 11px 13px; }
  .composer { padding: 9px 10px 10px; gap: 7px; }
  .composer textarea { height: 50px; min-height: 50px; }
  .tmetrics { gap: 6px; }
  .tmetric { padding: 10px 8px; }
  .tmetric strong { font-size: 20px; }
  .header { flex-wrap: wrap; }
  .metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 8px; }
  .metric { flex-direction: column; align-items: flex-start; gap: 0; padding: 5px 8px; }
  .metric span { font-size: 8px; letter-spacing: .4px; }
  .metric strong { font-size: 16px; }
  .toolbar { gap: 6px; margin-bottom: 8px; }
  .toolbar select { max-width: 60%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; scroll-behavior: auto !important; }
}

/* hosts do painel ocupam a altura útil */
#pipeline-panel-host, #contacts-panel-host { display: flex; min-height: 0; }
#pipeline-panel-host > .panel, #contacts-panel-host > .panel { height: auto; }
.board-wrap > aside > .panel:not(.overlay) { align-self: stretch; }
