/* Hosts — redesenho (18/09/2026): números que filtram, chips de fabricante, aviso de queda conjunta,
   linha com logo/situação/disponibilidade em barra; no celular cada host vira um cartão.
   Tons próprios (claro por padrão, escuro no data-theme="dark"); o resto vem do design-system.
   Seletores com .hk-painel na frente para vencer o <style> da própria página (tabela "Opção B"). */
:root { --hk-acc: #0e9f94; --hk-crit: #dc2626; --hk-warn: #b45309; --hk-ok: #15803d; --hk-in: #2563eb; --hk-vio: #7c3aed; }
html[data-theme="dark"] { --hk-acc: #35e0d0; --hk-crit: #f87171; --hk-warn: #fbbf24; --hk-ok: #4ade80; --hk-in: #60a5fa; --hk-vio: #a78bfa; }

/* ---------- Números ---------- */
.hk-kpis { display: grid; grid-template-columns: 1.3fr repeat(5, minmax(0, 1fr)); gap: 10px; margin: 2px 0 12px; }
.hk-kpi { --t: var(--text-secondary); position: relative; display: flex; flex-direction: column; gap: 1px; text-align: left; min-width: 0;
  padding: 11px 12px 10px 15px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg-card); color: var(--text-primary);
  font: inherit; text-decoration: none; cursor: pointer; overflow: hidden; transition: border-color .15s, transform .15s; }
.hk-kpi::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--t); }
.hk-kpi:hover { border-color: color-mix(in srgb, var(--t) 45%, var(--border)); transform: translateY(-1px); }
.hk-kpi.is-on { border-color: color-mix(in srgb, var(--t) 60%, var(--border)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--t) 22%, transparent); }
.hk-kpi:focus-visible { outline: 2px solid var(--t); outline-offset: 2px; }
.hk-kpi--crit { --t: var(--hk-crit); } .hk-kpi--warn { --t: var(--hk-warn); } .hk-kpi--ok { --t: var(--hk-ok); } .hk-kpi--vio { --t: var(--hk-vio); } .hk-kpi--mu { --t: var(--text-secondary); }
.hk-kpi__l { font-size: 11.5px; font-weight: 600; color: var(--text-secondary); }
.hk-kpi__v { font-family: 'Outfit', system-ui, sans-serif; font-size: 25px; font-weight: 700; line-height: 1.2; }
.hk-kpi__v small { font-family: inherit; font-size: 13px; font-weight: 500; color: var(--text-secondary); }
.hk-kpi--crit .hk-kpi__v { color: var(--hk-crit); } .hk-kpi--warn .hk-kpi__v { color: var(--hk-warn); }
.hk-kpi__d { font-size: 11px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hk-kpi--anel { flex-direction: row; align-items: center; gap: 12px; }
.hk-anel__txt { display: flex; flex-direction: column; min-width: 0; }
.hk-anel { position: relative; width: 54px; height: 54px; flex: none; }
.hk-anel svg { width: 54px; height: 54px; transform: rotate(-90deg); }
.hk-anel circle { fill: none; stroke-width: 3.6; }
.hk-anel__f { stroke: var(--bg-hover); }
.hk-anel__a { stroke: var(--hk-ok); stroke-linecap: round; }
.hk-anel b { position: absolute; inset: 0; display: grid; place-items: center; font-family: 'Outfit', system-ui, sans-serif; font-size: 12.5px; }

/* ---------- Filtros ---------- */
.hk-fl { border: 1px solid var(--border); border-radius: 12px; background: var(--bg-card); padding: 10px 12px; margin-bottom: 12px; display: flex; flex-direction: column; gap: 10px; }
.hk-fl__linha { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hk-busca { flex: 0 1 280px; min-width: 200px; }
.hk-chips { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.hk-chip { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 12px; padding: 3px 10px 3px 6px; border-radius: 99px;
  border: 1px solid var(--border); background: transparent; color: var(--text-secondary); cursor: pointer; white-space: nowrap; }
.hk-chip:first-child { padding-left: 10px; }
.hk-chip b { color: var(--text-primary); font-variant-numeric: tabular-nums; }
.hk-chip:hover { border-color: color-mix(in srgb, var(--hk-acc) 45%, var(--border)); }
.hk-chip.is-on { color: var(--hk-acc); border-color: color-mix(in srgb, var(--hk-acc) 55%, transparent); background: color-mix(in srgb, var(--hk-acc) 9%, transparent); }
.hk-chip.is-on b { color: var(--hk-acc); }
.hk-chip:focus-visible, .hk-seg button:focus-visible, .hk-filtros-btn:focus-visible { outline: 2px solid var(--hk-acc); outline-offset: 2px; }
.hk-chip .hk-logo { height: 15px !important; }
.hk-seg { margin-left: auto; display: inline-flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; flex: none; }
.hk-seg button { font: inherit; font-size: 12px; padding: 5px 11px; border: 0; background: transparent; color: var(--text-secondary); cursor: pointer; white-space: nowrap; }
.hk-seg button + button { border-left: 1px solid var(--border); }
.hk-seg button[aria-pressed="true"] { color: var(--hk-acc); background: color-mix(in srgb, var(--hk-acc) 12%, transparent); font-weight: 600; }
.hk-fl__mais { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid var(--border); }
.hk-campo { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; font-weight: 600; color: var(--text-secondary); min-width: 170px; }
.hk-campo--cliente { flex: 1 1 260px; max-width: 360px; }
.hk-campo .input { font-size: 13px; }
.hk-fl__mais .btn-clear { margin-left: auto; }
.hk-filtros-btn { display: none; }

/* ---------- Aviso de queda conjunta ---------- */
.hk-junto { display: flex; align-items: center; gap: 12px; padding: 10px 14px; margin-bottom: 12px; border-radius: 12px; font-size: 13px; color: var(--text-primary);
  border: 1px solid color-mix(in srgb, var(--hk-crit) 30%, var(--border));
  background: linear-gradient(90deg, color-mix(in srgb, var(--hk-crit) 10%, var(--bg-card)), var(--bg-card) 60%); }
.hk-junto.hidden { display: none; }
.hk-junto__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--hk-crit); box-shadow: 0 0 0 5px color-mix(in srgb, var(--hk-crit) 16%, transparent); flex: none; }
.hk-junto__txt { min-width: 0; }
.hk-junto__txt b { font-weight: 700; margin-right: 4px; }
.hk-junto__txt span { color: var(--text-secondary); }
.hk-junto .btn { margin-left: auto; flex: none; }

/* ---------- Painel e tabela ---------- */
.hk-painel { border: 1px solid var(--border); border-radius: 14px; background: var(--bg-card); padding: 10px 12px 12px; margin-bottom: 24px; }
.hk-painel__cab { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.hk-conta { font-size: 12.5px; color: var(--text-secondary); }
.hk-conta b { color: var(--text-primary); font-variant-numeric: tabular-nums; }
.hk-painel .hosts-b-table thead th { font-size: 10.5px; }
.hk-painel .hosts-b-table tbody td { padding: 9px 10px; }
.hk-painel .hosts-b-table thead th { padding-left: 10px; padding-right: 10px; }
.hk-painel .hosts-b-table tbody tr td:nth-child(2) { position: relative; }
.hk-painel .hosts-b-table tbody tr.is-off td:first-child,
.hk-painel .hosts-b-table.is-selecting tbody tr.is-off td:first-child { box-shadow: none; }
.hk-painel .hosts-b-table tbody tr.is-off td.hk-c-id { box-shadow: inset 3px 0 0 var(--hk-crit); }
.hk-painel .hosts-b-table tbody tr.is-warn td.hk-c-id { box-shadow: inset 3px 0 0 var(--hk-warn); }
.hk-painel .hosts-b-table tbody tr.is-paused td.hk-c-id { box-shadow: inset 3px 0 0 var(--text-secondary); }
.hk-painel .hosts-b-table tbody tr.is-paused td:not(.hb-actions) { opacity: .62; }
.hk-painel .hosts-b-table tbody tr.is-junto { background: color-mix(in srgb, var(--hk-crit) 4%, transparent); }
.hk-painel .hosts-b-table tbody tr.is-off .hb-id .meta .ip { color: var(--hk-in); }
.hk-painel .hb-id { display: flex; align-items: center; gap: 10px; min-width: 0; }
.hk-painel .hb-id__txt { min-width: 0; }
.hk-painel .hb-id .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.hk-painel .hb-id .meta { max-width: 200px; overflow: hidden; text-overflow: ellipsis; }
.hk-painel .hb-id .hk-logo { height: 16px !important; max-width: 72px !important; padding: 2px 4px !important; }
.hk-painel .hb-client { max-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hk-painel .hb-act-btn { width: 29px; height: 29px; border-radius: 8px; }
.hk-painel .hb-act-btn + .hb-act-btn { margin-left: 3px; }
.hk-logo { flex: none; }
.hk-semcli { color: var(--text-secondary); font-style: italic; font-weight: 400; }
.hk-vincular { font: inherit; font-style: normal; font-weight: 600; color: var(--hk-acc); background: none; border: 0; padding: 0 0 0 4px; cursor: pointer; }
.hk-vincular:hover { text-decoration: underline; }
.hk-vincular:focus-visible { outline: 2px solid var(--hk-acc); outline-offset: 2px; border-radius: 4px; }
.hk-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 99px; white-space: nowrap;
  color: var(--t, var(--text-secondary)); background: color-mix(in srgb, var(--t, var(--text-secondary)) 12%, transparent); }
.hk-pill i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.hk-pill--ok { --t: var(--hk-ok); } .hk-pill--crit { --t: var(--hk-crit); } .hk-pill--warn { --t: var(--hk-warn); } .hk-pill--mu { --t: var(--text-secondary); }
.hk-c-sit small, .hk-ping small { display: block; font-size: 11px; color: var(--text-secondary); margin-top: 3px; white-space: nowrap; }
.hk-disp { display: flex; flex-direction: column; gap: 4px; min-width: 84px; }
.hk-disp b { font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; }
.hk-disp b[data-tom="crit"] { color: var(--hk-crit); } .hk-disp b[data-tom="warn"] { color: var(--hk-warn); }
.hk-disp__bar { display: block; height: 5px; border-radius: 99px; background: var(--bg-hover); overflow: hidden; }
.hk-disp__bar i { display: block; height: 100%; border-radius: 99px; background: var(--hk-ok); }
.hk-disp__bar i[data-tom="warn"] { background: var(--hk-warn); } .hk-disp__bar i[data-tom="crit"] { background: var(--hk-crit); }
.hk-ping { font-family: ui-monospace, Menlo, monospace; font-size: 12px; }
.hk-ping small { font-family: inherit; }
.hk-mu { color: var(--text-secondary); }

/* ---------- Tablet ---------- */
@media (max-width: 1280px) { .hk-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- Celular ---------- */
@media (max-width: 767px) {
  .hk-some-movel { display: none !important; }
  .hk-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
  .hk-kpi { padding: 8px 8px 7px 11px; }
  .hk-kpi__v { font-size: 19px; }
  .hk-kpi__l { font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .hk-kpi__d { display: none; }
  .hk-kpi--anel { grid-column: 1 / -1; order: 9; padding: 8px 12px; }
  .hk-kpi--anel .hk-kpi__d { display: block; }
  .hk-anel, .hk-anel svg { width: 42px; height: 42px; }
  .hk-anel b { font-size: 11px; }
  .hk-fl { padding: 10px; }
  .hk-busca { flex: 1 1 auto; min-width: 0; }
  .hk-filtros-btn { display: inline-flex; align-items: center; gap: 7px; font: inherit; font-size: 13px; font-weight: 600; padding: 7px 11px;
    border: 1px solid var(--border); border-radius: 10px; background: transparent; color: var(--text-primary); cursor: pointer; }
  .hk-filtros-btn b { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--hk-acc); color: #042523; font-size: 11px; display: inline-grid; place-items: center; }
  .hk-filtros-btn b.hidden { display: none; }
  .hk-chips { flex-wrap: nowrap; overflow-x: auto; width: 100%; padding-bottom: 2px; scrollbar-width: none; }
  .hk-chips::-webkit-scrollbar { display: none; }
  .hk-seg { display: none; }
  .hk-fl__mais:not(.is-aberto) { display: none; }
  .hk-fl__mais { flex-direction: column; align-items: stretch; }
  .hk-campo, .hk-campo--cliente { min-width: 0; max-width: none; }
  .hk-fl__mais .btn-clear { margin-left: 0; }
  .hk-junto { flex-wrap: wrap; font-size: 12.5px; padding: 9px 11px; }
  .hk-junto .btn { margin-left: 21px; }
  .hk-painel { padding: 8px; background: transparent; border: 0; }
  .hk-painel .hosts-table-wrap { border: 0; overflow: visible; }
  /* tabela → cartões */
  .hk-painel .hosts-b-table thead { display: none; }
  .hk-painel .hosts-b-table, .hk-painel .hosts-b-table tbody { display: block; width: 100%; }
  .hk-painel .hosts-b-table tbody { display: flex; flex-direction: column; gap: 9px; }
  .hk-painel .hosts-b-table tbody tr {
    display: grid; grid-template-columns: minmax(0, 1fr) auto auto; column-gap: 10px; row-gap: 8px;
    grid-template-areas: "id id sit" "cli cli cli" "disp ping snmp" "acts acts acts";
    position: relative; padding: 11px 12px 10px 15px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg-card); overflow: hidden;
  }
  .hk-painel .hosts-b-table tbody tr:hover { background: var(--bg-card); }
  .hk-painel .hosts-b-table tbody tr > td { display: block; padding: 0; border: 0; min-width: 0; box-shadow: none !important; background: transparent !important; position: static; }
  .hk-painel .hosts-b-table tbody tr::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: transparent; }
  .hk-painel .hosts-b-table tbody tr.is-off::before { background: var(--hk-crit); }
  .hk-painel .hosts-b-table tbody tr.is-warn::before { background: var(--hk-warn); }
  .hk-painel .hosts-b-table tbody tr.is-paused::before { background: var(--text-secondary); }
  .hk-painel .hosts-b-table td.hb-cb { display: none; }
  .hk-painel .hosts-b-table.is-selecting td.hb-cb { display: block; position: absolute; top: 10px; right: 10px; }
  .hk-painel .hosts-b-table td.hk-c-id { grid-area: id; }
  .hk-painel .hosts-b-table td.hk-c-cli { grid-area: cli; font-size: 12px; margin-top: -4px; }
  .hk-painel .hosts-b-table td.hk-c-cli .hb-client { max-width: none; font-weight: 500; color: var(--text-secondary); }
  .hk-painel .hosts-b-table td.hk-c-sit { grid-area: sit; text-align: right; }
  .hk-painel .hosts-b-table td.hk-c-sit small { display: none; }
  .hk-painel .hosts-b-table td.hk-c-disp { grid-area: disp; }
  .hk-painel .hosts-b-table td.hk-c-ping { grid-area: ping; align-self: center; }
  .hk-painel .hosts-b-table td.hk-c-snmp { grid-area: snmp; align-self: center; }
  .hk-painel .hosts-b-table td.hb-actions { grid-area: acts; text-align: left; display: flex; gap: 6px; }
  .hk-painel .hosts-b-table td.hb-actions .hb-act-btn { margin: 0; }
  .hk-painel .hb-id { flex-direction: column; align-items: flex-start; gap: 5px; }
  .hk-painel .hb-id .name { white-space: normal; max-width: none; font-size: 14px; line-height: 1.3; }
  .hk-painel .hb-id .meta { white-space: normal; }
  .hk-disp { min-width: 0; }
  .hk-ping small { display: none; }
  .hk-painel .hosts-b-table tbody tr:not(:has(td.hk-c-id)) { display: block; }
}
@media (prefers-reduced-motion: reduce) { .hk-kpi { transition: none; } }

/* ================= Cadastro do host (18/09/2026) =================
   Topo com o estado, faixa "Testar agora", índice de seções à esquerda, blocos com chave,
   community escondida e rodapé com Cancelar/Salvar. Celular: tela cheia e índice em abas. */
#modalHost .host-modal-panel.ds-modal__panel { width: min(980px, calc(100vw - 28px)) !important; max-height: min(92vh, 920px); height: min(92vh, 920px); background: var(--bg-card) !important; }
#modalHost .ds-modal__header { padding: 16px 20px 12px !important; align-items: flex-start !important;
  background: linear-gradient(180deg, color-mix(in srgb, var(--hk-acc) 6%, transparent), transparent); }
.hm-cab { display: flex; flex-direction: column; gap: 6px; }
#modalHost .hm-eb { font-family: inherit !important; font-size: 11px !important; letter-spacing: .1em; text-transform: uppercase; color: var(--text-secondary) !important; font-weight: 700 !important; margin: 0; }
.hm-nome { display: flex; align-items: center; gap: 10px; min-width: 0; }
.hm-nome[hidden], .hm-meta[hidden], .hm-sub[hidden] { display: none; }
.hm-nome__t { font-family: 'Outfit', system-ui, sans-serif; font-size: 20px; font-weight: 700; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.hm-sub { margin: 0; font-size: 12.5px; color: var(--text-secondary); }
.hm-chip { font-size: 11.5px; color: var(--text-secondary); border: 1px solid var(--border); border-radius: 99px; padding: 1px 9px; white-space: nowrap; }
.hm-chip b { color: var(--text-primary); font-weight: 600; }
.hm-chip--vio { color: var(--hk-vio); border-color: color-mix(in srgb, var(--hk-vio) 35%, transparent); background: color-mix(in srgb, var(--hk-vio) 10%, transparent); }
.hm-mono { font-family: ui-monospace, Menlo, monospace; }

.hm-testes { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 9px 20px; border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--bg-hover) 45%, transparent); flex: none; }
.hm-testes__l { font-size: 11.5px; font-weight: 600; color: var(--text-secondary); margin-right: 2px; }
.hm-tb { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 12.5px; font-weight: 600; padding: 5px 11px; border-radius: 9px;
  border: 1px solid var(--border-strong, var(--border)); background: var(--bg-card); color: var(--text-primary); cursor: pointer; }
