/* Tela de Automacoes (js/automacao.js). Usa os tokens do app.css; sem cores fixas, vale no claro e no escuro. */
#v-automacoes .au-pg, #v-automacoes .au-ed { display: grid; gap: 16px; align-content: start; }
#v-automacoes .au-pg { display: flex; flex-direction: column; min-height: calc(100dvh - 190px); }
.au-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.au-h3 { font-size: 15px; margin: 18px 0 8px; font-weight: 600; }
.au-ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.au-li { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.au-ul > .au-li:not(.au-box) { padding: 8px 0; border-bottom: 1px solid var(--line); }
.au-rod { margin: auto 0 0; padding-top: 24px; }

/* submenu e abas */
.au-sub-tabs { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; border-bottom: 1px solid var(--line); overflow: visible; }
.au-sub-tabs.inner { border-bottom: 0; }
.au-st-t { border: 0; background: transparent; color: var(--muted); padding: 10px 14px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; font: inherit; font-weight: 500; }
.au-st-t:hover { color: var(--fg); }
.au-st-t.on { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
.au-sep { flex: 1; }
.au-n2 { margin-left: 6px; font-size: 11px; background: var(--soft); color: var(--muted); border-radius: 999px; padding: 1px 7px; }

/* cabecalho da lista */
.au-head { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.au-head h2 { margin: 0; font-size: 22px; font-weight: 600; }
.au-acoes { display: flex; gap: 8px; flex-wrap: wrap; }
.au-tools { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.au-busca { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); border-radius: 9px; padding: 0 10px; min-width: 220px; margin-bottom: 6px; color: var(--muted); }
.au-busca input { border: 0; outline: 0; background: transparent; color: var(--fg); padding: 8px 0; width: 100%; font: inherit; }
.au-crumb { color: var(--muted); font-size: 13px; display: flex; gap: 6px; align-items: center; }
.au-crumb button { border: 0; background: transparent; padding: 0; color: var(--brand); cursor: pointer; font: inherit; }
.au-crumb button:disabled { color: var(--muted); cursor: default; }

/* tabela */
.au-tw { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.au-tbl { width: 100%; border-collapse: collapse; min-width: 640px; }
.au-tbl th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--soft); white-space: nowrap; }
.au-tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.au-tbl tr:last-child td { border-bottom: 0; }
.au-tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.au-tbl .au-r { text-align: right; width: 44px; }
.au-nm { border: 0; background: transparent; padding: 0; color: var(--fg); font: inherit; font-weight: 600; cursor: pointer; text-align: left; display: inline-flex; align-items: center; gap: 10px; }
.au-nm:hover { color: var(--brand); }
.au-sub2 { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.au-sub2.inl { display: inline; margin: 0 0 0 8px; font-weight: 400; }
.au-err { color: var(--bad); font-weight: 600; }
.au-stc { display: inline-flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); }
.au-vazio { text-align: center; color: var(--muted); padding: 40px 16px; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); }

/* switch e chips (nada de caixa de selecao) */
.au-sw { width: 38px; height: 22px; border-radius: 999px; border: 0; padding: 2px; background: var(--faint); cursor: pointer; flex: none; transition: background .15s; display: inline-flex; align-items: center; }
.au-sw span { width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgb(0 0 0 / .25); }
.au-sw[aria-checked="true"] { background: var(--brand); }
.au-sw[aria-checked="true"] span { transform: translateX(16px); }
.au-sw:focus-visible, .au-pill:focus-visible, .au-op:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.au-pills { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.au-pill { border: 1px solid var(--line); background: var(--surface); color: var(--fg); border-radius: 999px; padding: 4px 12px; cursor: pointer; font: inherit; font-size: 13px; }
.au-pill[aria-pressed="true"] { background: var(--brand-soft); color: var(--brand); border-color: var(--brand); font-weight: 600; }
.au-mini { padding: 2px 8px !important; font-size: 12px !important; }
.au-linha { display: flex; gap: 12px; align-items: flex-start; }
.au-linha > span { flex: 1; }
.au-danger { color: var(--bad) !important; }
.au-warn { color: var(--warn) !important; padding: 6px 10px; }

/* menu ⋮ */
.au-menu { position: relative; display: inline-block; }
.au-menu > summary { list-style: none; cursor: pointer; padding: 4px 9px; border-radius: 8px; color: var(--muted); font-size: 18px; line-height: 1; user-select: none; }
.au-menu > summary::-webkit-details-marker { display: none; }
.au-menu > summary:hover { background: var(--soft); color: var(--fg); }
.au-menu > summary.btn { font-size: inherit; padding: 8px 14px; color: var(--fg); }
.au-mm { position: fixed; left: 0; top: 0; z-index: 60; min-width: 180px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgb(0 0 0 / .18); padding: 4px; display: grid; text-align: left; }
.au-mm button { border: 0; background: transparent; color: var(--fg); text-align: left; padding: 8px 10px; border-radius: 7px; cursor: pointer; font: inherit; }
.au-mm button:hover:not(:disabled) { background: var(--soft); }
.au-mm button:disabled { color: var(--faint); cursor: default; }

/* visao geral */
.au-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.au-kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: grid; gap: 4px; }
.au-kpi b { font-size: 28px; font-weight: 600; font-variant-numeric: tabular-nums; }
.au-kpi span { color: var(--muted); font-size: 13px; }
.au-bars { display: flex; gap: 10px; align-items: flex-end; height: 180px; padding-top: 18px; }
.au-bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; min-width: 0; }
.au-bf { width: 100%; max-width: 54px; background: var(--brand); border-radius: 6px 6px 0 0; opacity: .85; }
.au-bv { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--muted); }
.au-bl { font-size: 11px; color: var(--muted); }

