/* Telas vindas do Painel Oralize (Fluxo Geral de Atendimentos, Conversas, Exames), na paleta roxa do ERP.
   Tudo fica dentro de .pn (e .pn-ex nos Exames) para não mexer no resto do ERP. */
.pn {
  --bg: #f6f4f9; --card: #fff; --ink: #232323; --muted: #6b6478; --line: #e7e3ef; --brand: #6e3990; --brand-ink: #fff;
  --ok: #15803d; --warn: #b45309; --err: #b91c1c; --soft: #f3ecf8; --col: #eeeaf4;
  color: var(--ink); font-size: 14px; line-height: 1.5;
  a { color: var(--brand); }
  label { display: block; font-size: 13px; font-weight: 600; margin: 12px 0 6px; }
  .hint { font-weight: 400; color: var(--muted); font-size: 12px; }
  input[type=text], input[type=search], input[type=date], input[type=number], input[type=tel], select, textarea {
    width: 100%; padding: 8px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); font: inherit;
  }
  textarea { min-height: 70px; resize: vertical; }
  input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: -1px; }
  input[type=radio], input[type=checkbox] { accent-color: var(--brand); }
  .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
  button, .btn { appearance: none; border: 0; border-radius: 10px; padding: 8px 15px; font: inherit; font-weight: 600; cursor: pointer; background: var(--brand); color: var(--brand-ink); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
  button.ghost, .btn.ghost { background: transparent; color: var(--brand); border: 1px solid var(--line); }
  button.danger { background: transparent; color: var(--err); border: 1px solid var(--line); }
  button.small, .btn.small { padding: 5px 10px; font-size: 13px; }
  button:disabled { opacity: .5; cursor: default; }
  .actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
  .flash { padding: 10px 14px; border-radius: 10px; margin-bottom: 16px; font-size: 14px; }
  .flash.ok { background: color-mix(in srgb, var(--ok) 12%, transparent); color: var(--ok); }
  .flash.err { background: color-mix(in srgb, var(--err) 12%, transparent); color: var(--err); }
  .pill { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--soft); color: var(--muted); }
  .pill.ok { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
  .pill.warn { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
  .pill.err { background: color-mix(in srgb, var(--err) 14%, transparent); color: var(--err); }
  .pill.brand { background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--brand); }
  .muted { color: var(--muted); font-size: 13px; }
  .empty { color: var(--muted); text-align: center; padding: 24px 0; }
  .memo { background: var(--soft); border-radius: 10px; padding: 8px 10px; font-size: 13px; margin-top: 10px; white-space: pre-wrap; }
  [hidden] { display: none !important; }

  /* quadro kanban */
  .toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
  .toolbar input[type=search] { max-width: 260px; }
  .toolbar select { width: auto; }
  .stats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
  .board { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: stretch; min-height: 60vh; }
  .kcol .kbody { flex: 1; }
  .kcol { flex: 0 0 272px; background: var(--col); border-radius: 12px; padding: 8px; display: flex; flex-direction: column; max-height: 100%; border-top: 3px solid var(--kc, #94a3b8); }
  .kcol.over { outline: 2px dashed var(--brand); }
  .kcol.dragging { opacity: .45; }
  .khead { display: flex; align-items: center; gap: 8px; padding: 4px 6px 8px; font-weight: 700; font-size: 14px; }
  .khead[draggable=true] { cursor: grab; }
  .khead .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
  .khead .kname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .khead .n { margin-left: auto; color: var(--muted); font-weight: 600; font-size: 13px; background: var(--card); border-radius: 999px; padding: 0 8px; }
  .kmenu { background: transparent; color: var(--muted); padding: 0 6px; font-size: 18px; line-height: 1.2; border-radius: 6px; }
  .kmenu:hover { background: var(--line); color: var(--ink); }
  .kadd { flex: 0 0 200px; align-self: stretch; min-height: 120px; border: 2px dashed var(--line); border-radius: 12px; padding: 14px; color: var(--muted); justify-content: center; background: transparent; font-weight: 600; }
  .kadd:hover { border-color: var(--brand); color: var(--brand); }
  .kbody { overflow-y: auto; display: flex; flex-direction: column; gap: 8px; min-height: 40px; padding: 2px; }
  .kvazio { color: var(--muted); font-size: 12px; text-align: center; padding: 14px 6px; border: 1px dashed var(--line); border-radius: 8px; }
  .kcard { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px; cursor: pointer; font-size: 13px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
  .kcard:hover { border-color: var(--brand); }
  .kcard.dragging { opacity: .4; }
  .kcard.alert { border-left: 4px solid var(--err); }
  .kcard.attn { border-left: 4px solid var(--warn); }
  .kcard .t { font-weight: 700; font-size: 14px; display: flex; gap: 6px; align-items: center; }
  .kcard .chips { display: flex; gap: 4px; flex-wrap: wrap; }
  .kcard .who { display: flex; align-items: center; gap: 8px; min-width: 0; }
  .kcard .who .t { min-width: 0; }
  .kcard .who .t span.nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .kcard .kdel { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; padding: 0; border-radius: 6px; background: transparent; color: var(--muted); border: 1px solid transparent; font-size: 13px; line-height: 1; display: flex; align-items: center; justify-content: center; opacity: .55; cursor: pointer; z-index: 2; }
  .kcard:hover .kdel { opacity: 1; }
  .kcard .kdel:hover { background: var(--err); color: #fff; border-color: var(--err); }
  .kcard.temdel { padding-right: 30px; }
  .mini { width: 30px; height: 30px; border-radius: 50%; flex: 0 0 30px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #fff; }
  .agbtn { margin-left: auto; flex: 0 0 auto; padding: 2px 9px; font-size: 11.5px; border-radius: 999px; background: transparent; color: var(--muted); border: 1px dashed var(--line); }
  .agbtn:hover { border-color: var(--ok); color: var(--ok); }
  .agbtn.on { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); border: 1px solid color-mix(in srgb, var(--ok) 40%, transparent); }
  .stbtn { display: inline-flex; margin: 6px 0 2px; padding: 1px 9px; font-size: 12px; font-weight: 600; border-radius: 6px; background: color-mix(in srgb, var(--kc, #64748b) 14%, var(--card)); color: var(--ink); border: 1px solid color-mix(in srgb, var(--kc, #64748b) 35%, transparent); }
  .stbtn.vazio { color: var(--muted); background: transparent; border-style: dashed; }
  .stbtn.err { background: color-mix(in srgb, var(--err) 14%, transparent); color: var(--err); border-color: color-mix(in srgb, var(--err) 40%, transparent); }
  .colorpick { width: 64px; height: 38px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }

  /* conversas */
  .chat { display: grid; grid-template-columns: 340px minmax(0, 1fr) 310px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; height: calc(100vh - 170px); background: var(--card); }
  .clist { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; background: var(--card); }
  .ctools { padding: 10px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
  .chips2 { display: flex; gap: 6px; flex-wrap: wrap; }
  .chip { border: 1px solid var(--line); background: var(--card); color: var(--muted); border-radius: 999px; padding: 3px 11px; font-size: 12px; font-weight: 600; }
  .chip.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
  .citems { overflow-y: auto; flex: 1; }
  .citem { display: flex; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); cursor: pointer; align-items: center; }
  .citem:hover { background: var(--soft); }
  .citem.on { background: color-mix(in srgb, var(--brand) 11%, var(--card)); }
  .av { width: 44px; height: 44px; border-radius: 50%; flex: 0 0 44px; display: flex; align-items: center; justify-content: center; font-weight: 700; color: #fff; font-size: 15px; overflow: hidden; }
  .av img { width: 100%; height: 100%; object-fit: cover; }
  .av.lg { width: 72px; height: 72px; flex-basis: 72px; font-size: 24px; margin: 0 auto; }
  .cmain { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
  .crow { display: flex; justify-content: space-between; gap: 8px; align-items: center; min-width: 0; }
  .cname { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ctime { font-size: 11px; color: var(--muted); flex: 0 0 auto; }
  .citem.unread .ctime { color: var(--brand); font-weight: 700; }
  .csnip { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .cbadge { background: var(--brand); color: var(--brand-ink); border-radius: 999px; font-size: 11px; font-weight: 700; padding: 0 7px; flex: 0 0 auto; line-height: 18px; }
  .ctags { display: flex; gap: 8px; flex-wrap: wrap; }
  .cstage { font-size: 11px; display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
  .cstage i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
  .cpane { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg); }
  .chead { display: flex; align-items: center; gap: 10px; padding: 8px 14px; background: var(--card); border-bottom: 1px solid var(--line); min-height: 60px; }
  .chead .av { width: 38px; height: 38px; flex-basis: 38px; font-size: 13px; }
  .cthread { flex: 1; overflow-y: auto; padding: 16px 5%; display: flex; flex-direction: column; gap: 3px; background-color: var(--bg); background-image: radial-gradient(color-mix(in srgb, var(--muted) 16%, transparent) 1px, transparent 1px); background-size: 20px 20px; }
  .cday { align-self: center; background: var(--card); border: 1px solid var(--line); color: var(--muted); font-size: 11px; font-weight: 600; padding: 2px 10px; border-radius: 999px; margin: 10px 0 6px; }
  .msg { max-width: min(560px, 80%); padding: 6px 9px 5px; border-radius: 10px; font-size: 14px; line-height: 1.4; white-space: pre-wrap; word-break: break-word; box-shadow: 0 1px 1px rgba(0,0,0,.07); margin-top: 2px; }
  .msg.in { align-self: flex-start; background: var(--card); border-top-left-radius: 3px; }
  .msg.out { align-self: flex-end; background: color-mix(in srgb, var(--brand) 14%, var(--card)); border-top-right-radius: 3px; }
  .msg.pend { opacity: .7; }
  .msg .mt { font-size: 10.5px; color: var(--muted); float: right; margin: 6px 0 -2px 12px; }
  .msg .au { display: block; font-size: 12px; font-weight: 700; margin-bottom: 2px; }
  .msg .md { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
  .msg .md u { cursor: pointer; color: var(--brand); }
  .msg audio { width: 260px; max-width: 100%; display: block; }
  .msg .mimg { max-width: 280px; max-height: 320px; border-radius: 8px; display: block; }
  .ccomp { display: flex; gap: 8px; padding: 10px 14px; background: var(--card); border-top: 1px solid var(--line); align-items: flex-end; }
  .ccomp textarea { min-height: 42px; max-height: 140px; flex: 1; resize: none; }
  .cic { background: transparent; color: var(--muted); font-size: 20px; padding: 6px 8px; flex: 0 0 auto; line-height: 1; }
  .cic:hover { background: var(--soft); }
  .canexos { display: flex; gap: 8px; flex-wrap: wrap; padding: 10px 14px 0; background: var(--card); border-top: 1px solid var(--line); }
  .canx { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 4px; font-size: 13px; max-width: 260px; }
  .canx img, .canx .ic { width: 42px; height: 42px; object-fit: cover; border-radius: 7px; flex: 0 0 auto; }
  .canx .ic { display: grid; place-items: center; font-size: 20px; background: var(--soft); font-weight: 400; }
  .canx span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; line-height: 1.3; }
  .crec { display: flex; align-items: center; gap: 10px; flex: 1; font-weight: 700; min-height: 42px; }
  .crec i { width: 11px; height: 11px; border-radius: 50%; background: var(--err); animation: pn-pisca 1s infinite; }
  .cpane.drop { outline: 3px dashed var(--brand); outline-offset: -10px; }
  .cinfo { border-left: 1px solid var(--line); background: var(--card); overflow-y: auto; padding: 16px; }
  .cinfo h4 { margin: 18px 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
  .cempty { flex: 1; display: flex; align-items: center; justify-content: center; color: var(--muted); flex-direction: column; gap: 8px; text-align: center; padding: 20px; }
  .back { display: none !important; }
}
@keyframes pn-pisca { 50% { opacity: .2; } }
@media (max-width: 1180px) {
  .pn .chat { grid-template-columns: 300px minmax(0, 1fr); }
  .pn .cinfo { display: none; }
  .pn .chat.showinfo .cinfo { display: block; position: fixed; right: 0; top: 0; bottom: 0; width: min(340px, 100%); z-index: 60; box-shadow: -8px 0 24px rgba(0,0,0,.18); }
}

/* gaveta lateral e menus que ficam no body */
.pn.pn-overlay { position: fixed; inset: 0; background: rgba(30,10,60,.35); z-index: 90; display: none; }
.pn.pn-overlay.show { display: block; }
.pn.pn-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 100%); background: var(--card); z-index: 100; transform: translateX(100%); transition: transform .2s ease; display: flex; flex-direction: column; border-left: 1px solid var(--line); }
.pn.pn-drawer.show { transform: none; }
.pn.pn-drawer .dhead { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.pn.pn-drawer .dhead h3 { margin: 0; font-size: 16px; }
.pn.pn-drawer .dbody { overflow-y: auto; padding: 12px 16px; flex: 1; }
.pn.popmenu { position: fixed; z-index: 120; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.18); padding: 4px; display: flex; flex-direction: column; min-width: 190px; max-height: 60vh; overflow: auto; }
.pn.popmenu button { background: transparent; color: var(--ink); justify-content: flex-start; padding: 7px 10px; font-weight: 500; font-size: 13px; border-radius: 6px; }
.pn.popmenu button:hover { background: var(--soft); }
.pn.popmenu button.on { color: var(--brand); font-weight: 700; }
.pn.wpop, .pn.wmodal { z-index: 120; }

/* ---------- Exames e cirurgias ---------- */
.pn-ex-who { display: inline-flex; align-items: center; gap: 6px; }
.pn-ex-who input { width: 160px; padding: 6px 9px; border: 1px solid var(--line-strong); border-radius: 8px; }
.titulo-tela .badge.gray { display: inline-block; background: #edeaf2; color: #5b5568; border-radius: 20px; padding: 4px 10px; font-size: 12px; font-weight: 650; }
.pn-ex {
  --ink: #232323; --muted: #6b6478; --line: #e1dbea; --green: #6e3990; --red: #ad403e;
  color: var(--ink); font-size: 14px; line-height: 1.5;
  button { cursor: pointer; background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 9px; padding: 8px 14px; font: inherit; }
  button:hover { border-color: var(--green); }
  button:disabled { opacity: .45; cursor: not-allowed; }
  .primary { background: var(--green); color: #fff; border-color: var(--green); }
  h2 { font-size: 19px; margin: 0 0 12px; }
  h3 { font-size: 15px; margin: 0 0 8px; }
  .kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
  .kpi { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; }
  .kpi strong { display: block; font-size: 26px; letter-spacing: -.6px; }
  .muted { color: var(--muted); }
  .toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
  input, select, textarea { background: #fff; border: 1px solid #d6cfe2; border-radius: 8px; padding: 9px 10px; color: var(--ink); max-width: 100%; font: inherit; }
  input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--green); cursor: pointer; }
  input[type=search] { min-width: 250px; flex: 1; }
  label { display: block; margin: 10px 0 5px; }
  textarea { width: 100%; resize: vertical; min-height: 70px; }
  .check { display: flex; align-items: center; gap: 10px; }
  .check input { flex: none; }
  .spacer { flex: 1; }
  .notice { padding: 12px 15px; background: #f3ecf8; border: 1px solid #e2d4ee; border-radius: 10px; margin-bottom: 16px; }
  .notice.error { background: #fff0ed; color: #963d2b; border-color: #efc1b7; }
  .empty { padding: 40px; text-align: center; color: var(--muted); }
  .hidden { display: none !important; }
  dialog { border: 1px solid var(--line); border-radius: 16px; padding: 24px; width: min(940px, 94vw); max-height: 90vh; color: var(--ink); }
  dialog::backdrop { background: #1e0a3cb0; }
  dialog input, dialog select, dialog textarea { width: 100%; }
  .dialogtop { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 12px; }
  .dialogtop h2 { margin: 0; }
  .event { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .event p { white-space: pre-wrap; margin: 5px 0; }
  .links { display: flex; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
  .date { font-size: 12px; color: var(--muted); }
  .spin { padding: 40px; text-align: center; }
  .board { display: grid; grid-template-columns: repeat(6, minmax(140px, 1fr)); gap: 8px; overflow-x: auto; padding-bottom: 8px; }
  .col { background: #eeeaf4; border-radius: 14px; padding: 8px; min-height: 160px; }
  .col h3 { display: flex; justify-content: space-between; align-items: center; font-size: 13px; margin: -8px -8px 8px; padding: 10px 12px 8px; color: #4a3a5c; background: #eeeaf4; border-radius: 14px 14px 0 0; }
  .col.over, .col.over h3 { background: #e3d7ef; }
  .col.over { outline: 2px dashed var(--green); outline-offset: -4px; }
  .col h3 .n { background: #fff; border-radius: 20px; padding: 1px 9px; font-size: 12px; }
  .ex { display: block; width: 100%; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 11px; padding: 9px 10px; margin: 0 0 8px; cursor: pointer; }
  .ex:hover { border-color: var(--green); }
  .ex[draggable=true] { cursor: grab; }
  .ex.drag { opacity: .45; }
  .ex b { display: block; font-size: 13.5px; line-height: 1.3; overflow-wrap: anywhere; }
  .ex .l { font-size: 12px; color: var(--muted); margin-top: 3px; }
  .ex .tg { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 7px; }
  .ex .tg span { font-size: 11px; border-radius: 20px; padding: 2px 8px; background: #edeaf2; color: #5b5568; }
  .ex .tg .new { background: #dff2e8; color: #176342; font-weight: 650; }
  .ex .tg .late { background: #fde5e4; color: #a43c39; font-weight: 650; }
  .ex .tg .dent { background: #f1e9ff; color: #5b3d99; font-weight: 650; }
  .ex .tg .date { background: #e5edff; color: #2f4f9a; font-weight: 650; }
  .ex .dots { display: flex; gap: 4px; margin-top: 8px; }
  .ex .dots i { flex: 1; height: 4px; border-radius: 3px; background: #e2dcea; }
  .ex .dots i.ok { background: var(--green); }
  .steps { display: grid; gap: 8px; margin: 6px 0 14px; }
  .step { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 11px; padding: 11px 13px; cursor: pointer; margin: 0; }
  .step input { width: 18px; flex: none; }
  .step.ok { background: #f3ecf8; border-color: #d9c4ea; }
  .step small { display: block; color: var(--muted); }
  .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .row3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; }
  .hist { max-height: 260px; overflow: auto; border-top: 1px solid var(--line); margin-top: 14px; }
  .etrow, .ethead { display: grid; grid-template-columns: 28px 1fr 1fr 40px 40px 40px; gap: 8px; align-items: center; margin-bottom: 8px; }
  .ethead { margin: 8px 0 4px; font-size: 12px; color: var(--muted); }
  .etrow .n { color: var(--muted); text-align: center; }
  .etrow button { padding: 8px 0; }
}
@media (min-width: 1181px) {
  .pn .chat.semficha { grid-template-columns: 340px minmax(0, 1fr); }
  .pn .chat.semficha .cinfo { display: none; }
}
.pn .cinfo { overflow-x: hidden; }

/* Administração > WhatsApp e Automações */
.pn.pn-cfg { max-width: 1100px; }
.pn .card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin-bottom: 16px; }
.pn .card h2 { font-size: 15px; margin: 0 0 12px; }
.pn .subtabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 6px 0 16px; overflow-x: auto; scrollbar-width: none; }
.pn .subtabs button { background: transparent; color: var(--muted); border-radius: 8px 8px 0 0; border-bottom: 2px solid transparent; padding: 8px 14px; font-weight: 600; }
.pn .subtabs button:hover { color: var(--ink); background: var(--soft); }
.pn .subtabs button.on { color: var(--brand); border-bottom-color: var(--brand); }
.pn .kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; font-size: 14px; margin: 0; }
.pn .kv dt { color: var(--muted); }
.pn .kv dd { margin: 0; word-break: break-word; }
.pn .row { display: flex; gap: 8px; align-items: end; }
.pn .row > * { flex: 1; }
.pn .list { list-style: none; margin: 0; padding: 0; }
.pn .list li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.pn .list li:last-child { border: 0; }
.pn .letters { display: flex; flex-wrap: wrap; gap: 3px; margin: 8px 0; }
.pn .letters button { padding: 3px 8px; font-size: 12px; background: var(--col); color: var(--ink); border-radius: 6px; font-weight: 600; }
.pn .letters button.on { background: var(--brand); color: var(--brand-ink); }
.pn .glist { max-height: 300px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; margin-top: 6px; }
.pn .glist label { display: flex; gap: 10px; align-items: center; margin: 0; padding: 9px 12px; border-bottom: 1px solid var(--line); font-weight: 500; cursor: pointer; }
.pn .glist label:last-child { border: 0; }
.pn .glist label:hover { background: var(--soft); }
.pn .conns { gap: 0 16px; align-items: start; }
.pn .qrbox { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 10px; }
.pn .qrbox img { width: 260px; height: 260px; background: #fff; border-radius: 12px; padding: 8px; }
.pn .paircode { font: 700 28px/1 ui-monospace, Menlo, monospace; letter-spacing: .12em; background: var(--soft); padding: 12px 18px; border-radius: 12px; }
.pn details { border: 0; padding: 0; }
.pn summary { cursor: pointer; }
.pn .strow { border: 1px solid var(--line); border-left: 4px solid var(--kc); border-radius: 10px; padding: 10px 12px; margin-top: 10px; }
.pn .sthead { display: flex; gap: 8px; align-items: center; }
.pn .sthead .muted { margin-left: auto; font-size: 12px; }
.pn .stdot { width: 10px; height: 10px; border-radius: 50%; background: var(--kc); flex: 0 0 auto; }
.pn .stchips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.pn .stchips:empty { margin: 4px 0; }
.pn .stchip { display: inline-flex; align-items: center; gap: 2px; padding: 3px 3px 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; background: color-mix(in srgb, var(--kc) 14%, var(--card)); border: 1px solid color-mix(in srgb, var(--kc) 35%, transparent); cursor: grab; }
.pn .stchip.dragging { opacity: .4; }
.pn .stchip button { background: transparent; color: var(--muted); padding: 0 7px; font-size: 12px; line-height: 1.6; border-radius: 999px; }
.pn .stchip button:hover { color: var(--err); background: var(--soft); }

/* Conversas: botões de canal nas cores das marcas */
.pn .chip[data-c="wa"] { color: #128C7E; border-color: #25D366; }
.pn .chip[data-c="wa"].on { background: #25D366; border-color: #25D366; color: #fff; }
.pn .chip[data-c="ig"] { color: #C13584; border-color: #E1306C; }
.pn .chip[data-c="ig"].on { background: linear-gradient(45deg, #F58529, #DD2A7B 45%, #8134AF 75%, #515BD4); border-color: #DD2A7B; color: #fff; }