.hm-tb:hover:not(:disabled) { border-color: color-mix(in srgb, var(--hk-acc) 50%, var(--border)); }
.hm-tb:disabled { opacity: .38; cursor: not-allowed; }
.hm-tb.hidden { display: none; }
.hm-tb:focus-visible { outline: 2px solid var(--hk-acc); outline-offset: 2px; }
.hm-testes__dica { margin-left: auto; font-size: 11.5px; color: var(--text-secondary); }
#modalHost .hm-saida { margin: 0; border-radius: 0; border-left: 0; border-right: 0; max-height: 170px; overflow: auto; flex: none; }

.hm-corpo { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: 196px minmax(0, 1fr); }
.hm-nav { border-right: 1px solid var(--border); padding: 12px 10px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; background: color-mix(in srgb, var(--bg-hover) 30%, transparent); }
.hm-nav a { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 9px; font-size: 13px; color: var(--text-secondary); text-decoration: none; }
.hm-nav a:hover { background: var(--bg-hover); color: var(--text-primary); }
.hm-nav a.is-on { background: color-mix(in srgb, var(--hk-acc) 12%, transparent); color: var(--hk-acc); font-weight: 600; }
.hm-nav a:focus-visible { outline: 2px solid var(--hk-acc); outline-offset: -2px; }
.hm-nav a small { margin-left: auto; font-size: 10.5px; color: var(--text-secondary); opacity: .8; }
.hm-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--text-secondary); }
.hm-dot--ok { background: var(--hk-ok); } .hm-dot--warn { background: var(--hk-warn); } .hm-dot--mu { background: var(--hk-in); }
.hm-dot--off { background: transparent; border: 1.5px solid var(--text-secondary); }
#modalHost .host-modal-form__scroll { padding: 14px 18px 18px !important; display: flex; flex-direction: column; gap: 14px; scroll-behavior: smooth; }
#modalHost .host-modal-form__scroll > .hm-card { flex: none; }