/* configuracoes */
.au-ops { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.au-op { text-align: left; border: 1px solid var(--line); background: var(--surface); color: var(--fg); border-radius: var(--radius); padding: 14px 16px; cursor: pointer; display: grid; gap: 4px; font: inherit; }
.au-op span { color: var(--muted); font-size: 13px; }
.au-op.on { border-color: var(--brand); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand); }

/* construtor */
.au-edh { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.au-nome { flex: 1; min-width: 180px; font-weight: 600; font-size: 16px; }
.au-status { font-size: 12px; color: var(--muted); }
.au-status.pend { color: var(--warn); }
.au-pub { display: inline-flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); }
.au-edbody { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: start; }
.au-edbody.com { grid-template-columns: minmax(0, 1fr) 380px; }
.au-cvw { position: relative; min-width: 0; }
.au-addm { margin-left: auto; margin-bottom: 4px; z-index: 20; }
.au-cv { height: calc(100vh - 330px); min-height: 440px; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); background-color: var(--bg); background-image: radial-gradient(var(--line) 1.4px, transparent 1.5px); background-size: 22px 22px; position: relative; }
.au-flow { display: grid; justify-items: center; padding: 28px 16px 40px; min-width: min-content; }
.au-trigs { position: relative; display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; padding-bottom: 48px; max-width: 100%; }
.au-mergesvg { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; }
.au-edge { stroke: var(--faint); stroke-width: 2; fill: none; }
.au-trig, .au-step { position: relative; z-index: 1; display: flex; gap: 10px; align-items: center; width: 240px; text-align: left; border: 1px solid var(--line); background: var(--surface); color: var(--fg); border-radius: 12px; padding: 10px 12px; cursor: pointer; font: inherit; box-shadow: var(--shadow); box-sizing: border-box; }
.au-trig:hover, .au-step:hover { border-color: var(--brand); }
.au-trig.sel, .au-step.sel { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft), 0 0 0 3px var(--brand); }
.au-step.ruim { border-color: var(--bad); }
.au-dash { border-style: dashed; background: var(--brand-soft); color: var(--brand); box-shadow: none; }
.au-dash .au-tile { background: var(--surface); }
.au-tile { width: 34px; height: 34px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; flex: none; background: var(--soft); color: var(--muted); font-size: 18px; }
.au-t-gat { background: var(--ok-bg); color: var(--ok); }
.au-t-notificar { background: var(--warn-bg); color: var(--warn); }
.au-t-email_interno { background: var(--info-bg); color: var(--info); }
.au-t-esperar { background: var(--violet-bg); color: var(--violet); }
.au-t-enviar_mensagem { background: var(--ok-bg); color: var(--ok); }
.au-t-pasta { background: var(--brand-soft); color: var(--brand); }
.au-tx { display: grid; min-width: 0; }
.au-tx b { font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.au-tx > span { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.au-stepw { position: relative; }
.au-sm { position: absolute; right: 4px; top: 4px; z-index: 2; }
.au-stepw .au-step { padding-right: 34px; }
.au-pl { display: flex; flex-direction: column; align-items: center; }
.au-line { width: 2px; height: 16px; background: var(--faint); }
.au-plus { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--faint); background: var(--surface); color: var(--muted); cursor: pointer; line-height: 1; padding: 0; font-size: 16px; }
.au-plus:hover { border-color: var(--brand); color: var(--brand); }
.au-fim { margin-top: 2px; font-size: 12px; color: var(--faint); border: 1px dashed var(--line); border-radius: 999px; padding: 3px 12px; }
.au-canvas { position: absolute; inset: 0; overflow: hidden; touch-action: none; cursor: grab; }
.au-cv:has(.au-canvas) { overflow: hidden; }
.au-n { position: absolute !important; user-select: none; cursor: move; }
.au-out, .au-in { position: absolute; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; border: 2px solid var(--brand); background: var(--surface); cursor: pointer; z-index: 2; }
.au-out { bottom: -8px; } .au-in { top: -8px; }
.au-out.on { background: var(--brand); }
.au-hit { stroke: transparent; stroke-width: 14; fill: none; pointer-events: stroke; cursor: pointer; }
.au-hit:hover + .au-edge { stroke: var(--bad); }
.au-zoom { position: absolute; left: 12px; bottom: 12px; display: grid; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; z-index: 5; }
.au-zoom button { border: 0; background: transparent; color: var(--fg); padding: 6px 12px; cursor: pointer; font: inherit; }
.au-zoom button:hover { background: var(--soft); }
.au-zoom span { text-align: center; font-size: 12px; color: var(--muted); padding: 3px 0; }
.au-dica { position: absolute; left: 70px; bottom: 8px; margin: 0; max-width: 60%; pointer-events: none; }

/* painel lateral */
.au-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; height: calc(100vh - 330px); min-height: 440px; box-shadow: var(--shadow); overflow: hidden; }
.au-ph { display: flex; gap: 10px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.au-ph > .au-tx { flex: 1; }
.au-ph > .au-tx > span { white-space: normal; }
.au-ph > b { flex: 1; font-size: 15px; }
.au-x { border: 0; background: transparent; font-size: 22px; line-height: 1; cursor: pointer; color: var(--muted); padding: 2px 8px; border-radius: 8px; }
.au-x:hover { background: var(--soft); color: var(--fg); }
.au-abas { display: flex; border-bottom: 1px solid var(--line); }
.au-aba { flex: 1; border: 0; background: transparent; padding: 10px; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; font: inherit; }
.au-aba.on { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
.au-pb { padding: 16px; overflow-y: auto; flex: 1; display: grid; gap: 12px; align-content: start; }
.au-pf { display: flex; gap: 8px; justify-content: space-between; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); }
.au-pfr { display: flex; gap: 8px; }
.au-q { width: 100%; box-sizing: border-box; }
.au-cat-g { display: grid; gap: 6px; }
.au-cat-t { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-top: 4px; }
.au-cat-it { display: flex; gap: 10px; align-items: center; text-align: left; border: 1px solid var(--line); background: var(--surface); color: var(--fg); border-radius: 10px; padding: 8px 10px; cursor: pointer; font: inherit; }
.au-cat-it[hidden] { display: none; }
.au-cat-it:hover:not(:disabled) { border-color: var(--brand); background: var(--brand-soft); }
.au-cat-it:disabled { opacity: .55; cursor: default; }
.au-duas { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.au-sts { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.au-st { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: grid; }
.au-st b { font-size: 22px; }
.au-st span { font-size: 12px; color: var(--muted); }

@media (max-width: 1000px) {
  .au-edbody.com { grid-template-columns: minmax(0, 1fr); }
  .au-panel { height: auto; min-height: 0; max-height: 80vh; }
  .au-dica { display: none; }
}

/* criar fluxo (popup) e biblioteca de modelos */
.au-ib { display: inline-flex; gap: 6px; align-items: center; }
.au-cria { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.au-lib { position: fixed; inset: 0; z-index: 900; background: rgb(0 0 0 / .45); display: flex; padding: 3vh 3vw; }
.au-lib[hidden] { display: none; }
.au-libbox { background: var(--surface); color: var(--fg); border: 1px solid var(--line); border-radius: 14px; width: 100%; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 20px 60px rgb(0 0 0 / .35); }
.au-libh { display: flex; gap: 10px; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.au-libh h2 { margin: 0; font-size: 18px; font-weight: 600; flex: 1; }
.au-libb { display: grid; grid-template-columns: 270px minmax(0, 1fr); min-height: 0; flex: 1; }
.au-side { border-right: 1px solid var(--line); padding: 14px; overflow-y: auto; display: grid; gap: 4px; align-content: start; }
.au-lf { display: grid; gap: 2px; margin-top: 12px; }
.au-lf-t { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 4px 8px; }
.au-lf-i { display: flex; justify-content: space-between; gap: 8px; align-items: center; border: 0; background: transparent; color: var(--fg); text-align: left; padding: 7px 10px; border-radius: 8px; cursor: pointer; font: inherit; font-size: 13.5px; }
.au-lf-i:hover { background: var(--soft); }
.au-lf-i.on { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.au-main { padding: 16px 20px; overflow-y: auto; display: grid; gap: 14px; align-content: start; }
.au-lt { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.au-lt .au-busca { flex: 1; margin: 0; }
.au-explica { display: grid; gap: 10px; background: var(--info-bg); color: var(--info); border-radius: 12px; padding: 14px 16px; }
.au-explica p { margin: 2px 0 0; color: var(--fg); font-size: 13.5px; }
.au-grid-c { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.au-card { text-align: left; border: 1px solid var(--line); background: var(--surface); color: var(--fg); border-radius: 12px; padding: 14px; cursor: pointer; display: grid; gap: 8px; align-content: start; font: inherit; }
.au-card:hover { border-color: var(--brand); box-shadow: var(--shadow); }
.au-card-t { font-size: 14.5px; }
.au-card-d { font-size: 12.5px; color: var(--muted); }
.au-card-f { display: flex; gap: 12px; align-items: center; font-size: 12px; color: var(--muted); }
.au-card-f > span { display: inline-flex; gap: 4px; align-items: center; }
.au-aut { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.au-mini-flow { display: flex; align-items: center; gap: 2px; background: var(--bg); border-radius: 10px; padding: 12px 10px; overflow: hidden; }
.au-mt { width: 28px; height: 28px; font-size: 14px; }
.au-seta { color: var(--faint); font-size: 16px; }
.au-tags { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.au-tag { font-size: 11px; background: var(--soft); color: var(--muted); border-radius: 999px; padding: 2px 8px; }
.au-tag.of { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.au-det { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; padding: 20px; overflow-y: auto; flex: 1; align-items: start; }
.au-det-c { display: grid; gap: 10px; }
.au-det-s { display: grid; gap: 10px; align-content: start; }
.au-linha2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.au-linha2 .btn { display: inline-flex; gap: 6px; align-items: center; justify-content: center; }
.au-linha2 .btn[aria-pressed="true"] { color: var(--brand); border-color: var(--brand); }
.au-coms { display: grid; gap: 8px; max-height: 260px; overflow-y: auto; }
.au-com { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; position: relative; font-size: 13px; }
.au-com p { margin: 4px 0 0; white-space: pre-line; }
.au-com .au-x { position: absolute; right: 4px; top: 2px; font-size: 18px; }
body.au-lib-aberta { overflow: hidden; }
@media (max-width: 800px) {
  .au-lib { padding: 0; }
  .au-libb { grid-template-columns: minmax(0, 1fr); overflow-y: auto; }
  .au-side { border-right: 0; border-bottom: 1px solid var(--line); max-height: 40vh; }
  .au-det { grid-template-columns: minmax(0, 1fr); }
}

/* biblioteca v2: busca, filtros em secoes, lista, paginacao, previa do fluxo */
.au-st-t { display: inline-flex; gap: 6px; align-items: center; }
.au-hr { border: 0; border-top: 1px solid var(--line); margin: 8px 0; width: 100%; }
.au-lf-i { align-items: center; }
.au-lf-i svg, .au-sec-h svg, .au-tag svg, .au-chipb svg { flex: none; width: 15px; height: 15px; }
.au-n2 { font-size: 12px; color: var(--muted); background: var(--soft); border-radius: 999px; padding: 0 7px; }
.au-sec { display: grid; }
.au-sec-h { display: flex; gap: 8px; align-items: center; border: 0; background: transparent; color: var(--fg); font: inherit; font-weight: 600; font-size: 13.5px; padding: 9px 8px; cursor: pointer; border-radius: 8px; text-align: left; }
.au-sec-h:hover { background: var(--soft); }
.au-sec-b { display: grid; gap: 2px; padding: 0 0 6px 4px; }
.au-mais { border: 0; background: transparent; color: var(--brand); font: inherit; font-size: 12.5px; padding: 6px 10px; cursor: pointer; text-align: left; }
.au-sbox { border: 1.5px solid var(--brand-soft); border-radius: 16px; padding: 14px 16px; display: grid; gap: 12px; background: var(--surface); box-shadow: 0 0 0 4px var(--brand-soft); }
.au-sbox-l { display: flex; gap: 12px; align-items: center; }
.au-sico { width: 38px; height: 38px; border-radius: 10px; background: var(--brand); color: var(--on-brand); display: grid; place-items: center; flex: none; }
.au-sbox input[type=search] { flex: 1; border: 0; outline: 0; background: transparent; font: inherit; font-size: 16px; color: var(--fg); min-width: 0; }
.au-try { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 13px; color: var(--muted); }
.au-chipb { display: inline-flex; gap: 6px; align-items: center; border: 1px solid var(--line); background: var(--surface); color: var(--fg); border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; }
.au-chipb:hover { border-color: var(--brand); color: var(--brand); }
.au-lt .btn[disabled] { opacity: .5; cursor: default; }
.au-lt .btn[aria-pressed="true"] { border-color: var(--brand); }
.au-badge { background: var(--brand); color: var(--on-brand); border-radius: 999px; font-size: 11px; padding: 0 6px; }
.au-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.au-seg button { border: 0; background: var(--surface); color: var(--muted); padding: 7px 10px; cursor: pointer; display: grid; place-items: center; }
.au-seg button.on { background: var(--brand-soft); color: var(--brand); }
.au-res { font-size: 13px; color: var(--muted); }
.au-pag { display: flex; gap: 14px; justify-content: center; align-items: center; font-size: 13px; color: var(--muted); }
.au-grid-c.lista { grid-template-columns: 1fr; }
.au-grid-c.lista .au-card { grid-template-columns: 220px minmax(0, 1fr) auto; align-items: center; }
.au-card-m { display: grid; gap: 6px; }
.au-tag { display: inline-flex; gap: 4px; align-items: center; }
.au-prev { border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: var(--bg); display: grid; gap: 0; justify-items: center; }
.au-prev-h { display: grid; gap: 2px; justify-items: center; text-align: center; margin-bottom: 12px; }
.au-pv-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; width: 100%; }
.au-pv { display: flex; gap: 10px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; max-width: 320px; font-size: 13px; }
.au-pv-g { border-style: dashed; }
.au-pv-lig { height: 26px; display: grid; place-items: center; }
.au-pv-lig span { width: 2px; height: 100%; background: var(--faint); position: relative; }
.au-pv-lig span::after { content: ""; position: absolute; bottom: -1px; left: -4px; border: 5px solid transparent; border-top-color: var(--faint); }
@media (max-width: 800px) { .au-grid-c.lista .au-card { grid-template-columns: 1fr; } }
.au-lt { flex-wrap: nowrap; }
.au-lt select { width: auto; flex: none; }
.au-lt .grow { flex: 1; }
@media (max-width: 800px) { .au-lt { flex-wrap: wrap; } }

/* configuracoes globais: mais respiro */
.au-cfg { display: grid; gap: 20px; max-width: 980px; }
.au-cfg .au-box { padding: 22px 24px; display: grid; gap: 14px; }
.au-cfg .au-box > .au-h3, .au-cfg .au-box > p { margin: 0; }
.au-cfg .au-box > .au-h3 + p.sub { margin-top: -8px; }
.au-cfg .au-ops { gap: 16px; margin-top: 4px; }
.au-cfg .au-op { padding: 18px 20px; gap: 8px; }
.au-cfg .au-op b { font-size: 15px; }
.au-cfg .au-linha { gap: 16px; align-items: center; }
.au-cfg .au-linha .sub { margin-top: 4px; }

/* catalogo em secoes + botao flutuante some dentro do construtor */
body:has(#au-cv) #fab, body:has(#au-cv) #fab-menu { display: none !important; }
.au-cat-g { display: block; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
.au-cat-g[hidden] { display: none; }
.au-cat-h { display: flex; gap: 10px; align-items: center; width: 100%; border: 0; background: transparent; color: var(--fg); font: inherit; font-weight: 600; font-size: 14px; padding: 12px 14px; cursor: pointer; text-align: left; }
.au-cat-h:hover { background: var(--soft); }
.au-cat-h svg { color: var(--brand); }
.au-cat-g .au-chev { transition: transform .15s; color: var(--muted); transform: rotate(-90deg); }
.au-cat-g.ab .au-chev, .au-cat-g.bus .au-chev { transform: none; }
.au-cat-b { display: none; gap: 6px; padding: 4px 10px 10px; border-top: 1px solid var(--line); }
.au-cat-g.ab .au-cat-b, .au-cat-g.bus .au-cat-b { display: grid; }
.au-cat-b .au-cat-it { border: 0; padding: 8px; }
.au-tile.sn { background: var(--soft); color: var(--muted); }
.au-soon { margin-left: auto; font-size: 11px; color: var(--muted); background: var(--soft); border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.au-cat-it:disabled { opacity: 1; }
.au-cat-it:disabled .au-tx b { color: var(--muted); font-weight: 500; }
.au-pb { display: flex; flex-direction: column; gap: 10px; }
.au-pb > * { flex: none; }

/* menu Adicionar acima do quadro; busca do catalogo arredondada com lupa em circulo */
.au-sub-tabs:has(.au-addm) { overflow: visible; position: relative; z-index: 40; }
.au-qw { display: flex; gap: 10px; align-items: center; border: 1.5px solid var(--line); background: var(--surface); border-radius: 999px; padding: 5px 16px 5px 6px; }
.au-qw:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.au-qico { width: 32px; height: 32px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; flex: none; }
.au-qw .au-q { border: 0; outline: 0; background: transparent; font: inherit; color: var(--fg); min-width: 0; flex: 1; padding: 6px 0; }

/* acoes de contato, anexos e testes */
.au-t-criar_contato, .au-t-atribuir_usuario { background: var(--brand-soft); color: var(--brand); }
.au-t-remover_usuario { background: var(--bad-bg); color: var(--bad); }
.au-t-mover_etapa { background: var(--violet-bg); color: var(--violet); }
.au-teste { display: grid; gap: 6px; justify-items: start; border-top: 1px dashed var(--line); padding-top: 12px; }
.au-teste .btn[disabled] { opacity: .5; cursor: default; }
.au-anexos { display: grid; gap: 8px; border-top: 1px dashed var(--line); padding-top: 12px; }
.au-anx { display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; background: var(--surface); font-size: 13px; }

.au-vazio .au-padrao { margin: 14px 0 8px; }

.au-tbl .au-ck { width: 36px; padding-right: 0; }
.au-ck input { width: 16px; height: 16px; cursor: pointer; accent-color: var(--brand); }
.au-tbl tr.au-sel td { background: color-mix(in srgb, var(--brand) 7%, var(--surface)); }
.au-selbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); font-size: 13px; }
.au-selbar .grow { flex: 1; }
.au-head .au-ib.on { background: var(--soft); }
.au-aviso { margin: 10px 0 14px; padding: 10px 12px; border-radius: 9px; background: color-mix(in srgb, var(--bad) 10%, var(--surface)); color: var(--fg); font-size: 13px; }

.au-tools-d { display: inline-flex; align-items: center; gap: 8px; }
.au-tools-d .au-busca { margin-bottom: 6px; }
.au-mais { width: 32px; height: 32px; margin-bottom: 6px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.au-mais:hover { background: var(--soft); color: var(--fg); }
.au-tbl th.au-th-sel { width: auto; white-space: nowrap; text-transform: none; letter-spacing: 0; }
.au-sel-b { display: inline-flex; align-items: center; gap: 7px; border: 0; background: transparent; padding: 2px 4px; color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; border-radius: 6px; }
.au-sel-b:hover { color: var(--fg); background: var(--soft); }
.au-sel-b input { width: 15px; height: 15px; margin: 0; pointer-events: none; accent-color: var(--brand); }

.au-crumb .au-voltar { padding: 4px 12px; color: var(--fg); margin-right: 6px; }

.pm-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); margin-top: 16px; }
.pm-h { font-size: 15px; margin: 0 0 4px; font-weight: 600; }
.pm-linha { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.pm-linha select { min-width: 220px; max-width: 100%; }
.pm-fixo select { opacity: .65; }
@media (max-width: 560px) { .pm-linha { flex-direction: column; align-items: stretch; } .pm-linha select { min-width: 0; } }