/* blocos */
.hm-card { border: 1px solid var(--border); border-radius: 14px; background: color-mix(in srgb, var(--bg-hover) 22%, var(--bg-card)); padding: 0 14px 14px; scroll-margin-top: 8px; }
.hm-card.hidden { display: none; }
.hm-card .hm-card__h { margin: 0 -14px 12px; padding: 11px 14px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.hm-card .hm-card__h > label { margin-left: auto; }
.hm-h { font-family: 'Outfit', system-ui, sans-serif; font-size: 14.5px; font-weight: 700; color: var(--text-primary); }
.hm-p { font-size: 12px; color: var(--text-secondary); margin-top: 1px; }
/* bloco desligado: fica só o cabeçalho, tracejado */
.hm-card:has(.hm-card__h .hm-sw:not(:checked)) { background: transparent; border-style: dashed; padding-bottom: 0; }
.hm-card:has(.hm-card__h .hm-sw:not(:checked)) .hm-card__h { border-bottom: 0; margin-bottom: 0; }
.hm-card:has(.hm-card__h .hm-sw:not(:checked)) .hm-card__h ~ * { display: none !important; }
/* Cambium/NX: o cartão interno antigo vira o próprio bloco */
.hm-card .card.soft { border: 0 !important; background: transparent !important; padding: 0 !important; margin: 0 !important; box-shadow: none !important; }
.hm-card .card.soft > .hm-card__h { margin: 0 -14px 12px; }
.hm-card--info .card.soft { padding-top: 12px !important; }
.hm-card .card.soft h4 { font-family: 'Outfit', system-ui, sans-serif; font-size: 14.5px !important; color: var(--text-primary) !important; }
/* rótulos: frase normal em vez de caixa-alta miúda */
#modalHost .hm-card label[class*="uppercase"] { text-transform: none; font-size: 11.5px; font-weight: 600; color: var(--text-secondary); letter-spacing: 0; }
.hm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
#ip_host { font-family: ui-monospace, Menlo, monospace; }
/* chave liga/desliga (continua sendo o mesmo checkbox) */
.hm-swl { font-size: 12px; font-weight: 600; color: var(--text-secondary); }
.hm-sw { appearance: none; -webkit-appearance: none; width: 38px; height: 22px; border-radius: 99px; background: color-mix(in srgb, var(--text-secondary) 35%, transparent);
  position: relative; cursor: pointer; flex: none; margin: 0; transition: background .15s; border: 0 !important; box-shadow: none !important; }
.hm-sw:not(:checked) { background: color-mix(in srgb, var(--text-secondary) 38%, transparent) !important; }
.hm-sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.hm-sw:checked { background: var(--hk-acc) !important; }
.hm-sw:checked::after { left: 19px; }
.hm-sw:focus-visible { outline: 2px solid var(--hk-acc); outline-offset: 2px; }
.hm-card:has(.hm-sw:not(:checked)) .hm-swl { opacity: .7; }
/* avisos */
.hm-aviso { display: block; margin: 0 0 12px; padding: 9px 11px; border-radius: 10px; font-size: 12.5px; line-height: 1.45; color: var(--text-primary);
  border: 1px solid color-mix(in srgb, var(--hk-warn) 35%, transparent); background: color-mix(in srgb, var(--hk-warn) 9%, transparent); }
.hm-aviso b { color: var(--hk-warn); }
.hm-aviso[hidden], .hm-aviso-campo[hidden] { display: none !important; }
.hm-aviso-campo { margin: 5px 0 0; font-size: 11.5px; color: var(--hk-warn); }
/* community escondida (sem virar campo de senha: o navegador não oferece "salvar senha") */
.hm-segredo { position: relative; }
.hm-segredo .input { padding-right: 76px; font-family: ui-monospace, Menlo, monospace; }
.hm-secreto:not(.is-visivel) { -webkit-text-security: disc; }
.hm-olho { position: absolute; right: 8px; top: calc(50% + 2px); transform: translateY(-50%); font: inherit; font-size: 11.5px; font-weight: 600; color: var(--hk-acc);
  background: none; border: 0; cursor: pointer; padding: 4px 6px; border-radius: 6px; }
.hm-olho:focus-visible { outline: 2px solid var(--hk-acc); }
/* rodapé */
#modalHost .hm-pe { display: flex; align-items: center; gap: 10px; padding: 12px 20px !important; }
.hm-sujo { font-size: 12.5px; color: var(--hk-warn); display: inline-flex; align-items: center; gap: 7px; }
.hm-sujo[hidden] { display: none; }
.hm-sujo i { width: 7px; height: 7px; border-radius: 50%; background: var(--hk-warn); }
.hm-cancelar { margin-left: auto; }
#modalHost .hm-salvar { width: auto !important; padding: 10px 22px !important; border-radius: 10px !important; }

@media (max-width: 767px) {
  #modalHost.ds-modal { padding: 0 !important; z-index: 10000 !important; }
  #modalHost .host-modal-panel.ds-modal__panel { width: 100vw !important; max-width: none !important; height: 100dvh !important; max-height: 100dvh !important; border-radius: 0 !important; border: 0 !important; }
  #modalHost .ds-modal__header { padding: calc(10px + env(safe-area-inset-top, 0px)) 12px 10px 14px !important; }
  .hm-nome__t { font-size: 17px; white-space: normal; }
  .hm-testes { padding: 8px 12px; gap: 6px; }
  .hm-tb { padding: 5px 8px; font-size: 12px; gap: 4px; }
  .hm-tb svg, .hm-tb i { width: 14px !important; height: 14px !important; }
  .hm-testes__l, .hm-testes__dica { display: none; }
  .hm-corpo { display: flex; flex-direction: column; }
  .hm-nav { flex-direction: row; border-right: 0; border-bottom: 1px solid var(--border); padding: 8px 12px; gap: 6px; overflow-x: auto; flex: none; scrollbar-width: none; }
  .hm-nav::-webkit-scrollbar { display: none; }
  .hm-nav a { flex: none; padding: 4px 10px; border: 1px solid var(--border); border-radius: 99px; font-size: 12px; }
  .hm-nav a small { display: none; }
  #modalHost .host-modal-form__scroll { padding: 12px !important; flex: 1 1 auto; }
  .hm-grid { grid-template-columns: 1fr; }
  #modalHost .hm-pe { padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)) !important; flex-wrap: wrap; }
  .hm-sujo { width: 100%; }
  .hm-cancelar { margin-left: 0; }
  #modalHost .hm-salvar { flex: 1; }
}
@media (prefers-reduced-motion: reduce) { .hm-sw, .hm-sw::after { transition: none; } #modalHost .host-modal-form__scroll { scroll-behavior: auto; } }

/* ---------- Seleção múltipla › Vincular a cliente (09/10/2026) ---------- */
.hk-bulk-cli { border-color: color-mix(in srgb, var(--primary, #2dd4bf) 45%, var(--border)); color: var(--primary, #2dd4bf); font-weight: 800; }
.hk-bulk-cli:hover { background: color-mix(in srgb, var(--primary, #2dd4bf) 10%, transparent); }
#bulkClientModal .saas-modal__panel { width: min(680px, calc(100vw - 28px)); max-height: calc(100vh - 40px); display: flex; flex-direction: column; }
#bulkClientModal .saas-modal__body { overflow-y: auto; min-height: 0; }
.vc-campo { display: flex; flex-direction: column; gap: 6px; }
.vc-campo[hidden] { display: none; }
.vc-campo label, .vc-sub { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-secondary); }
.vc-dica { font-size: 12px; color: var(--text-secondary); }
.vc-link { background: none; border: 0; padding: 0; font: inherit; color: var(--primary, #2dd4bf); cursor: pointer; }
.vc-link:hover { text-decoration: underline; }
.vc-link:focus-visible { outline: 2px solid var(--primary, #2dd4bf); outline-offset: 2px; border-radius: 4px; }
.vc-remover { display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; justify-content: space-between; padding: 10px 12px; border-radius: 10px; font-size: 13px;
  color: var(--text-primary); border: 1px dashed var(--border); }
.vc-remover[hidden] { display: none; }
.vc-sub { margin: 16px 0 6px; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.vc-lista { border: 1px solid var(--border); border-radius: 12px; max-height: 42vh; overflow: auto; }
.vc-l { display: grid; grid-template-columns: minmax(0, 1fr) auto 16px auto; gap: 10px; align-items: center; padding: 8px 12px; border-top: 1px solid var(--border); }
.vc-l:first-child { border-top: 0; }
.vc-h { display: flex; flex-direction: column; min-width: 0; }
.vc-h b { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-primary); }
.vc-h span { font-size: 11px; color: var(--text-secondary); font-family: ui-monospace, monospace; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vc-seta { color: var(--text-secondary); text-align: center; }
.vc-chip { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; display: inline-block; vertical-align: middle; }
.vc-chip--sem { color: var(--text-secondary); border: 1px dashed var(--border); }
.vc-chip--troca { color: #b45309; background: color-mix(in srgb, #f59e0b 16%, transparent); }
.vc-chip--novo { color: var(--primary, #0f766e); background: color-mix(in srgb, var(--primary, #2dd4bf) 14%, transparent); }
.vc-chip--igual { color: var(--text-secondary); background: color-mix(in srgb, var(--text-secondary) 12%, transparent); }
html:not([data-theme="light"]) .vc-chip--troca { color: #fbbf24; }
.vc-aviso { margin-top: 12px; padding: 10px 12px; border-radius: 10px; font-size: 12.5px; color: #b45309;
  border: 1px solid color-mix(in srgb, #f59e0b 45%, transparent); background: color-mix(in srgb, #f59e0b 8%, transparent); }
html:not([data-theme="light"]) .vc-aviso { color: #fbbf24; }
.vc-aviso[hidden] { display: none; }
.vc-nota { margin: 10px 0 0; font-size: 11.5px; color: var(--text-secondary); }
.vc-confirmar { max-width: 100%; white-space: normal; text-align: center; }
@media (max-width: 640px) {
  /* a barra do topo do celular (z 9998) fica por cima dos modais: começa abaixo dela */
  #bulkClientModal .saas-modal__panel { top: calc(56px + env(safe-area-inset-top, 0px) + 10px); transform: translateX(-50%); max-height: calc(100dvh - 56px - env(safe-area-inset-top, 0px) - 20px); }
  #bulkClientModal.is-open .saas-modal__panel { transform: translateX(-50%); }
  .vc-l { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
  .vc-h { flex-basis: 100%; }
  .vc-chip { max-width: 46vw; }
  .vc-lista { max-height: none; }
  #bulkClientModal .saas-modal__footer { flex-direction: column-reverse; }
  #bulkClientModal .saas-modal__footer .btn { width: 100%; }
}
