@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('/fonts/inter-latin-wght-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('/fonts/inter-latin-ext-wght-normal.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 100 800; font-display: swap; src: url('/fonts/jetbrains-mono-latin-wght-normal.woff2') format('woff2'); }

:root {
  --cor: #004e7a; --cor-escura: #003653; --cor-clara: #e6f0f6; --cor2: #ff7400;
  --bg: #eef2f7; --bg2: #ffffff; --bg3: #f5f7fa; --card: #ffffff;
  --texto: #0e1621; --texto2: #56657a; --texto3: #8a97a8; --borda: #e6ebf2; --borda2: #d3dbe6;
  --grad: linear-gradient(135deg, var(--cor) 0%, var(--cor) 100%);
  --grad2: linear-gradient(135deg, var(--cor2) 0%, #ffb35c 100%);
  --ok: #15a05a; --ok-bg: #e6f7ee; --erro: #dc2626; --erro-bg: #fdecec; --aviso: #c2760a; --aviso-bg: #fff5e3; --info: #2563eb; --info-bg: #e9effd;
  --raio: 16px; --raio-sm: 11px; --alt: 44px;
  --verde: #16a34a; --roxo: #7c3aed; --rosa: #db2777; --ciano: #0891b2;
  --sombra: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px -8px rgba(16, 24, 40, .10);
  --sombra-hover: 0 2px 4px rgba(16, 24, 40, .05), 0 18px 40px -14px rgba(16, 24, 40, .22);
  --anel: 0 0 0 4px rgba(0, 78, 122, .16);
  --sombra-modal: 0 24px 80px rgba(2, 8, 20, .35);
  --side-bg: linear-gradient(180deg, var(--cor) 0%, var(--cor-escura) 100%);
  --side-texto: rgba(255,255,255,.84);
  --mono: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
  --fonte: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --codigo-bg: #0b1220; --codigo-texto: #dbe4f0;
  --largura-side: 256px;
}
[data-theme="escuro"] {
  --bg: #0b1017; --bg2: #121923; --bg3: #18212d; --card: #121923;
  --grad: linear-gradient(135deg, #0f3b5c 0%, #1f6fa8 100%);
  --texto: #e6edf5; --texto2: #9fb0c1; --texto3: #6f8090; --borda: #223040; --borda2: #2d3d4f;
  --ok-bg: #0f2a1c; --erro-bg: #331617; --aviso-bg: #33230b; --info-bg: #13223a; --cor-clara: #12283a;
  --sombra: 0 1px 2px rgba(0,0,0,.4), 0 6px 20px rgba(0,0,0,.35);
  --side-bg: linear-gradient(180deg, #0f1a26 0%, #0a1219 100%);
  --codigo-bg: #05090f;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { font-family: var(--fonte); font-size: 14px; line-height: 1.5; color: var(--texto); background: var(--bg);  background-attachment: fixed; -webkit-font-smoothing: antialiased; font-feature-settings: 'cv11', 'ss01'; transition: background .2s, color .2s; }
#pg { animation: entra .28s cubic-bezier(.2,.8,.2,1); }
@keyframes entra { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
a { color: var(--cor); text-decoration: none; }
[data-theme="escuro"] a { color: #7cc4ef; }
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -.015em; line-height: 1.25; }
h1 { font-size: 24px; } h2 { font-size: 16px; } h3 { font-size: 14.5px; }
p { margin: 0 0 8px; }
code, .mono { font-family: var(--mono); font-size: 12.5px; }
code { background: var(--bg3); padding: 1px 5px; border-radius: 5px; border: 1px solid var(--borda); }
button { font-family: inherit; }
:focus-visible { outline: 2px solid var(--cor2); outline-offset: 2px; }
::selection { background: var(--cor); color: #fff; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- layout ---------- */
.app { display: grid; grid-template-columns: var(--largura-side) 1fr; min-height: 100vh; }
.sidebar { background: var(--side-bg); color: #fff; padding: 20px 14px 14px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; height: 100vh; overflow-y: auto; scrollbar-width: thin; }
.sidebar .logo { display: flex; align-items: center; gap: 10px; padding: 4px 10px 22px; min-height: 60px; }
.sidebar .logo img { height: 34px; max-width: 170px; object-fit: contain; }
.sidebar .logo .nome { font-weight: 700; font-size: 17px; letter-spacing: -.01em; }
.sidebar .grupo { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; opacity: .5; padding: 14px 12px 6px; font-weight: 600; }
.sidebar a.item { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px; color: var(--side-texto); font-weight: 500; font-size: 13.5px; transition: background .15s, color .15s; position: relative; }
.sidebar a.item:hover { background: rgba(255,255,255,.09); color: #fff; }
.sidebar a.item.ativo { background: rgba(255,255,255,.16); color: #fff; font-weight: 600; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12), 0 6px 16px -8px rgba(0,0,0,.5); backdrop-filter: blur(6px); }
.sidebar a.item.ativo::before { content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--cor2); }
.sidebar a.item svg { width: 18px; height: 18px; opacity: .9; flex-shrink: 0; }
.sidebar .usuario { margin-top: auto; padding: 14px 10px 4px; border-top: 1px solid rgba(255,255,255,.12); font-size: 12.5px; display: grid; grid-template-columns: 36px 1fr; gap: 10px; align-items: center; }
.sidebar .avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--cor2); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.sidebar .usuario b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar .usuario small { opacity: .7; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar .usuario .papel { display: inline-block; margin-top: 3px; padding: 1px 7px; border-radius: 99px; background: rgba(255,255,255,.16); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.sidebar .rodape { display: flex; gap: 6px; padding: 10px 6px 0; }
.sidebar .rodape button { flex: 1; background: rgba(255,255,255,.08); border: none; color: #fff; padding: 7px; border-radius: 8px; cursor: pointer; font-size: 12px; font-weight: 500; display: flex; align-items: center; justify-content: center; gap: 6px; }
.sidebar .rodape button:hover { background: rgba(255,255,255,.16); }
.sidebar .rodape svg { width: 14px; height: 14px; }
.conteudo { padding: 28px 36px 70px; max-width: 1440px; width: 100%; min-width: 0; }
.topo { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.topo .sub { color: var(--texto2); margin-top: 4px; font-size: 13.5px; max-width: 760px; }
.acoes { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.menu-btn { display: none; }
.selo { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; background: var(--info-bg); color: var(--info); font-size: 12px; font-weight: 600; }

/* ---------- cards ---------- */
.card { background: var(--card); border: 1px solid var(--borda); border-radius: 18px; box-shadow: var(--sombra); padding: 22px 24px; transition: box-shadow .2s, transform .2s; }
.card.hero { background-color: var(--cor); background-image: linear-gradient(135deg, rgba(255,255,255,.10), rgba(255,255,255,0) 60%); color: #fff; border: none; position: relative; overflow: hidden; padding: 26px 28px; }
.card.hero::before { content: ""; position: absolute; width: 380px; height: 380px; border-radius: 50%; right: -120px; top: -180px; background: rgba(255,255,255,.08); }
.card.hero::after { content: ""; position: absolute; width: 240px; height: 240px; border-radius: 50%; right: 120px; bottom: -160px; background: rgba(255,116,0,.35); filter: blur(20px); }
.card.hero h1 { color: #fff; font-size: 26px; }
.card.hero p { color: rgba(255,255,255,.82); position: relative; }
.card.hero .kpis { display: flex; gap: 28px; margin-top: 18px; flex-wrap: wrap; position: relative; }
.card.hero .kpis b { display: block; font-size: 26px; font-weight: 700; letter-spacing: -.03em; }
.card.hero .kpis small { opacity: .8; font-size: 12px; }
.card.hero .btn { background: #fff; color: var(--cor); position: relative; }
.card + .card { margin-top: 16px; }
.card:not(.hero):not(.stat):hover { box-shadow: var(--sombra-hover); }
.card h2 { padding-bottom: 12px; border-bottom: 1px solid var(--borda); }
.card h2:only-child, .card.stat h2 { border-bottom: none; padding-bottom: 0; }
.card h2 { margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card h2 .sub { font-size: 12.5px; color: var(--texto2); font-weight: 400; }
.grid { display: grid; gap: 16px; }
.grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat { padding: 18px 20px; position: relative; overflow: hidden; }
.stat .rotulo { font-size: 12px; color: var(--texto2); font-weight: 500; display: flex; align-items: center; gap: 8px; }
.stat .rotulo svg { width: 16px; height: 16px; color: var(--cor); }

.stat .valor { font-size: 30px; font-weight: 700; margin-top: 6px; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat .valor small { font-size: 13px; color: var(--texto2); font-weight: 500; margin-left: 5px; letter-spacing: 0; }
.stat .barra { height: 6px; background: var(--bg3); border-radius: 99px; margin-top: 12px; overflow: hidden; border: 1px solid var(--borda); }
.stat .barra i { display: block; height: 100%; background: var(--cor); border-radius: 99px; transition: width .6s cubic-bezier(.2,.8,.2,1); }
.stat .barra i.alerta { background: var(--aviso); } .stat .barra i.cheio { background: var(--erro); }
.stat .delta { font-size: 12px; margin-top: 6px; color: var(--texto2); }
.stat .delta.up { color: var(--ok); } .stat .delta.down { color: var(--erro); }

/* ---------- botões / tags ---------- */
.btn { display: inline-flex; align-items: center; gap: 7px; padding: 10px 16px; border-radius: 11px; border: 1px solid transparent; background-color: var(--cor); background-image: linear-gradient(135deg, rgba(255,255,255,.14), rgba(255,255,255,0) 70%); color: #fff; font-weight: 600; font-size: 13.5px; cursor: pointer; transition: filter .15s, transform .12s, box-shadow .15s; white-space: nowrap; line-height: 1.2; box-shadow: 0 6px 16px -6px rgba(15, 23, 42, .35); }
.btn:hover { filter: brightness(1.07); transform: translateY(-1px); box-shadow: 0 10px 22px -8px rgba(15, 23, 42, .4); } .btn:active { transform: translateY(0); }
.btn.sec { background: var(--bg2); background-image: none; color: var(--texto); border-color: var(--borda2); box-shadow: 0 1px 2px rgba(16,24,40,.05); } .btn.sec:hover { background: var(--bg3); filter: none; box-shadow: var(--sombra); }
.btn.acento { background-color: var(--cor2); background-image: linear-gradient(135deg, rgba(255,255,255,.16), rgba(255,255,255,0) 70%); }
.btn.perigo { background: var(--bg2); background-image: none; color: var(--erro); border-color: var(--borda2); box-shadow: none; } .btn.perigo:hover { background: var(--erro-bg); border-color: var(--erro); filter: none; box-shadow: none; }
.btn.link { box-shadow: none; }
.btn.mini { padding: 7px 12px; font-size: 12.5px; border-radius: 9px; }
.btn.ok { background-color: var(--ok); background-image: linear-gradient(135deg, rgba(255,255,255,.16), rgba(255,255,255,0) 70%); }
.btn.fantasma { background: transparent; background-image: none; color: var(--cor); border-color: var(--borda2); box-shadow: none; }
.btn.fantasma:hover { background: var(--cor-clara); filter: none; }
.btn.carregando { pointer-events: none; opacity: .85; }

@keyframes girar { to { transform: rotate(360deg); } }
.btn.icone { padding: 7px; }
.btn.link { background: none; background-image: none; border: none; color: var(--cor); padding: 4px 6px; box-shadow: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn svg { width: 15px; height: 15px; }
.btn.bloco { width: 100%; justify-content: center; }

.tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 11.5px; font-weight: 600; background: var(--bg3); color: var(--texto2); border: 1px solid var(--borda); white-space: nowrap; }
.tag.ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; } .tag.erro { background: var(--erro-bg); color: var(--erro); border-color: transparent; }
.tag.aviso { background: var(--aviso-bg); color: var(--aviso); border-color: transparent; } .tag.info { background: var(--info-bg); color: var(--info); border-color: transparent; }
.tag.cor { background: var(--cor); color: #fff; border-color: transparent; } .tag.cor2 { background: var(--cor2); color: #fff; border-color: transparent; }
.tag i.ponto { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; }
.tag.ok i.ponto { animation: pulso 1.8s infinite; }
@keyframes pulso { 0%, 100% { box-shadow: 0 0 0 0 rgba(22,163,74,.45); } 60% { box-shadow: 0 0 0 5px rgba(22,163,74,0); } }

.chave { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; background: var(--bg3); border: 1px dashed var(--borda2); border-radius: 8px; padding: 6px 10px; max-width: 100%; color: var(--texto); }
.chave span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chave button { border: none; background: none; cursor: pointer; color: var(--cor); font-weight: 600; font-size: 11.5px; padding: 0; font-family: var(--fonte); }
[data-theme="escuro"] .chave button { color: #7cc4ef; }

/* ---------- tabelas ---------- */
.tabela { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tabela th, .tabela td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--borda); vertical-align: middle; }
.tabela th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--texto3); font-weight: 600; background: var(--bg3); }
.tabela tr:last-child td { border-bottom: none; }
.tabela tbody tr:nth-child(even) td { background: var(--bg3); }
.tabela tbody tr:hover td { background: var(--bg3); }
.tabela td:first-child { font-weight: 500; }
.tabela .acoes { justify-content: flex-end; }
.tabela td small { color: var(--texto2); }
.tabela-wrap { overflow-x: auto; border-radius: 12px; }
.tabela th { background: transparent; border-bottom: 1px solid var(--borda2); }
.tabela-ferramentas { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 12px; flex-wrap: wrap; }
.tabela-ferramentas input { max-width: 280px; }
.paginacao { display: flex; gap: 6px; align-items: center; justify-content: flex-end; padding: 10px 0 0; font-size: 12.5px; color: var(--texto2); }
.paginacao button { border: 1px solid var(--borda2); background: var(--bg2); color: var(--texto); border-radius: 7px; padding: 4px 9px; cursor: pointer; }
.paginacao button:disabled { opacity: .4; cursor: default; }

/* ---------- formulários ---------- */
.form { display: grid; gap: 14px; }
.form .linha { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form .linha.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
label { display: block; font-size: 12.5px; font-weight: 600; color: var(--texto2); margin-bottom: 6px; }
/* campo "outlined": o contorno envolve rótulo + entrada, sem parecer formulário HTML cru */
.form > div:has(> label + input), .form > div:has(> label + select), .form > div:has(> label + textarea), .form .linha > div:has(> label + input), .form .linha > div:has(> label + select), .form .linha > div:has(> label + textarea), .campo { border: 1px solid var(--borda2); border-radius: 13px; padding: 9px 14px 8px; background: var(--bg2); transition: border .16s, box-shadow .16s, background .16s; position: relative; }
.form > div:has(> label + input):hover, .form .linha > div:has(> label + input):hover, .campo:hover { border-color: var(--texto3); }
.form > div:has(> label + input):focus-within, .form > div:has(> label + select):focus-within, .form > div:has(> label + textarea):focus-within, .form .linha > div:has(> label + input):focus-within, .form .linha > div:has(> label + select):focus-within, .form .linha > div:has(> label + textarea):focus-within, .campo:focus-within { border-color: var(--cor); box-shadow: var(--anel); }
.form div:has(> label + input) > label, .form div:has(> label + select) > label, .form div:has(> label + textarea) > label, .campo > label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--texto3); margin-bottom: 1px; font-weight: 700; transition: color .16s; }
.form div:has(> label + input):focus-within > label, .form div:has(> label + select):focus-within > label, .form div:has(> label + textarea):focus-within > label, .campo:focus-within > label { color: var(--cor); }
.form div:has(> label + input) > input, .form div:has(> label + select) > select, .form div:has(> label + textarea) > textarea, .campo > input, .campo > select, .campo > textarea { border: none !important; padding: 3px 0 4px !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; }
.form div:has(> label + input) > .ajuda, .form div:has(> label + select) > .ajuda, .form div:has(> label + textarea) > .ajuda { margin-top: 2px; }
.form div:has(> label + input[type=color]) > input { width: 64px; height: 30px; padding: 0 !important; margin-top: 3px; border-radius: 8px !important; }
.form div:has(> label + input[type=color]) > input::-webkit-color-swatch-wrapper { padding: 0; }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], input[type=tel], input[type=time], input[type=date], input[type=datetime-local], input[type=search], input[type=file], select, textarea { width: 100%; padding: 11px 13px; border: 1px solid var(--borda2); border-radius: var(--raio-sm); font: inherit; font-size: 14px; background: var(--bg2); color: var(--texto); transition: border .16s, box-shadow .16s, background .16s; }
input::placeholder, textarea::placeholder { color: var(--texto3); opacity: .85; }
input[type=file] { padding: 8px 10px; font-size: 13px; cursor: pointer; }
input[type=file]::file-selector-button { border: none; background: var(--bg3); color: var(--texto); padding: 6px 12px; border-radius: 8px; margin-right: 10px; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
input[type=file]::file-selector-button:hover { background: var(--borda); }
input[type=search] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a97a8' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: 12px center; background-size: 16px; padding-left: 36px; }
input[type=color] { width: 64px; height: 36px; padding: 0; border: 1px solid var(--borda2); border-radius: 10px; background: var(--bg2); cursor: pointer; overflow: hidden; }
input[type=color]::-webkit-color-swatch-wrapper { padding: 3px; }
input[type=color]::-webkit-color-swatch { border: none; border-radius: 7px; }
input[type=color]::-moz-color-swatch { border: none; border-radius: 7px; }
input:focus, select:focus, textarea:focus { border-color: var(--cor); box-shadow: var(--anel); outline: none; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a97a8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; padding-right: 32px !important; }
input:disabled, select:disabled { opacity: .6; background: var(--bg3); }
textarea { min-height: 90px; resize: vertical; }
textarea.codigo { font-family: var(--mono); font-size: 12.5px; min-height: 280px; line-height: 1.5; }
.check { display: flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 500; color: var(--texto); cursor: pointer; padding: 9px 12px; border: 1px solid var(--borda); border-radius: 11px; background: var(--bg2); transition: border-color .15s, background .15s; }
.check:hover { border-color: var(--texto3); }
.check:has(input:checked) { border-color: var(--cor); background: var(--cor-clara); }
.check input { width: 18px; height: 18px; accent-color: var(--cor); margin: 0; flex-shrink: 0; }
.chips .check, .segment .check { border: none; background: none; padding: 0; }
.ajuda { font-size: 12px; color: var(--texto2); margin-top: 5px; line-height: 1.45; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13.5px; font-weight: 500; }
.switch input { position: absolute; opacity: 0; }
.switch i { width: 42px; height: 24px; border-radius: 99px; background: var(--borda2); position: relative; transition: background .2s; flex-shrink: 0; }
.switch i::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; background: #fff; top: 3px; left: 3px; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.switch input:checked + i { background: var(--ok); } .switch input:checked + i::after { transform: translateX(18px); }
.segment { display: inline-flex; border: 1px solid var(--borda2); border-radius: 8px; overflow: hidden; }
.segment label { margin: 0; cursor: pointer; }
.segment input { display: none; }
.segment span { display: inline-block; padding: 7px 14px; font-size: 12.5px; font-weight: 600; color: var(--texto2); background: var(--bg2); border-right: 1px solid var(--borda2); transition: background .15s, color .15s; }
.segment label:hover span { background: var(--bg3); }
.segment label:last-child span { border-right: none; }
.segment input:checked + span { background: var(--cor); color: #fff; }

/* ---------- estados vazios / alertas ---------- */
.vazio { text-align: center; padding: 48px 20px; color: var(--texto2); }
.vazio svg { width: 64px; height: 64px; color: var(--borda2); margin-bottom: 10px; }
.vazio b { display: block; color: var(--texto); font-size: 15.5px; margin-bottom: 4px; }
.vazio .btn { margin-top: 14px; }
.alerta { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; border: 1px solid; margin-bottom: 16px; font-size: 13.5px; }
.alerta svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.alerta.erro { background: var(--erro-bg); border-color: #f3c2c2; color: var(--erro); }
.alerta.aviso { background: var(--aviso-bg); border-color: #f0d9a8; color: var(--aviso); }
.alerta.info { background: var(--info-bg); border-color: #c3d4f7; color: var(--info); }
.alerta b { font-weight: 650; }
.passos-inicio { counter-reset: p; display: grid; gap: 10px; }
.passos-inicio div { display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; font-size: 13.5px; color: var(--texto2); }
.passos-inicio div::before { counter-increment: p; content: counter(p); width: 28px; height: 28px; border-radius: 50%; background: var(--cor-clara); color: var(--cor); font-weight: 700; display: grid; place-items: center; font-size: 12.5px; }
.passos-inicio b { color: var(--texto); display: block; }

/* ---------- gráficos (svg puro) ---------- */
.grafico { width: 100%; height: 220px; display: block; }
.grafico .barra-svg { fill: var(--cor); opacity: .9; transition: opacity .15s; } .grafico .barra-svg:hover { opacity: 1; }
.grafico .barra-svg.b2 { fill: var(--cor2); }
.grafico .eixo { stroke: var(--borda); stroke-width: 1; }
.grafico text { fill: var(--texto3); font-size: 10.5px; font-family: var(--fonte); }
.legenda { display: flex; gap: 16px; font-size: 12px; color: var(--texto2); margin-top: 6px; }
.legenda i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.anel-wrap { display: flex; align-items: center; gap: 18px; }
.anel-svg { width: 110px; height: 110px; flex-shrink: 0; }
.anel-svg .fundo { stroke: var(--borda); fill: none; } .anel-svg .valor { stroke: var(--cor); stroke-linecap: round; fill: none; transition: stroke-dashoffset .8s cubic-bezier(.2,.8,.2,1); }
.anel-svg text { fill: var(--texto); font-weight: 700; font-size: 20px; font-family: var(--fonte); }

/* ---------- instâncias ---------- */
.instancias { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.inst { position: relative; padding: 22px 22px 18px; display: flex; flex-direction: column; gap: 14px; overflow: hidden; }
.inst::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 4px; background: var(--borda2); }
.inst.conectado::before { background: linear-gradient(90deg, var(--ok), #7fe0a3); }
.inst.qr::before, .inst.conectando::before { background: linear-gradient(90deg, var(--aviso), #ffd18a); }
.inst.banido::before { background: var(--erro); }
.inst:hover { transform: translateY(-3px); box-shadow: var(--sombra-hover); }
.inst .cab { display: flex; align-items: flex-start; gap: 12px; }
.inst .anel { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--bg3); color: var(--texto3); flex-shrink: 0; border: 1px solid var(--borda); }
.inst .anel svg { width: 22px; height: 22px; }
.inst .anel.conectado { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.inst .anel.qr, .inst .anel.conectando { background: var(--aviso-bg); color: var(--aviso); border-color: transparent; }
.inst .anel.banido { background: var(--erro-bg); color: var(--erro); border-color: transparent; }
.inst .titulo { font-weight: 650; font-size: 15px; }
.inst .numero { color: var(--texto2); font-size: 13px; }
.inst .dono { font-size: 12px; color: var(--texto3); }
.inst .chaves { display: grid; gap: 8px; }
.inst .chaves label { margin-bottom: 3px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--texto3); }
.inst .rodape { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 4px; }

/* ---------- modal ---------- */
.overlay { position: fixed; inset: 0; background: rgba(4, 12, 22, .5); backdrop-filter: blur(6px) saturate(1.1); display: none; align-items: center; justify-content: center; z-index: 50; padding: 20px; }
.overlay.aberto { display: flex; }
.modal { background: var(--bg2); border-radius: 22px; width: 100%; max-width: 580px; max-height: 92vh; overflow-y: auto; box-shadow: var(--sombra-modal); animation: sobe .2s cubic-bezier(.2,.8,.2,1); border: 1px solid var(--borda); }
.modal.larga { max-width: 940px; }
.modal .cab { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px; border-bottom: 1px solid var(--borda); position: sticky; top: 0; background: var(--bg2); z-index: 1; }
.modal .corpo { padding: 22px 24px; }
.modal .pe { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 24px; border-top: 1px solid var(--borda); position: sticky; bottom: 0; background: var(--bg2); }
.fechar { border: none; background: var(--bg3); width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: 15px; color: var(--texto2); }
.fechar:hover { background: var(--borda); }
@keyframes sobe { from { transform: translateY(12px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }

.abas { display: flex; gap: 2px; border-bottom: 1px solid var(--borda); margin-bottom: 18px; overflow-x: auto; }
.abas button, .abas a { border: none; background: none; padding: 11px 16px; font-weight: 600; color: var(--texto2); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; font-size: 13.5px; border-radius: 10px 10px 0 0; transition: color .15s, background .15s; text-decoration: none; }
.abas button:hover, .abas a:hover { color: var(--texto); background: var(--bg3); }
.abas button.ativa { color: var(--cor); border-color: var(--cor); }
[data-theme="escuro"] .abas button.ativa { color: #7cc4ef; border-color: #7cc4ef; }

.qr-box { text-align: center; padding: 10px; }
.qr-box img { width: 260px; height: 260px; border-radius: 14px; border: 1px solid var(--borda); background: #fff; padding: 8px; }
.qr-box .codigo { font-family: var(--mono); font-size: 28px; letter-spacing: .14em; background: var(--bg3); padding: 14px; border-radius: 12px; margin: 12px 0; border: 1px dashed var(--borda2); }
.passos { text-align: left; font-size: 13px; color: var(--texto2); margin: 14px auto 0; max-width: 340px; padding-left: 18px; }
.passos li { margin-bottom: 5px; }

.toast { position: fixed; right: 22px; bottom: 22px; background: #0f1720; color: #fff; padding: 12px 16px; border-radius: 12px; font-weight: 500; z-index: 99; box-shadow: var(--sombra-modal); animation: sobe .2s; max-width: 380px; font-size: 13.5px; }
.toast.erro { background: var(--erro); } .toast.ok { background: var(--ok); }

/* ---------- conversas ---------- */
.conversas { display: grid; grid-template-columns: 300px 1fr; border-radius: 18px; overflow: hidden; min-height: 500px; background: var(--bg2); box-shadow: var(--sombra); }
.conversas .lista { border-right: 1px solid var(--borda); overflow-y: auto; max-height: 600px; }
.conversas .lista > div { padding: 12px 14px; border-bottom: 1px solid var(--borda); cursor: pointer; display: grid; grid-template-columns: 38px 1fr; gap: 10px; align-items: center; }
.conversas .lista > div.vazio { display: block; }
.conversas .lista > div:hover, .conversas .lista > div.ativa { background: var(--bg3); }
.conversas .lista .av { width: 38px; height: 38px; border-radius: 50%; background: var(--cor-clara); color: var(--cor); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.conversas .lista b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conversas .lista small { color: var(--texto2); }
.conversas .msgs { padding: 18px; overflow-y: auto; max-height: 600px; display: flex; flex-direction: column; gap: 6px; background: var(--bg3); }
.balao { max-width: 70%; padding: 9px 13px; border-radius: 14px 14px 14px 4px; background: var(--bg2); border: 1px solid var(--borda); font-size: 13.5px; white-space: pre-wrap; word-break: break-word; }
.balao.enviada { align-self: flex-end; background: var(--cor-clara); border-color: transparent; border-radius: 14px 14px 4px 14px; }
.balao small { display: block; font-size: 10.5px; color: var(--texto3); margin-top: 5px; text-align: right; }

.codigo-bloco { background: var(--codigo-bg); color: var(--codigo-texto); padding: 16px 18px; border-radius: 12px; font-family: var(--mono); font-size: 12.5px; overflow-x: auto; white-space: pre; position: relative; line-height: 1.55; }
.codigo-bloco button { position: absolute; top: 10px; right: 10px; }

/* ---------- login ---------- */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-lado { background: var(--side-bg); color: #fff; padding: 64px; display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden; }
.login-lado::after { content: ""; position: absolute; width: 620px; height: 620px; border-radius: 50%; background: radial-gradient(circle, rgba(255,116,0,.4), transparent 65%); right: -200px; bottom: -220px; filter: blur(10px); }
.login-lado::before { content: ""; position: absolute; width: 420px; height: 420px; border-radius: 50%; background: rgba(255,255,255,.07); left: -160px; top: -160px; }
.login-form .card { border-radius: 22px; box-shadow: var(--sombra-hover); }
.login-lado h1 { font-size: 36px; line-height: 1.15; margin-bottom: 16px; max-width: 520px; }
.login-lado p { opacity: .85; font-size: 16px; max-width: 460px; }
.login-lado ul { margin: 26px 0 0; padding: 0; list-style: none; }
.login-lado li { padding: 7px 0; display: flex; gap: 12px; align-items: center; font-size: 14.5px; }
.login-lado li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--cor2); flex-shrink: 0; }
.login-form { display: flex; align-items: center; justify-content: center; padding: 40px; background: var(--bg); }
.login-form .card { width: 100%; max-width: 420px; padding: 34px; }
.login-form .card h2 { margin-bottom: 4px; font-size: 20px; }
.login-form .card .sub { color: var(--texto2); margin-bottom: 20px; font-size: 13.5px; }
.login-form .logo { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; font-weight: 700; font-size: 18px; color: var(--cor); }
.login-form .logo img { height: 36px; }

/* ---------- planos ---------- */
.plano-card { border: 1.5px solid var(--borda); border-radius: var(--raio); padding: 20px; position: relative; background: var(--bg2); display: flex; flex-direction: column; }
.plano-card.atual { border-color: var(--cor); }
.plano-card .preco { font-size: 28px; font-weight: 700; margin: 10px 0 2px; letter-spacing: -.03em; }
.plano-card .preco small { font-size: 13px; font-weight: 500; color: var(--texto2); letter-spacing: 0; }
.plano-card ul { padding-left: 18px; color: var(--texto2); font-size: 13px; margin: 10px 0; }
.plano-card .acoes { margin-top: auto; }

/* ---------- fluxos ---------- */
.fluxo-nos { display: grid; gap: 8px; }
.fluxo-no { border: 1px solid var(--borda); border-radius: 10px; padding: 10px 12px; font-size: 13px; background: var(--bg3); }
.fluxo-no b { font-family: var(--mono); color: var(--cor); }
.fluxo-no .tipo { float: right; }

/* ---------- equipe / permissões ---------- */
.perm-grid { display: grid; gap: 6px; }
.perm-linha { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--borda); border-radius: 10px; background: var(--bg3); }
.perm-linha b { display: block; font-size: 13.5px; }
.perm-linha small { color: var(--texto2); }
.membro-card { display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: center; }
.membro-card .av { width: 44px; height: 44px; border-radius: 50%; background: var(--cor-clara); color: var(--cor); display: grid; place-items: center; font-weight: 700; }
.membro-card .perms { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips label { margin: 0; cursor: pointer; }
.chips input { display: none; }
.chips span { display: inline-block; padding: 7px 13px; border-radius: 99px; border: 1px solid var(--borda2); font-size: 12.5px; font-weight: 500; color: var(--texto2); background: var(--bg2); transition: all .15s; }
.chips label:hover span { border-color: var(--cor); color: var(--cor); }
.chips input:checked + span { background: var(--cor); color: #fff; border-color: var(--cor); }

/* ---------- timeline auditoria ---------- */
.timeline > div { display: grid; grid-template-columns: 130px 1fr; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--borda); font-size: 13.5px; }
.timeline > div:last-child { border-bottom: none; }
.timeline small { color: var(--texto3); }
.timeline code { font-size: 11.5px; }

/* ---------- responsivo ---------- */
@media (max-width: 1100px) { .grid.c4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: -280px; width: 264px; z-index: 40; transition: left .22s; }
  .sidebar.aberta { left: 0; box-shadow: 0 0 60px rgba(0,0,0,.5); }
  .menu-btn { display: inline-flex; }
  .conteudo { padding: 18px 16px 70px; }
  .grid.c2, .grid.c3, .grid.c4 { grid-template-columns: 1fr 1fr; }
  .form .linha, .form .linha.c3 { grid-template-columns: 1fr; }
  .login-wrap { grid-template-columns: 1fr; } .login-lado { display: none; }
  .conversas { grid-template-columns: 1fr; } .conversas .lista { max-height: 220px; }
  .membro-card { grid-template-columns: 44px 1fr; } .membro-card .acoes { grid-column: 1 / -1; }
}
@media (max-width: 560px) { .grid.c2, .grid.c3, .grid.c4 { grid-template-columns: 1fr; } .topo { flex-direction: column; } }

/* ---------- inbox v2 ---------- */
.inbox { display: grid; grid-template-columns: 320px 1fr 280px; border-radius: 18px; overflow: hidden; background: var(--bg2); box-shadow: var(--sombra); min-height: 640px; height: calc(100vh - 210px); }
.inbox-lista { border-right: 1px solid var(--borda); display: flex; flex-direction: column; min-width: 0; }
.inbox-filtros { padding: 12px; border-bottom: 1px solid var(--borda); display: grid; gap: 8px; }
.inbox-filtros .segment { width: 100%; } .inbox-filtros .segment label { flex: 1; } .inbox-filtros .segment span { display: block; text-align: center; padding: 5px 4px; font-size: 11px; }
.inbox-lista #lista { overflow-y: auto; flex: 1; }
.conv { display: grid; grid-template-columns: 40px 1fr; gap: 10px; padding: 11px 12px; border-bottom: 1px solid var(--borda); cursor: pointer; align-items: start; }
.conv:hover, .conv.ativa { background: var(--bg3); }
.conv.ativa { box-shadow: inset 3px 0 0 var(--cor); }
.conv.aguardando_humano .av { background: var(--aviso-bg); color: var(--aviso); }
.conv .av { width: 40px; height: 40px; border-radius: 50%; background: var(--cor-clara); color: var(--cor); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.conv .txt { min-width: 0; }
.conv b { display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv .badge { background: var(--cor2); color: #fff; font-style: normal; font-size: 10.5px; border-radius: 99px; padding: 1px 7px; font-weight: 700; margin-left: 6px; }
.conv small { display: block; color: var(--texto2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12.5px; }
.conv .meta { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; align-items: center; }
.conv .meta .tag { padding: 1px 7px; font-size: 10px; }
.conv .hora { margin-left: auto; font-size: 10.5px; color: var(--texto3); }
.inbox-chat { display: flex; flex-direction: column; min-width: 0; background: var(--bg3); }
.inbox-cab { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--bg2); border-bottom: 1px solid var(--borda); }
.inbox-cab .av { width: 40px; height: 40px; border-radius: 50%; background: var(--cor-clara); color: var(--cor); display: grid; place-items: center; font-weight: 700; }
.inbox-cab b { display: block; font-size: 14.5px; } .inbox-cab small { color: var(--texto2); }
.inbox-msgs { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.inbox-msgs .midia { max-width: 280px; max-height: 280px; border-radius: 10px; display: block; }
.inbox-msgs .doc { display: inline-block; padding: 8px 10px; border-radius: 8px; background: var(--bg3); border: 1px solid var(--borda); }
.inbox-compositor { background: var(--bg2); border-top: 1px solid var(--borda); padding: 10px 12px; position: relative; }
.comp-linha { display: flex; gap: 8px; align-items: flex-end; }
.comp-linha textarea { flex: 1; min-height: 42px; max-height: 160px; resize: none; border-radius: 12px; padding: 10px 12px; }
.comp-acoes { display: flex; gap: 4px; margin-top: 6px; flex-wrap: wrap; }
.btn.icone.gravando { background: var(--erro); color: #fff; animation: pulso-rec 1s infinite; }
@keyframes pulso-rec { 50% { filter: brightness(1.3); } }
.rr-pop { position: absolute; left: 12px; right: 12px; bottom: calc(100% + 4px); background: var(--bg2); border: 1px solid var(--borda2); border-radius: 12px; box-shadow: var(--sombra-modal); max-height: 260px; overflow-y: auto; z-index: 5; }
.rr-item { padding: 9px 12px; cursor: pointer; border-bottom: 1px solid var(--borda); font-size: 13px; }
.rr-item:hover { background: var(--bg3); } .rr-item small { display: block; color: var(--texto2); } .rr-item b { font-family: var(--mono); color: var(--cor); margin-right: 4px; }
.inbox-lado { border-left: 1px solid var(--borda); overflow-y: auto; padding: 14px; background: var(--bg2); }
.lado-bloco { margin-bottom: 18px; } .lado-bloco h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--texto3); margin-bottom: 8px; }
@media (max-width: 1200px) { .inbox { grid-template-columns: 280px 1fr; } .inbox-lado { display: none; } }
@media (max-width: 900px) { .inbox { grid-template-columns: 1fr; height: auto; } .inbox-lista { max-height: 300px; } }

/* ---------- editor de fluxos ---------- */
.editor-fluxo { display: grid; grid-template-columns: 1fr 560px; gap: 16px; align-items: start; }
.nos-lista { display: grid; gap: 12px; }
.no-card { padding: 14px 16px; }
.no-cab { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.no-cab .no-id { width: 170px !important; font-family: var(--mono); font-weight: 600; padding: 5px 8px !important; }
.no-cab select { width: auto; padding: 5px 30px 5px 8px !important; font-size: 12.5px; }
.opcoes { display: grid; gap: 6px; }
.opcao { display: block; padding: 8px; border: 1px solid var(--borda); border-radius: 10px; margin-bottom: 8px; background: var(--bg2); }
.opcao input, .opcao select { padding: 6px 9px !important; }
.fluxograma text { font-family: var(--fonte); }
.mini-fluxo { background: var(--bg3); border-radius: 10px; padding: 6px; margin-top: 8px; }
@media (max-width: 1100px) { .editor-fluxo { grid-template-columns: 1fr; } #diagrama { position: static !important; } }

/* ---------- editor de fluxos (arrastar e soltar) ---------- */
.barra-fluxo { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.barra-fluxo input[type=text], .barra-fluxo input:not([type]) { padding: 7px 10px; }
.oficina { display: grid; grid-template-columns: 180px 1fr; gap: 12px; height: calc(100vh - 230px); min-height: 480px; }
.paleta { background: var(--card); border: 1px solid var(--borda); border-radius: 14px; padding: 12px; overflow: auto; }
.paleta h4 { margin: 0 0 8px; font-size: 10px; letter-spacing: .12em; color: var(--texto3); text-transform: uppercase; }
.paleta .peca { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border: 1px solid var(--borda2); border-radius: 9px; margin-bottom: 6px; cursor: grab; background: var(--bg2); font-size: 13px; font-weight: 500; transition: transform .1s, box-shadow .1s; user-select: none; }
.paleta .peca:hover { border-color: var(--cor); box-shadow: var(--sombra); transform: translateX(2px); } .paleta .peca:active { cursor: grabbing; }
.paleta .peca .marca { width: 9px; height: 9px; border-radius: 3px; flex: 0 0 auto; }
.paleta .ajudaP { font-size: 11.5px; color: var(--texto3); line-height: 1.5; margin: 14px 0 0; padding-top: 12px; border-top: 1px dashed var(--borda); }
.telaFluxo { position: relative; border: 1px solid var(--borda); border-radius: 14px; background: var(--bg2); overflow: hidden; }
#malha { position: absolute; inset: 0; background-image: radial-gradient(var(--borda2) 1px, transparent 1px); background-size: 22px 22px; cursor: grab; overflow: hidden; }
#malha.arrastando { cursor: grabbing; } #malha.recebendo { background-color: var(--cor-clara); }
#mundo { position: absolute; top: 0; left: 0; transform-origin: 0 0; width: 4000px; height: 3000px; }
#ligacoes { position: absolute; top: 0; left: 0; width: 4000px; height: 3000px; overflow: visible; pointer-events: none; } #ligacoes path { pointer-events: stroke; }
.no-bloco { position: absolute; width: 208px; background: var(--bg2); border: 2px solid var(--borda2); border-radius: 11px; box-shadow: var(--sombra); font-size: 12px; user-select: none; }
.no-bloco:hover { box-shadow: var(--sombra-hover); } .no-bloco.sel { border-color: var(--cor); box-shadow: 0 0 0 3px rgba(0,78,122,.18); } .no-bloco.alvo { border-color: var(--cor2); box-shadow: 0 0 0 3px rgba(255,116,0,.25); }
.no-bloco .cabB { padding: 8px 11px; border-bottom: 1px solid var(--borda); display: flex; gap: 7px; align-items: center; cursor: grab; height: 34px; }
.no-bloco .cabB .marca { width: 8px; height: 8px; border-radius: 3px; display: inline-block; } .no-bloco .cabB b { font-size: 11px; letter-spacing: .02em; }
.no-bloco .cabB .lixo { margin-left: auto; opacity: .35; cursor: pointer; font-size: 13px; } .no-bloco .cabB .lixo:hover { opacity: 1; color: var(--erro); }
.no-bloco .corpo { padding: 8px 11px; color: var(--texto2); min-height: 44px; max-height: 44px; overflow: hidden; line-height: 1.35; }
.no-bloco .corpo .id { display: block; font-family: var(--mono); font-size: 10px; color: var(--cor); }
.no-bloco .saida { display: flex; align-items: center; gap: 7px; padding: 6px 11px; border-top: 1px solid var(--bg3); font-size: 12px; height: 27px; }
.no-bloco .saida .rot { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--texto2); }
.no-bloco .saida .pino { width: 13px; height: 13px; border-radius: 50%; background: var(--borda2); margin-left: auto; cursor: crosshair; flex: 0 0 auto; }
.no-bloco .saida .pino.ligado { background: var(--ok); } .no-bloco .saida .pino:hover { background: var(--cor2); box-shadow: 0 0 0 3px rgba(255,116,0,.3); }
.no-bloco .entrada { position: absolute; left: -8px; top: 15px; width: 13px; height: 13px; border-radius: 50%; background: var(--bg2); border: 2px solid var(--borda2); }
.ferramentas { position: absolute; right: 12px; bottom: 12px; display: flex; gap: 4px; background: var(--bg2); border: 1px solid var(--borda); border-radius: 10px; padding: 4px; box-shadow: var(--sombra); }
.ferramentas button { border: 0; background: transparent; width: 32px; height: 30px; border-radius: 7px; cursor: pointer; font-size: 16px; color: var(--texto2); } .ferramentas button:hover { background: var(--bg3); color: var(--texto); }
.dicaTela { position: absolute; left: 14px; top: 14px; background: var(--bg2); border: 1px solid var(--borda); border-radius: 9px; padding: 6px 10px; font-size: 12px; color: var(--texto2); box-shadow: var(--sombra); }
.editorBloco { position: absolute; right: 12px; top: 12px; width: 300px; max-height: calc(100% - 70px); overflow: auto; background: var(--bg2); border: 1px solid var(--borda); border-radius: 14px; padding: 14px; box-shadow: var(--sombra-modal); }
.editorBloco.oculto { display: none; } .editorBloco .cab { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.editorBloco .opcao { display: block; padding: 7px; margin-bottom: 7px; } .editorBloco .opcao input { padding: 5px 7px !important; }
@media (max-width: 900px) { .oficina { grid-template-columns: 1fr; height: auto; } .telaFluxo { height: 520px; } .editorBloco { width: 240px; } }

/* ---------- agenda ---------- */
.ag-grade { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.ag-col { background: var(--bg3); border-radius: 12px; padding: 10px; min-height: 300px; }
.ag-prof { display: grid; grid-template-columns: 36px 1fr; gap: 10px; align-items: center; background: var(--bg2); border-radius: 10px; padding: 10px; margin-bottom: 10px; }
.ag-prof .av { width: 36px; height: 36px; border-radius: 50%; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 12px; }
.ag-prof b { display: block; font-size: 13.5px; } .ag-prof small { color: var(--texto2); font-size: 11.5px; }
.ag-item { background: var(--bg2); border-radius: 9px; padding: 8px 10px; margin-bottom: 6px; cursor: pointer; font-size: 13px; box-shadow: var(--sombra); }
.ag-item:hover { transform: translateX(2px); } .ag-item small { display: block; color: var(--texto2); font-size: 11.5px; }
.ag-item.aguardando { background: var(--aviso-bg); } .ag-item.faltou, .ag-item.cancelado { opacity: .6; }
.ag-livre { width: 100%; text-align: left; background: transparent; border: 1px dashed var(--borda2); border-radius: 9px; padding: 6px 10px; margin-bottom: 6px; cursor: pointer; font: inherit; font-size: 12.5px; color: var(--texto2); }
.ag-livre span { float: right; color: var(--ok); font-weight: 600; font-size: 11px; } .ag-livre:hover { background: var(--bg2); border-color: var(--cor); color: var(--texto); }

/* menus recolhíveis da barra lateral */
.sidebar .grupo.dobra { display: flex; align-items: center; justify-content: space-between; cursor: pointer; user-select: none; border-radius: 8px; transition: background .15s; }
.sidebar .grupo.dobra:hover { background: rgba(255,255,255,.07); }
.sidebar .grupo.dobra svg { width: 14px; height: 14px; transition: transform .2s; opacity: .7; }
.sidebar .grupo.dobra.aberto svg { transform: rotate(180deg); }
.sidebar .sub-itens { display: grid; gap: 2px; }

/* ---------- polimento v2.8 ---------- */
.card.hero { background-color: var(--cor); }
.card.hero .kpis b { font-variant-numeric: tabular-nums; }
.stat { border-radius: 16px; }
.stat:hover { transform: translateY(-2px); box-shadow: var(--sombra-hover); }
.stat, .card, .btn, .tag, input, select, textarea { -webkit-tap-highlight-color: transparent; }
.topo h1 { color: var(--texto); }
[data-theme="escuro"] .topo h1 { -webkit-text-fill-color: var(--texto); }
.acoes .btn + .btn { margin-left: 0; }
.tabela th:first-child { border-top-left-radius: 12px; } .tabela th:last-child { border-top-right-radius: 12px; }
.tabela-wrap { border: 1px solid var(--borda); }
.form .linha > div, .form > div { min-width: 0; }
.ajuda a { text-decoration: underline; text-underline-offset: 2px; }
.card > .vazio, .card .vazio {  border-radius: 14px; }
.vazio:not(.card .vazio) { padding: 28px 16px; }
.inbox-cab { box-shadow: 0 1px 0 var(--borda); }
.comp-linha textarea { border-radius: 14px; }
.conv.ativa { box-shadow: inset 3px 0 0 var(--cor); }
.balao { box-shadow: 0 1px 2px rgba(16,24,40,.05); }
.balao.enviada { background: var(--cor-clara); }
[data-theme="escuro"] .balao.enviada { background: #16324a; }
.plano-card:hover { transform: translateY(-3px); box-shadow: var(--sombra-hover); transition: .2s; }
.perm-linha { transition: border-color .15s; } .perm-linha:hover { border-color: var(--cor); }
.modal .cab h2 { border: none; padding: 0; }

.sidebar { box-shadow: inset -1px 0 0 rgba(255,255,255,.06); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--borda2); border-radius: 99px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--texto3); }

/* ---------- conversas em tela cheia: só a lista e as mensagens rolam ---------- */
.conteudo.tela-cheia { height: 100vh; display: flex; flex-direction: column; padding-bottom: 18px; overflow: hidden; }
.conteudo.tela-cheia .topo { margin-bottom: 14px; flex-shrink: 0; }
.conteudo.tela-cheia #pg { flex: 1; min-height: 0; display: flex; flex-direction: column; animation: none; }
.conteudo.tela-cheia .inbox { flex: 1; min-height: 0; height: auto; }
.inbox-chat { min-height: 0; }
.inbox-msgs { min-height: 0; }
.inbox-compositor { flex-shrink: 0; }
.inbox-lista #lista { min-height: 0; }
@media (max-width: 900px) {
  .conteudo.tela-cheia { height: auto; overflow: visible; }
  .conteudo.tela-cheia .inbox { height: auto; }
  .inbox-msgs { max-height: 46vh; }
}

/* submenus dentro do menu lateral */
.sidebar a.item.pai .seta { width: 13px; height: 13px; margin-left: auto; opacity: .6; transition: transform .2s; }
.sidebar a.item.pai.aberto .seta { transform: rotate(180deg); }
.sidebar .filhos { display: grid; gap: 1px; margin: 2px 0 6px 0; padding-left: 30px; position: relative; }
.sidebar .filhos::before { content: ""; position: absolute; left: 20px; top: 4px; bottom: 4px; width: 1px; background: rgba(255,255,255,.16); }
.sidebar a.item.filho { padding: 7px 12px; font-size: 12.8px; font-weight: 500; color: rgba(255,255,255,.7); border-radius: 8px; }
.sidebar a.item.filho:hover { color: #fff; background: rgba(255,255,255,.08); }
.sidebar a.item.filho.ativo { color: #fff; background: rgba(255,255,255,.14); font-weight: 600; }
.sidebar a.item.filho.ativo::before { content: ""; position: absolute; left: 17px; width: 7px; height: 7px; border-radius: 50%; background: var(--cor2); margin-top: 6px; }

@media (max-width: 1100px) { .grid.c2[style*='1.3fr'] { grid-template-columns: 1fr !important; } }

/* Navegadores sem :has() — os campos ficam no formato clássico, mas sempre legíveis */
@supports not (selector(:has(*))) {
  .form label { font-size: 12.5px; text-transform: none; letter-spacing: 0; color: var(--texto2); }
  .form input, .form select, .form textarea { border: 1px solid var(--borda2) !important; padding: 11px 13px !important; border-radius: var(--raio-sm) !important; background: var(--bg2) !important; }
}
/* Garantia final: botão primário sempre visível, mesmo se o gradiente falhar */
.btn { background-color: var(--cor); }
.btn:disabled { background-color: var(--texto3); }
.btn.sec, .btn.perigo { background-color: var(--bg2); }
.btn.link { background-color: transparent; }
.btn.acento { background-color: var(--cor2); }


/* lista de grupos no estilo do app de PC */
.lista-grupos { max-height: 230px; overflow-y: auto; border: 1px solid var(--borda); border-radius: 12px; background: var(--bg2); }
.lista-grupos .linha-grupo { display: grid; grid-template-columns: 20px 1fr auto; gap: 12px; align-items: center; padding: 11px 14px; border-bottom: 1px solid var(--borda); cursor: pointer; margin: 0; font-weight: 500; color: var(--texto); }
.lista-grupos .linha-grupo:last-child { border-bottom: none; }
.lista-grupos .linha-grupo:hover { background: var(--bg3); }
.lista-grupos .linha-grupo input { width: 18px; height: 18px; accent-color: var(--cor); margin: 0; }
.lista-grupos .linha-grupo .nome { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; }
.lista-grupos .linha-grupo .qtd { color: var(--texto3); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.lista-grupos p.ajuda { padding: 14px; margin: 0; }
.tabela tr.atrasada td { background: var(--erro-bg); }
.legenda { display: flex; gap: 14px; margin-top: 8px; font-size: 12px; color: var(--texto2); }
.legenda span { display: inline-flex; align-items: center; gap: 6px; }
.legenda i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.sidebar .versao { margin-top: auto; padding: 10px 16px 6px; font-size: 10.5px; color: rgba(255,255,255,.35); font-family: var(--mono); }

/* agenda do cliente dentro da conversa */
.agenda-cliente .ag-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--borda); }
.agenda-cliente .ag-item:last-child { border-bottom: none; }
.agenda-cliente .ag-item b { display: block; font-size: 13px; }
.agenda-cliente .ag-item small { color: var(--texto2); font-size: 12px; }
.agenda-cliente .ag-destaque { background: var(--bg3); border: 1px solid var(--borda); border-radius: 12px; padding: 10px 12px; }
.lado-bloco.dobravel, .agenda-cliente details.dobravel { border-top: 1px solid var(--borda); }
details.dobravel > summary { cursor: pointer; list-style: none; padding: 10px 0 6px; display: flex; align-items: center; justify-content: space-between; font-size: 13px; }
details.dobravel > summary::-webkit-details-marker { display: none; }
details.dobravel > summary::after { content: "▾"; color: var(--texto3); transition: transform .2s; }
details.dobravel[open] > summary::after { transform: rotate(180deg); }
details.dobravel > summary h3 { margin: 0; }

/* agenda do dia na lateral da conversa */
.agenda-dia .prof-dia { border-bottom: 1px solid var(--borda); padding: 6px 0; }
.agenda-dia .prof-dia:last-of-type { border-bottom: none; }
.agenda-dia summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; padding: 6px 0; }
.agenda-dia summary::-webkit-details-marker { display: none; }
.agenda-dia summary b { font-size: 13px; }
.agenda-dia summary small { margin-left: auto; color: var(--texto3); font-size: 11.5px; }
.agenda-dia .pt { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.agenda-dia .ag-agora { background: var(--ok-bg); border: 1px solid var(--ok); border-radius: 10px; padding: 8px 10px; margin: 6px 0; }
.agenda-dia .ag-agora b { display: block; font-size: 12.5px; color: var(--ok); }
.agenda-dia .ag-agora small { color: var(--texto2); font-size: 11.5px; }
.agenda-dia .ag-item { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 5px 0; }
.agenda-dia .ag-item b { font-size: 12.5px; display: block; }
.agenda-dia .ag-item small { color: var(--texto2); font-size: 11.5px; }
.agenda-dia .chips.livres { gap: 4px; margin-top: 6px; }
.agenda-dia .chips.livres span { padding: 4px 9px; font-size: 11.5px; }

/* esconder/mostrar a coluna da direita nas conversas */
.inbox.sem-lado .inbox-lado { display: none; }
.inbox.sem-lado { grid-template-columns: 300px 1fr; }
.alternar-lado { position: fixed; right: 18px; bottom: 18px; z-index: 40; width: 44px; height: 44px; border-radius: 50%; font-size: 18px; box-shadow: var(--sombra-hover); }
.inbox-lado { transition: opacity .2s; }
input.preenchido { animation: piscar 1.2s; }
@keyframes piscar { 0%, 100% { background: var(--bg2); } 30% { background: var(--ok-bg); } }
.agenda-dia .ag-lista.principal { border-bottom: 1px solid var(--borda); padding-bottom: 8px; margin-bottom: 8px; }
.agenda-dia .prof-box > summary { display: flex; justify-content: space-between; align-items: center; cursor: pointer; list-style: none; padding: 6px 0; font-size: 13px; }
.agenda-dia .prof-box > summary::-webkit-details-marker { display: none; }
.agenda-dia .prof-box > summary small { color: var(--texto3); font-size: 11.5px; }
.agenda-dia .esp { display: block; font-style: normal; font-size: 11px; color: var(--texto3); font-weight: 400; }

/* funil de clientes (kanban) */
.kanban { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 10px; align-items: flex-start; }
.k-col { flex: 0 0 268px; background: var(--bg3); border: 1px solid var(--borda); border-radius: 14px; padding: 12px; display: grid; gap: 10px; }
.k-col header { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding-top: 8px; font-size: 13.5px; }
.k-col header span { color: var(--texto3); font-size: 12px; }
.k-lista { display: grid; gap: 9px; min-height: 60px; border-radius: 10px; transition: background .15s; }
.k-lista.recebendo { background: var(--cor-clara); outline: 2px dashed var(--cor); outline-offset: 3px; }
.k-card { background: var(--bg2); border: 1px solid var(--borda); border-radius: 11px; padding: 11px; display: grid; gap: 5px; cursor: grab; transition: box-shadow .15s, transform .15s; }
.k-card:hover { box-shadow: var(--sombra-hover); }
.k-card.arrastando { opacity: .5; transform: rotate(1deg); }
.k-card b { font-size: 13.5px; }
.k-card small { color: var(--texto2); font-size: 11.5px; }
.k-valor { color: var(--ok); font-weight: 700; font-size: 13px; }
.k-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.k-data { color: var(--aviso); }
.k-acoes { display: flex; gap: 5px; margin-top: 4px; }
.k-acoes .btn { flex: 1; padding: 5px 8px; font-size: 11.5px; }

.menu-btn { display: none; }
@media (max-width: 900px) { .menu-btn { display: inline-flex; } .sidebar a.item, .sidebar .grupo { font-size: 14px; } }
.sidebar.aberta ~ .conteudo { pointer-events: none; }

/* bloco recolhível da ficha (Contato): parece um botão discreto, sem caixa vazia */
.lado-bloco.dobravel { padding: 0; border-top: none; }
.lado-bloco.dobravel > summary { padding: 10px 12px; margin: 6px 0; border: 1px solid var(--borda); border-radius: 10px; background: var(--bg3); }
.lado-bloco.dobravel > summary h3 { margin: 0; font-size: 11px; }
.lado-bloco.dobravel[open] > summary { margin-bottom: 10px; }
.lado-bloco.dobravel > form { padding: 0 2px 8px; }
.balao .quem { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 11.5px; color: var(--texto2); margin-bottom: 4px; padding-bottom: 4px; border-bottom: 1px dashed var(--borda); }
.balao .quem b { color: var(--cor); }
.balao .quem .btn { padding: 2px 6px; font-size: 11px; }
.av { overflow: hidden; }
.av img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }
.av.grande { width: 44px; height: 44px; }

/* transferência de conversa */
.lista-transf { border: 1px solid var(--borda); border-radius: 12px; overflow: hidden; max-height: 320px; overflow-y: auto; }
.linha-transf { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--borda); cursor: pointer; }
.linha-transf:last-child { border-bottom: none; }
.linha-transf:hover { background: var(--bg3); }
.linha-transf:has(input:checked) { background: var(--cor-clara); box-shadow: inset 3px 0 0 var(--cor); }
.linha-transf .nome { flex: 1; font-size: 14px; }
.linha-transf .est { font-size: 11.5px; color: var(--texto3); }
.linha-transf .est.ok { color: var(--ok); }
.linha-transf .est.aviso { color: var(--aviso); }
.linha-transf .pt { width: 9px; height: 9px; border-radius: 50%; }
.sep-transf { padding: 8px 12px; background: var(--bg3); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--texto3); font-weight: 700; }
.pt-online { width: 9px; height: 9px; border-radius: 50%; background: var(--borda2); flex-shrink: 0; }
.pt-online.on { background: var(--ok); box-shadow: 0 0 0 3px rgba(21,160,90,.18); }

/* chat interno da equipe */
.chat-equipe-btn { position: fixed; right: 18px; bottom: 74px; z-index: 45; width: 46px; height: 46px; border-radius: 50%; padding: 0; font-size: 19px; box-shadow: var(--sombra-hover); }
.chat-equipe-btn .bolha { position: absolute; top: -4px; right: -4px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--erro); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; font-style: normal; border: 2px solid var(--bg); }
.chat-equipe-btn.tem-novas { animation: pulsar-chat 2s infinite; }
@keyframes pulsar-chat { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
.ce-painel { position: fixed; right: 18px; bottom: 130px; z-index: 46; width: 330px; max-width: calc(100vw - 24px); height: 460px; max-height: calc(100vh - 170px); background: var(--bg2); border: 1px solid var(--borda); border-radius: 16px; box-shadow: var(--sombra-hover); display: flex; flex-direction: column; overflow: hidden; }
.ce-painel header { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--borda); background: var(--bg3); }
.ce-corpo { flex: 1; min-height: 0; position: relative; }
.ce-lista { height: 100%; overflow-y: auto; }
.ce-conversa { position: absolute; inset: 0; background: var(--bg2); display: none; flex-direction: column; }
.ce-painel.em-conversa .ce-conversa { display: flex; }
.ce-item { display: flex; align-items: center; gap: 9px; padding: 10px 14px; border-bottom: 1px solid var(--borda); cursor: pointer; }
.ce-item:hover { background: var(--bg3); }
.ce-item b { display: block; font-size: 13.5px; }
.ce-item small { color: var(--texto3); font-size: 11.5px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ce-cab { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--borda); }
.ce-cab small { color: var(--texto3); font-size: 11.5px; margin-left: auto; }
.ce-msgs { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.ce-balao { background: var(--bg3); border-radius: 12px 12px 12px 4px; padding: 8px 11px; font-size: 13px; max-width: 85%; }
.ce-balao.meu { align-self: flex-end; background: var(--cor-clara); border-radius: 12px 12px 4px 12px; }
.ce-balao small { display: block; color: var(--texto3); font-size: 10.5px; margin-top: 3px; }
.ce-ctx { display: block; font-size: 11px; color: var(--cor); cursor: pointer; margin-bottom: 3px; text-decoration: underline; }
.ce-comp { display: flex; gap: 6px; padding: 10px; border-top: 1px solid var(--borda); }
.ce-comp input { flex: 1; }
@media (max-width: 560px) { .ce-painel { right: 8px; left: 8px; width: auto; bottom: 122px; } }
.barra-uso { height: 7px; border-radius: 4px; background: var(--bg3); overflow: hidden; margin: 6px 0; }
.barra-uso i { display: block; height: 100%; border-radius: 4px; transition: width .4s; }
.tag.entrada { margin-left: 8px; background: var(--cor-clara); color: var(--cor); border-color: transparent; font-size: 10.5px; }

/* linha de opção do menu do fluxo: campos sempre visíveis */
.op-linha1 { display: grid; grid-template-columns: 58px minmax(0, 1fr) minmax(0, 130px) auto auto; gap: 6px; align-items: center; }
.op-linha2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 6px; margin-top: 6px; }
.op-linha1 input, .op-linha1 select, .op-linha2 input { padding: 6px 9px !important; font-size: 12.5px; min-width: 0; }
.op-lig .tag { font-size: 10px; }
.op-rm { padding: 2px 6px; }
/* painel do editor é estreito: empilha os campos para todos ficarem legíveis */
.editorBloco .op-linha1 { grid-template-columns: 56px 1fr auto auto; }
.editorBloco .op-linha1 select[data-k="tipo"] { grid-column: 1 / -1; width: 100%; }
.editorBloco .op-linha2 { grid-template-columns: 1fr; }
.editorBloco .opcao { border: 1px solid var(--borda); border-radius: 10px; padding: 8px; background: var(--bg2); }
@media (max-width: 900px) { .op-linha1 { grid-template-columns: 52px 1fr auto auto; } .op-linha1 select[data-k="tipo"] { grid-column: 1 / -1; } }

/* menu ao soltar uma ligação no vazio */
.menu-ligar { position: fixed; z-index: 90; width: 240px; max-height: 320px; overflow-y: auto; background: var(--bg2); border: 1px solid var(--borda); border-radius: 12px; box-shadow: var(--sombra-hover); padding: 8px; }
.menu-ligar .ml-tit { font-weight: 700; font-size: 13px; padding: 4px 6px 8px; }
.menu-ligar .ml-sec { font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--texto3); padding: 6px 6px 4px; }
.menu-ligar button { display: flex; align-items: center; gap: 7px; width: 100%; text-align: left; background: none; border: none; padding: 6px 8px; border-radius: 8px; cursor: pointer; font: inherit; font-size: 12.5px; color: var(--texto); }
.menu-ligar button:hover { background: var(--bg3); }
.menu-ligar button small { color: var(--texto3); margin-left: auto; font-size: 11px; }
.menu-ligar .pt { width: 9px; height: 9px; border-radius: 3px; flex-shrink: 0; }
.menu-ligar .ml-cancelar { justify-content: center; color: var(--texto3); margin-top: 6px; border-top: 1px solid var(--borda); border-radius: 0; }

/* seletor de grupos do envio em massa */
.sel-grupos { border: 1px solid var(--borda2); border-radius: var(--raio-sm); overflow: hidden; background: var(--bg2); }
.sel-grupos .sg-topo { display: grid; grid-template-columns: 1fr 230px; gap: 8px; padding: 10px; border-bottom: 1px solid var(--borda); }
.sel-grupos .sg-topo input, .sel-grupos .sg-topo select { min-height: 38px; margin: 0; }
.sel-grupos .sg-barra { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 12px; background: var(--bg3); border-bottom: 1px solid var(--borda); font-size: 12px; color: var(--texto2); flex-wrap: wrap; }
.sel-grupos .sg-barra .acoes { gap: 4px; }
.sel-grupos .sg-lista { max-height: 260px; overflow-y: auto; }
.sel-grupos .sg-item { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--borda); cursor: pointer; font-size: 13.5px; margin: 0; }
.sel-grupos .sg-item:last-child { border-bottom: none; }
.sel-grupos .sg-item:hover { background: var(--bg3); }
.sel-grupos .sg-item input { width: 16px; height: 16px; min-height: 0; margin: 0; accent-color: var(--cor); }
.sel-grupos .sg-item:has(input:checked) { background: var(--cor-clara); }
.sel-grupos .sg-nome { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sel-grupos .sg-qtd { font-size: 11px; color: var(--texto3); background: var(--bg3); padding: 2px 8px; border-radius: 99px; font-family: var(--mono); }
@media (max-width: 700px) { .sel-grupos .sg-topo { grid-template-columns: 1fr; } }

/* v6.29 — proteção do número contra divulgação */
.bloco-protecao { border: 1px solid var(--borda); border-left: 3px solid var(--aviso, #d08700); border-radius: 10px; padding: 10px 12px; background: var(--fundo2, rgba(0,0,0,.02)); }
.bloco-protecao.ligado { border-left-color: var(--ok, #16a34a); }
.bloco-protecao .check { margin: 0 0 4px; }
.bloco-protecao .ajuda { margin: 0; }

/* planos: módulos em blocos, com combinações prontas */
.presets { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px; margin: 2px 0 12px; }
.presets .preset { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; text-align: left; padding: 8px 10px; border: 1px solid var(--borda); border-radius: 10px; background: transparent; cursor: pointer; color: inherit; font: inherit; }
.presets .preset:hover { border-color: var(--cor, #2563eb); }
.presets .preset.on { border-color: var(--cor, #2563eb); box-shadow: inset 0 0 0 1px var(--cor, #2563eb); background: color-mix(in srgb, var(--cor, #2563eb) 8%, transparent); }
.presets .preset b { font-size: 13px; }
.presets .preset small { opacity: .7; font-size: 11px; line-height: 1.3; }
.blocos-mod { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.bloco-mod { border: 1px solid var(--borda); border-radius: 10px; padding: 10px 12px; }
.bloco-mod.risco { border-color: var(--aviso, #d08700); background: color-mix(in srgb, var(--aviso, #d08700) 5%, transparent); }
.bloco-cab { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; }
.bloco-cab b { flex: 1; }
.bloco-cab .btn.mini { padding: 1px 6px; font-size: 11px; }
.selo-risco { font-size: 10px; text-transform: uppercase; letter-spacing: .4px; color: var(--aviso, #d08700); border: 1px solid currentColor; border-radius: 6px; padding: 0 4px; font-weight: 700; }
.bloco-ajuda { font-size: 11px; opacity: .7; line-height: 1.35; margin-bottom: 8px; }
label.mod-item { display: flex; gap: 8px; align-items: flex-start; padding: 5px 0; cursor: pointer; }
label.mod-item input { margin-top: 3px; flex: none; }
label.mod-item span { display: flex; flex-direction: column; }
label.mod-item b { font-weight: 600; font-size: 13px; }
label.mod-item small { opacity: .65; font-size: 11px; line-height: 1.3; }
#resumo-mods { margin-top: 10px; }
.meios { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; align-items: start; }
.meio-pg { border: 1px solid var(--borda); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.meio-cab { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.meio-pg .bloco-ajuda { margin-bottom: 6px; }
/* dentro de cada coluna de recebimento o espaço é estreito: os campos empilham */
.meio-pg .linha, .meio-pg .linha.c3 { grid-template-columns: 1fr; }
/* linha de dois campos que ficou com um só (campo de grupo escondido): ocupa a largura toda */
.linha > *:only-child { grid-column: 1 / -1; }

/* planos de revenda: o que cada plano dá ao revendedor */
.plano-card.destaque { border-color: var(--cor2, #ff7400); box-shadow: inset 0 0 0 1px var(--cor2, #ff7400); }
ul.benef { list-style: none; padding: 0; margin: 10px 0; display: flex; flex-direction: column; gap: 7px; }
ul.benef li { display: flex; gap: 8px; align-items: flex-start; }
ul.benef li > b { flex: none; width: 14px; text-align: center; }
ul.benef li span { display: flex; flex-direction: column; }
ul.benef li span b { font-weight: 600; font-size: 13px; }
ul.benef li span small { opacity: .65; font-size: 11px; line-height: 1.3; }
ul.benef li.sim > b { color: var(--ok, #16a34a); }
ul.benef li.nao { opacity: .45; }

/* --- campos de imagem da loja (logo e capa) --- */
.img-campo { margin-bottom: 14px; }
.img-linha { display: flex; gap: 14px; align-items: flex-start; }
.img-prev { flex: 0 0 auto; border: 1px dashed var(--borda); border-radius: 12px; background: var(--bg2);
  display: flex; align-items: center; justify-content: center; overflow: hidden; }
.img-prev span { font-size: 12px; color: var(--texto3); padding: 0 10px; text-align: center; }
.img-prev img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-prev.quadrada { width: 96px; height: 96px; }
.img-prev.larga { width: 190px; height: 68px; }
.img-acoes { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.img-acoes .ajuda { flex-basis: 100%; margin: 2px 0 0; }
@media (max-width: 560px) { .img-linha { flex-direction: column; } }
.img-prev.retrato { width: 86px; height: 110px; }
.galeria-campos { border: 1px solid var(--borda); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; background: var(--bg2); }
.galeria-campos > .ajuda { margin: 0 0 10px; }
.galeria-campos .img-campo { margin-bottom: 0; }
.galeria-campos .img-campo > label { display: none; }
.galeria-campos .img-prev.quadrada { width: 72px; height: 72px; }

/* --- site: banners e fotos do espaço --- */
.bn-linha { border: 1px solid var(--borda); border-radius: 14px; padding: 14px 16px; margin-bottom: 12px; background: var(--bg2); }
.bn-cab { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.gal-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin-top: 10px; }
.gal-item { position: relative; aspect-ratio: 4/3; border-radius: 12px; overflow: hidden; background: var(--bg2); }
.gal-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gal-item button { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; font-size: 12px; }
.gal-mais { aspect-ratio: 4/3; border: 1.5px dashed var(--borda); border-radius: 12px; background: none; color: var(--texto2); cursor: pointer; font-weight: 600; }
.gal-mais:hover { border-color: var(--cor); color: var(--cor); }
.regra-ia { border: 1px solid var(--borda); border-radius: 12px; padding: 12px 14px; margin: 6px 0 14px; background: var(--bg2); }
.regra-ia .ajuda { margin: 6px 0 0; }

/* ===================== v6.40: telas de configuração do lojista ===================== */
[hidden] { display: none !important; }
.card h3 { margin: 0 0 4px; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.sec-ajuda { margin: 0 0 16px; max-width: 760px; }
/* dentro de grade o espaço vem do gap: margem a mais desalinhava o segundo cartão */
.grid > .card + .card, .grid > .card { margin-top: 0; }
@keyframes respira { 50% { opacity: .35; } }
.sub-bloco { border-top: 1px solid var(--borda); margin-top: 18px; padding-top: 16px; }
.sub-bloco .img-campo { margin-bottom: 0; }

/* barra do endereço do site */
.site-barra { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 16px 20px; margin-bottom: 18px; }
.sb-info { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.sb-icone { width: 40px; height: 40px; border-radius: 12px; background: var(--cor-clara); color: var(--cor); display: grid; place-items: center; flex: none; }
.sb-icone svg { width: 20px; height: 20px; }
.sb-info small { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--texto3); font-weight: 700; }
.sb-info a { font-weight: 600; font-size: 14px; color: var(--texto); text-decoration: none; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-info a:hover { color: var(--cor); text-decoration: underline; }
.sb-acoes { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sb-acoes .switch { margin-left: 8px; padding-left: 14px; border-left: 1px solid var(--borda); font-size: 13px; }

/* marca */
.marca-grade { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 22px; align-items: start; }
.cor-campo { border: 1px solid var(--borda2); border-radius: 13px; padding: 9px 14px 12px; background: var(--bg2); }
.cor-campo .rot { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--texto3); font-weight: 700; margin-bottom: 9px; }
.cor-campo .rot .ajuda { text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 11.5px; margin-left: 4px; }
.cores { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cor-amostra { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--card); box-shadow: 0 0 0 1px var(--borda2); cursor: pointer; padding: 0; transition: transform .12s, box-shadow .12s; }
.cor-amostra:hover { transform: scale(1.08); }
.cor-amostra.ativa { box-shadow: 0 0 0 2px var(--texto); }
.cor-outra { display: inline-flex !important; align-items: center; gap: 8px; margin: 0 0 0 6px !important; padding: 3px 10px 3px 3px; border: 1px solid var(--borda2); border-radius: 99px; cursor: pointer; font-family: var(--mono); font-size: 12px; color: var(--texto2); }
.cor-outra input[type=color] { width: 26px; height: 26px; border-radius: 50%; border: none; }
.cor-outra input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
.cor-outra input[type=color]::-webkit-color-swatch { border-radius: 50%; }

/* banners */
.card-cab { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.bn-linha { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; border: 1px solid var(--borda); border-radius: 16px; padding: 16px; margin-bottom: 12px; background: var(--bg2); }
.bn-midia { display: flex; flex-direction: column; gap: 10px; }
.img-prev.bn-prev { width: 100%; height: auto; aspect-ratio: 16 / 9; position: relative; border-style: solid; }
.img-prev.bn-prev span { line-height: 1.5; }
.bn-cel { position: absolute; top: 6%; bottom: 6%; width: 45%; left: calc(55% * var(--foco, 50%) / 100%); border: 2px dashed rgba(255,255,255,.95); border-radius: 10px; box-shadow: 0 0 0 999px rgba(10, 20, 30, .22); pointer-events: none; transition: left .25s ease; }
.img-prev.bn-prev:not(:has(img)) .bn-cel { display: none; }
.bn-midia-acoes { display: flex; gap: 8px; }
.bn-campos { display: grid; gap: 12px; align-content: start; min-width: 0; }
.bn-campos .linha { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.bn-campos .linha > div { border: 1px solid var(--borda2); border-radius: 13px; padding: 8px 13px 6px; background: var(--card); transition: border .16s, box-shadow .16s; }
.bn-campos .linha > div:focus-within { border-color: var(--cor); box-shadow: var(--anel); }
.bn-campos .linha label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--texto3); font-weight: 700; margin-bottom: 1px; }
.bn-campos .linha label .ajuda { text-transform: none; letter-spacing: 0; font-weight: 500; margin-left: 4px; }
.bn-campos .linha input { border: none !important; padding: 3px 0 4px !important; background: transparent !important; box-shadow: none !important; border-radius: 0 !important; }
.bn-cab { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 0; }
.bn-ordem { display: flex; gap: 6px; }
.bn-ordem .btn:disabled { opacity: .35; }
.bn-foco { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.bn-foco .ajuda { margin: 0; }
.bn-mais { width: 100%; border: 1.5px dashed var(--borda2); background: none; border-radius: 14px; padding: 14px; color: var(--texto2); font-weight: 600; font-size: 13.5px; cursor: pointer; transition: border-color .15s, color .15s, background .15s; }
.bn-mais:hover { border-color: var(--cor); color: var(--cor); background: var(--cor-clara); }
.bn-mais b { font-size: 16px; margin-right: 4px; }
.bn-vazio { border: 1px dashed var(--borda); border-radius: 14px; padding: 22px; text-align: center; color: var(--texto2); font-size: 13px; margin-bottom: 12px; }

/* liga/desliga em cartões */
.ligas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.liga { display: flex; align-items: center; gap: 14px; margin: 0; padding: 13px 16px; border: 1px solid var(--borda); border-radius: 14px; background: var(--bg2); cursor: pointer; transition: border-color .15s, background .15s; }
.liga:hover { border-color: var(--texto3); }
.liga input { position: absolute; opacity: 0; pointer-events: none; }
.liga > span { flex: 1; min-width: 0; }
.liga b { display: block; font-size: 13.5px; color: var(--texto); font-weight: 600; }
.liga small { display: block; font-size: 12px; color: var(--texto2); font-weight: 400; line-height: 1.4; margin-top: 2px; }
.liga i { width: 40px; height: 23px; border-radius: 99px; background: var(--borda2); position: relative; flex: none; transition: background .2s; }
.liga i::after { content: ""; position: absolute; width: 17px; height: 17px; border-radius: 50%; background: #fff; top: 3px; left: 3px; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.liga:has(input:checked) { border-color: color-mix(in srgb, var(--cor) 45%, var(--borda)); background: var(--card); }
.liga input:checked ~ i { background: var(--cor); }
.liga input:checked ~ i::after { transform: translateX(17px); }
.liga input:focus-visible ~ i { box-shadow: var(--anel); }

/* escolha única em cartões (rádio) */
.escolhas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.escolha { margin: 0; display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--borda); border-radius: 14px; background: var(--bg2); cursor: pointer; transition: border-color .15s, box-shadow .15s, background .15s; }
.escolha:hover { border-color: var(--texto3); }
.escolha input { width: 18px; height: 18px; accent-color: var(--cor); margin: 1px 0 0; flex: none; }
.escolha b { display: block; font-size: 13.5px; color: var(--texto); }
.escolha small { display: block; font-size: 12px; color: var(--texto2); font-weight: 400; line-height: 1.4; margin-top: 3px; }
.escolha:has(input:checked) { border-color: var(--cor); background: var(--card); box-shadow: var(--anel); }

/* galeria num campo só */
.galeria-campo .gc-cab { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.galeria-campo .gc-cab label { margin: 0; font-size: 15px; font-weight: 700; color: var(--texto); }
.galeria-campo .gc-conta { font-size: 12px; color: var(--texto3); font-weight: 600; }
.galeria-campo > .ajuda { margin: 4px 0 0; }
.gal-item .gal-antes { right: auto; left: 6px; font-size: 16px; line-height: 1; }
.gal-item.enviando { display: grid; place-items: center; border: 1px dashed var(--borda2); }
.gal-item.enviando span { font-size: 12px; color: var(--texto3); animation: respira 1.2s infinite; }
.gal-mais { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 12.5px; }
.gal-mais b { font-size: 22px; font-weight: 500; line-height: 1; }
.janela-sec .gal-grade { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }

/* barra de salvar que acompanha a rolagem */
.barra-salvar { position: sticky; bottom: 14px; z-index: 6; margin-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px 12px 18px; border-radius: 16px; background: var(--card); border: 1px solid var(--borda); box-shadow: var(--sombra-hover); }
.bs-estado { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--texto2); font-weight: 500; }
.bs-estado i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.bs-sujo { display: none; }
.barra-salvar.sujo .bs-sujo { display: inline; color: var(--texto); font-weight: 600; }
.barra-salvar.sujo .bs-limpo { display: none; }
.barra-salvar.sujo .bs-estado i { background: var(--cor2); animation: pulso 1.8s infinite; }

/* blocos dentro das janelas de cadastro */
.janela-sec { border-top: 1px solid var(--borda); padding-top: 16px; margin-top: 2px; display: grid; gap: 14px; }
.janela-sec > h4 { margin: 0; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--texto3); font-weight: 700; }
.janela-sec > h4 + .ajuda { margin-top: -10px; }
.form .linha.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ligas.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* miniaturas nas listas */
.mini-foto { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; background: var(--bg3); flex: none; display: grid; place-items: center; color: var(--texto3); font-size: 11px; font-weight: 700; overflow: hidden; }
.mini-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.com-foto { display: flex; align-items: center; gap: 12px; min-width: 0; }
.com-foto > div { min-width: 0; }
.tabela td.acoes, .tabela .acoes { white-space: nowrap; }
.tabela td.acoes { display: table-cell; text-align: right; }
.tabela td.acoes .btn + .btn { margin-left: 6px; }
.tags-linha { display: flex; gap: 4px; flex-wrap: wrap; }

/* profissionais */
.prof-card { display: flex; flex-direction: column; gap: 14px; }
.prof-topo { display: flex; gap: 14px; align-items: center; }
.prof-foto { width: 64px; height: 64px; border-radius: 50%; flex: none; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 18px; overflow: hidden; }
.prof-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.prof-topo b { font-size: 15px; }
.prof-topo small { display: block; color: var(--texto2); font-size: 12.5px; margin-top: 2px; }
.prof-bio { font-size: 13px; color: var(--texto2); margin: 0; line-height: 1.5; }
.prof-dias { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.prof-dias span { text-align: center; border-radius: 8px; padding: 5px 2px; background: var(--bg3); font-size: 10.5px; color: var(--texto3); line-height: 1.35; }
.prof-dias span b { display: block; font-size: 11px; color: var(--texto2); }
.prof-dias span.on { background: var(--cor-clara); color: var(--cor); }
.prof-dias span.on b { color: var(--cor); }
.prof-card .acoes { border-top: 1px solid var(--borda); padding-top: 12px; margin-top: auto; }
.grid.c2.profs { align-items: stretch; }

@media (max-width: 900px) {
  .marca-grade, .bn-linha { grid-template-columns: 1fr; }
  .escolhas, .ligas.c3 { grid-template-columns: 1fr; }
  .form .linha.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .ligas, .bn-campos .linha { grid-template-columns: 1fr; }
  .site-barra { padding: 14px; }
  .sb-acoes { width: 100%; }
  .sb-acoes .switch { margin-left: auto; }
  .barra-salvar { bottom: 8px; padding: 10px 10px 10px 14px; }
  .bs-estado .bs-limpo { display: none; }
  .prof-dias span { font-size: 9.5px; }
}
/* dica dentro do rótulo dos campos: em caixa normal, não gritando junto com o rótulo */
.form div > label .ajuda, .campo > label .ajuda { text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 11.5px; margin: 0 0 0 4px; color: var(--texto3); display: inline; }
.janela-sec > div:has(> label + input), .janela-sec > div:has(> label + select), .janela-sec > div:has(> label + textarea), .janela-sec .linha > div:has(> label + input), .janela-sec .linha > div:has(> label + select) { border: 1px solid var(--borda2); border-radius: 13px; padding: 9px 14px 8px; background: var(--bg2); transition: border .16s, box-shadow .16s; }
.janela-sec > div:has(> label + input):focus-within, .janela-sec > div:has(> label + select):focus-within, .janela-sec > div:has(> label + textarea):focus-within, .janela-sec .linha > div:focus-within { border-color: var(--cor); box-shadow: var(--anel); }
.janela-sec .linha { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.janela-sec .linha.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.escolhas.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fotos-item { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 20px; align-items: start; }
.fotos-item .img-campo { margin: 0; }
.fotos-item .img-campo > label, .fotos-item .gc-cab label { font-size: 12.5px; font-weight: 600; color: var(--texto2); }
@media (max-width: 700px) { .fotos-item, .escolhas.c2, .janela-sec .linha, .janela-sec .linha.c3 { grid-template-columns: 1fr; } }
/* celular: grades com colunas fixas viram uma coluna; chaves longas não empurram a tela */
.grid > * { min-width: 0; }
.chave { max-width: 100%; }
@media (max-width: 900px) { .grid.c2[style*="grid-template-columns"] { grid-template-columns: 1fr !important; } }
@media (max-width: 640px) {
  .tabela .com-foto { min-width: 190px; }
  .tabela .com-foto .ajuda { display: none; }
  .tabela td.acoes .btn { padding: 6px 9px; }
}

/* topo da conversa: com pouco espaço os botões descem para a linha de baixo em vez de cobrir o nome */
.inbox-cab { flex-wrap: wrap; row-gap: 8px; }
.inbox-cab > div:nth-child(2) { min-width: 180px; }
.inbox-cab > .acoes { margin-left: auto; justify-content: flex-end; }

/* faixa do Pix em aberto no topo da conversa */
.faixa-pix { flex-basis: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 8px 12px; border-radius: 10px; font-size: 13px; background: var(--cor-clara, #eef4fb); color: var(--texto); border: 1px solid var(--borda); }
.faixa-pix.com-comprovante { background: #fff7e6; border-color: #f3c97a; }
:root[data-theme="dark"] .faixa-pix.com-comprovante { background: rgba(243, 201, 122, .12); }
.faixa-pix b { display: inline; font-size: inherit; }
#bloco-teste { margin-bottom: 4px; }

/* v6.49 · Créditos de IA */
.faixa-cred { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-radius: 12px; margin-bottom: 14px; font-size: 13.5px; border: 1px solid; }
.faixa-cred.aviso { background: var(--aviso-bg); color: var(--aviso); border-color: #f0d9a8; }
.faixa-cred.erro { background: var(--erro-bg); color: var(--erro); border-color: #f3c2c2; }
.faixa-cred .btn { margin-left: auto; }
.cred-pacote { display: flex; flex-direction: column; gap: 4px; }
.cred-pacote .rotulo { font-size: 12px; color: var(--texto2); }
.cred-pacote .cred-qtd { font-size: 28px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.cred-pacote .cred-qtd small { font-size: 13px; color: var(--texto2); font-weight: 500; }
.cred-pacote .cred-preco { font-size: 20px; font-weight: 700; color: var(--cor); }
.cred-pacote .btn { margin-top: 8px; align-self: flex-start; }
.cred-pix { display: grid; grid-template-columns: 200px 1fr; gap: 18px; align-items: start; }
.cred-pix img { width: 200px; max-width: 100%; border-radius: 12px; background: #fff; padding: 6px; border: 1px solid var(--borda); }
.cred-copia { width: 100%; min-height: 70px; font-family: ui-monospace, monospace; font-size: 12px; word-break: break-all; }
@media (max-width: 640px) { .cred-pix { grid-template-columns: 1fr; } .cred-pix img { justify-self: center; } }
.cred-meses { display: flex; align-items: flex-end; gap: 10px; height: 130px; padding-top: 6px; }
.cred-meses > div { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; min-width: 0; }
.cred-meses i { display: block; width: 100%; max-width: 42px; background: var(--cor); border-radius: 6px 6px 2px 2px; opacity: .85; }
.cred-meses small { font-size: 11px; color: var(--texto2); }
.cred-meses b { font-size: 11px; font-variant-numeric: tabular-nums; }
.giro-mini { display: inline-block; width: 12px; height: 12px; border: 2px solid var(--borda); border-top-color: var(--cor); border-radius: 50%; animation: girar .8s linear infinite; vertical-align: -2px; margin-right: 4px; }
@keyframes girar { to { transform: rotate(360deg); } }
.cred-tab .num { text-align: right; white-space: nowrap; }
.cred-tab .ajuda { white-space: nowrap; }
.cred-tab td.acoes { white-space: nowrap; }
.cred-tab a.cred-nome { color: inherit; text-decoration: none; } .cred-tab a.cred-nome:hover b { text-decoration: underline; }

/* v6.50 · Primeiros passos */
.guia-topo { padding: 18px 20px; }
.guia-pct { font-size: 14px; color: var(--texto2); } .guia-pct b { font-size: 22px; color: var(--texto); margin-right: 4px; }
.guia-barra { height: 10px; background: var(--bg3); border-radius: 99px; overflow: hidden; margin-top: 8px; border: 1px solid var(--borda); }
.guia-barra i { display: block; height: 100%; background: var(--ok); border-radius: 99px; transition: width .6s cubic-bezier(.2,.8,.2,1); }
.guia-escolhas { margin-top: 16px; }
.guia-escolhas-cab { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.guia-opcoes { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; margin-top: 14px; }
.guia-opcao { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1.5px solid var(--borda); border-radius: 14px; cursor: pointer; background: var(--bg2, #fff); transition: border-color .15s, background .15s; min-height: 64px; }
.guia-opcao input { position: absolute; opacity: 0; pointer-events: none; }
.guia-opcao .marca { width: 24px; height: 24px; flex: none; border-radius: 7px; border: 2px solid var(--borda); display: flex; align-items: center; justify-content: center; color: transparent; }
.guia-opcao .marca svg { width: 15px; height: 15px; }
.guia-opcao b { display: block; font-size: 14.5px; } .guia-opcao small { display: block; color: var(--texto2); font-size: 12.5px; margin-top: 2px; line-height: 1.4; }
.guia-opcao:has(input:checked) { border-color: var(--cor); background: color-mix(in srgb, var(--cor) 7%, transparent); }
.guia-opcao:has(input:checked) .marca { background: var(--cor); border-color: var(--cor); color: #fff; }
.guia-opcao:has(input:focus-visible) { outline: 2px solid var(--cor); outline-offset: 2px; }
.guia-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip-ok { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; background: var(--ok-bg); color: var(--ok); font-size: 13px; font-weight: 600; }
.chip-ok svg { width: 14px; height: 14px; }
.guia-lista { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.guia-passo { display: flex; gap: 14px; padding: 16px 18px; border: 1px solid var(--borda); border-radius: 16px; background: var(--card, #fff); }
.guia-passo.atual { border: 2px solid var(--cor); box-shadow: var(--sombra-hover); }
.guia-passo.feito { opacity: .8; }
.guia-num { width: 34px; height: 34px; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; background: var(--bg3); color: var(--texto2); }
.guia-passo.atual .guia-num { background: var(--cor); color: #fff; }
.guia-passo.feito .guia-num { background: var(--ok); color: #fff; } .guia-num svg { width: 18px; height: 18px; }
.guia-corpo { flex: 1; min-width: 0; }
.guia-tit { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 15.5px; }
.guia-corpo > .ajuda { margin: 4px 0 8px; }
.guia-falta { margin: 0 0 10px; color: var(--aviso); font-size: 13px; font-weight: 600; }
.guia-form { margin-top: 6px; }
.guia-dica { background: var(--info-bg); color: var(--info); border-radius: 12px; padding: 12px 14px; font-size: 13.5px; }
.btn svg { width: 16px; height: 16px; vertical-align: -3px; }
a.guia-mini { display: grid; grid-template-columns: 1fr 160px auto; gap: 16px; align-items: center; text-decoration: none; color: inherit; margin-bottom: 16px; border: 1.5px solid var(--cor); }
a.guia-mini span { display: block; font-size: 13px; color: var(--texto2); margin-top: 2px; }
a.guia-mini .guia-barra { margin: 0; }
@media (max-width: 640px) { a.guia-mini { grid-template-columns: 1fr; } .guia-passo { padding: 14px; gap: 12px; } }

/* v6.50 · Ajuda */
.ajuda-pergunta { border: 1.5px solid var(--cor); }
.ajuda-form { display: flex; gap: 8px; } .ajuda-form input { flex: 1; min-height: 48px; font-size: 15px; }
.ajuda-sugestoes, .ajuda-cats, .ajuda-rel { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip { border: 1px solid var(--borda); background: var(--bg2, #fff); color: var(--texto); border-radius: 99px; padding: 7px 12px; font-size: 13px; cursor: pointer; font-family: inherit; min-height: 34px; }
.chip:hover { border-color: var(--cor); } .chip.on { background: var(--cor); color: #fff; border-color: var(--cor); }
.ajuda-resposta { margin-top: 14px; background: var(--bg3); border-radius: 14px; padding: 14px 16px; font-size: 14.5px; line-height: 1.6; }
.ajuda-rel small { width: 100%; color: var(--texto2); }
.ajuda-filtros { margin: 18px 0 8px; } .ajuda-filtros input { width: 100%; }
.ajuda-grupo { margin-top: 16px; } .ajuda-grupo h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--texto2); margin: 0 0 8px; }
.ajuda-item { border: 1px solid var(--borda); border-radius: 12px; background: var(--card, #fff); margin-bottom: 8px; }
.ajuda-item summary { padding: 14px 16px; cursor: pointer; font-weight: 600; font-size: 14.5px; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.ajuda-item summary::-webkit-details-marker { display: none; }
.ajuda-item summary::after { content: '+'; color: var(--texto2); font-weight: 400; font-size: 20px; line-height: 1; }
.ajuda-item[open] summary::after { content: '−'; }
.ajuda-item.apagado { opacity: .6; }
.ajuda-resp { padding: 0 16px 16px; font-size: 14px; line-height: 1.65; color: var(--texto2); }
.ajuda-suporte { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 18px; }

/* v6.50 · Números conectados em lista (aguenta 100+) */
.inst-barra { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.inst-filtros { display: flex; flex-wrap: wrap; gap: 6px; }
.inst-filtros .chip b { margin-left: 4px; font-variant-numeric: tabular-nums; }
.inst-filtros .chip.f-conectado:not(.on) b { color: var(--ok); } .inst-filtros .chip.f-desconectado:not(.on) b, .inst-filtros .chip.f-banido:not(.on) b { color: var(--erro); } .inst-filtros .chip.f-qr:not(.on) b { color: var(--aviso); }
.inst-ferr { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inst-ferr input { flex: 1; min-width: 220px; min-height: 42px; }
.inst-ferr select { min-height: 42px; max-width: 260px; }
.seg { display: inline-flex; border: 1px solid var(--borda); border-radius: 10px; overflow: hidden; }
.seg button { border: 0; background: var(--bg2, #fff); padding: 0 14px; min-height: 40px; font: inherit; font-size: 13px; cursor: pointer; color: var(--texto2); }
.seg button.on { background: var(--cor); color: #fff; }
.inst-tab-card { padding: 0; overflow: hidden; }
.inst-tab { margin: 0; }
.inst-tab td { vertical-align: middle; }
.inst-tab small { display: block; color: var(--texto2); font-size: 12px; }
.inst-nome { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.inst-dono { font-weight: 600; }
.inst-tags { display: flex; gap: 4px; flex-wrap: wrap; max-width: 280px; }
.inst-acoes { white-space: nowrap; text-align: right; }
.inst-acoes .icone-bt { min-width: 34px; font-weight: 800; }
.ponto-st { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--texto3, #9aa6b2); }
.ponto-st.conectado { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-bg); }
.ponto-st.qr { background: var(--aviso); } .ponto-st.banido { background: var(--erro); }
.paginacao { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 14px; font-size: 13px; color: var(--texto2); }
@media (max-width: 760px) {
  .inst-tab thead { display: none; }
  .inst-tab, .inst-tab tbody, .inst-tab tr, .inst-tab td { display: block; width: 100%; }
  .inst-tab tr { padding: 12px 14px; border-bottom: 1px solid var(--borda); }
  .inst-tab td { padding: 3px 0; border: 0; background: transparent !important; }
  .inst-tab tr:nth-child(even) { background: transparent; }
  .inst-tab td[data-r="Última conexão"]::before { content: 'Última conexão: '; }
  .inst-acoes { text-align: left; padding-top: 8px !important; }
  .inst-ferr input { min-width: 0; flex-basis: 100%; }
}

/* v6.50 · saldo em dólar da Anthropic */
.saldo-ia { display: grid; grid-template-columns: 1.1fr 1.6fr; gap: 18px 24px; align-items: center; border-left: 5px solid var(--ok); }
.saldo-ia.aviso { border-left-color: var(--aviso); } .saldo-ia.erro { border-left-color: var(--erro); background: color-mix(in srgb, var(--erro-bg) 45%, var(--card, #fff)); }
.saldo-ia.vazio-saldo { border-left-color: var(--borda); grid-template-columns: 1fr auto; }
.saldo-ia .rotulo { font-size: 12px; color: var(--texto2); font-weight: 500; }
.saldo-ia .valor { font-size: 34px; font-weight: 750; letter-spacing: -.03em; font-variant-numeric: tabular-nums; margin-top: 4px; }
.saldo-ia .valor small { font-size: 15px; color: var(--texto2); font-weight: 500; margin-left: 8px; letter-spacing: 0; }
.saldo-detalhe { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.saldo-detalhe > div { background: var(--bg3); border-radius: 12px; padding: 10px 12px; }
.saldo-detalhe small { display: block; font-size: 11.5px; color: var(--texto2); }
.saldo-detalhe b { font-size: 16px; font-variant-numeric: tabular-nums; }
.saldo-rodape { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.saldo-rodape .acoes { margin-left: auto; }
@media (max-width: 900px) { .saldo-ia { grid-template-columns: 1fr; } .saldo-detalhe { grid-template-columns: repeat(2, minmax(0, 1fr)); } .saldo-ia.vazio-saldo { grid-template-columns: 1fr; } }

/* v6.52 · menu por espaço, abas da página, Início pelo foco */
.espacos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; background: rgba(0,0,0,.2); border-radius: 12px; padding: 4px; margin: 4px 12px 10px; }
.espacos button { border: 0; background: transparent; color: rgba(255,255,255,.78); font: inherit; font-size: 12.5px; font-weight: 700; min-height: 36px; border-radius: 9px; cursor: pointer; }
.espacos button.on { background: #ff7400; color: #fff; box-shadow: 0 2px 8px rgba(255,116,0,.35); }
.menu-espaco { flex: 1; min-height: 12px; }
.abas-pagina { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--borda); margin: -6px 0 18px; }
.abas-pagina a { padding: 10px 14px; font-size: 14px; font-weight: 600; color: var(--texto2); text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.abas-pagina a:hover { color: var(--texto); }
.abas-pagina a.ativa { color: var(--cor); border-bottom-color: #ff7400; }
.ini-link { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--card, #fff); border: 1px solid var(--borda); border-radius: 14px; padding: 10px 14px; margin-bottom: 14px; font-size: 14px; }
.ini-link span { color: var(--texto2); font-size: 12.5px; } .ini-link b { color: var(--cor); margin-right: auto; }
.ini-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 14px; }
.ini-kpi { padding: 16px 18px; border-top: 4px solid var(--borda); display: flex; flex-direction: column; gap: 2px; }
.ini-kpi span { font-size: 12.5px; color: var(--texto2); font-weight: 600; }
.ini-kpi b { font-size: 28px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ini-kpi small { font-size: 12.5px; color: var(--texto2); }
.ini-kpi.ok { border-top-color: var(--ok); } .ini-kpi.ok b { color: var(--ok); }
.ini-kpi.aviso { border-top-color: #ff7400; } .ini-kpi.aviso b { color: #c25700; }
.ini-kpi.erro { border-top-color: var(--erro); } .ini-kpi.erro b { color: var(--erro); }
.ini-kpi.cor { border-top-color: var(--cor); } .ini-kpi.cor b { color: var(--cor); }
.ini-duas { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 14px; align-items: start; }
.ini-lado { display: flex; flex-direction: column; gap: 14px; }
.ini-cab { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.ini-cab h2 { margin: 0; border: 0; padding: 0; }
.ini-agenda { display: flex; flex-direction: column; gap: 8px; }
.ini-hor { display: grid; grid-template-columns: 62px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--c) 7%, var(--card, #fff)); border-left: 5px solid var(--c); }
.ini-hor .h { font-weight: 800; font-size: 16px; font-variant-numeric: tabular-nums; } .ini-hor .h small { display: block; font-size: 11px; font-weight: 500; color: var(--texto2); }
.ini-hor .q b { display: block; font-size: 14.5px; } .ini-hor .q small { color: var(--texto2); font-size: 12.5px; }
.ini-hor.atendido, .ini-hor.faltou { opacity: .65; }
.ini-hor .ac { display: flex; gap: 4px; }
.ini-atalhos { display: flex; flex-direction: column; gap: 8px; }
.ini-atalhos .btn { justify-content: center; text-align: center; }
.ini-lista { display: flex; flex-direction: column; gap: 6px; }
.ini-linha { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--bg3); text-decoration: none; color: inherit; }
.ini-linha small { display: block; color: var(--texto2); font-size: 12.5px; }
.ini-linha.atrasada, .ini-linha.pagar.atrasada { background: color-mix(in srgb, var(--erro-bg) 70%, var(--card, #fff)); }
.ini-linha.pagar.hoje { background: color-mix(in srgb, #ff7400 9%, var(--card, #fff)); }
.ini-linha.pagar.paga { opacity: .7; }
.ini-linha.conversa { grid-template-columns: 40px minmax(0, 1fr) auto; }
.ini-linha .av { width: 40px; height: 40px; border-radius: 50%; background: color-mix(in srgb, var(--cor) 14%, #fff); color: var(--cor); display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.ini-extras { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 14px; }
.ini-cartao { display: flex; flex-direction: column; gap: 3px; text-decoration: none; color: inherit; border-left: 4px solid var(--cor); }
.ini-cartao.aviso { border-left-color: #ff7400; } .ini-cartao.erro { border-left-color: var(--erro); }
.ini-cartao .rot { font-size: 12px; color: var(--texto2); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.ini-cartao b { font-size: 20px; } .ini-cartao small { color: var(--texto2); font-size: 12.5px; }
.ini-cartao .ir { margin-top: 6px; font-size: 13px; font-weight: 700; color: var(--cor); }
.pg-mes { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; } .pg-mes b { font-size: 17px; }
.rec-card { margin-bottom: 16px; }
.rec-grade { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(260px, 1fr); gap: 18px; }
.rec-opcoes { display: flex; flex-direction: column; gap: 8px; }
.rec-op { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1.5px solid var(--borda); border-radius: 14px; cursor: pointer; position: relative; }
.rec-op input { position: absolute; opacity: 0; }
.rec-op .bola { width: 20px; height: 20px; flex: none; border-radius: 50%; border: 2px solid var(--borda); margin-top: 1px; display: grid; place-items: center; }
.rec-op b { display: block; font-size: 14.5px; } .rec-op small { display: block; font-size: 12.5px; color: var(--texto2); margin-top: 2px; line-height: 1.45; }
.rec-op:has(input:checked) { border-color: var(--cor); background: color-mix(in srgb, var(--cor) 6%, transparent); }
.rec-op:has(input:checked) .bola { border-color: var(--cor); box-shadow: inset 0 0 0 4px #fff; background: var(--cor); }
.rec-op:has(input:focus-visible) { outline: 2px solid var(--cor); outline-offset: 2px; }
.rec-op.off { opacity: .55; cursor: not-allowed; } .rec-op em { color: var(--erro); font-style: normal; font-weight: 600; }
.rec-lado { display: flex; flex-direction: column; gap: 12px; }
.rec-fluxo { background: var(--bg3); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; align-items: stretch; }
.rec-tit { font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--texto2); margin-bottom: 8px; }
.rec-passo { border-radius: 10px; padding: 9px 12px; font-size: 13.5px; font-weight: 700; text-align: center; background: var(--card, #fff); border: 1px solid var(--borda); }
.rec-passo.ia { background: var(--cor); color: #fff; border-color: transparent; }
.rec-passo.fl { background: #fff1e0; color: #8a4b00; border-color: #ffd5a8; }
.rec-passo.sd { background: #fff1e0; color: #8a4b00; border-color: #ffd5a8; }
.rec-passo.eq { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.rec-seta { text-align: center; color: var(--texto2); font-weight: 700; line-height: 1.4; }
.rec-previa { background: #e7f8ee; border-radius: 12px; padding: 10px 12px; font-size: 13.5px; line-height: 1.5; }
.rec-previa small { display: block; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--texto2); margin-bottom: 4px; }
.link-card .rot { font-size: 12.5px; color: var(--texto2); font-weight: 600; }
.link-grande { font-size: 26px; font-weight: 800; color: var(--cor); margin: 4px 0 12px; word-break: break-all; }
.link-editor { display: flex; align-items: center; border: 1px solid var(--borda); border-radius: 12px; overflow: hidden; }
.link-editor span { padding: 0 12px; background: var(--bg3); color: var(--texto2); font-size: 14px; align-self: stretch; display: flex; align-items: center; white-space: nowrap; }
.link-editor input { border: 0 !important; flex: 1; min-width: 0; min-height: 46px; font-size: 16px; font-weight: 700; }
.passos-dom { font-size: 13.5px; line-height: 1.7; color: var(--texto2); padding-left: 20px; }
.mod-pacotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; }
.mod-pac { text-align: left; border: 1px solid var(--borda); background: var(--card, #fff); border-radius: 12px; padding: 10px 12px; cursor: pointer; font: inherit; }
.mod-pac:hover { border-color: var(--cor); } .mod-pac b { display: block; font-size: 13.5px; } .mod-pac small { color: var(--texto2); font-size: 12px; }
.mod-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.mod-previa { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; background: var(--bg3); border-radius: 12px; padding: 10px 12px; }
.mod-previa small { width: 100%; font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--texto2); }
.mod-previa span { background: var(--card, #fff); border: 1px solid var(--borda); border-radius: 99px; padding: 4px 10px; font-size: 13px; font-weight: 600; }
@media (max-width: 900px) { .ini-duas, .rec-grade { grid-template-columns: 1fr; } .ini-hor { grid-template-columns: 56px minmax(0, 1fr); } .ini-hor .tag, .ini-hor .ac { grid-column: 2; justify-self: start; } .ini-linha { grid-template-columns: minmax(0, 1fr) auto; } .ini-linha > .tag, .ini-linha > .acoes, .ini-linha > button { grid-column: 1 / -1; justify-self: start; } }
a.guia-mini .btn { color: #fff; }
@media (max-width: 640px) { .ini-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .ini-kpi { padding: 12px 14px; } .ini-kpi b { font-size: 22px; } .ini-link b { flex-basis: 100%; } }

/* v6.53: catálogos e arquivos */
.mat-como .mat-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 8px; }
.mat-como .mat-chips span { background: var(--bg2); border: 1px solid var(--borda2); border-radius: 99px; padding: 6px 12px; font-size: 13px; }
.mat-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 520px), 1fr)); gap: 14px; }
.mat-card { display: flex; gap: 16px; align-items: flex-start; }
.mat-capa { width: 120px; flex: none; position: relative; }
.mat-capa img { width: 120px; height: 160px; object-fit: cover; border-radius: 10px; border: 1px solid var(--borda2); background: #fff; display: block; }
.mat-pdf { width: 120px; height: 160px; border-radius: 10px; display: grid; place-items: center; background: #fff0e3; color: #c25700; font-weight: 800; font-size: 20px; }
.mat-n { position: absolute; bottom: 6px; right: 6px; background: rgba(0,0,0,.65); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 99px; }
.mat-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.mat-tit { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mat-tit b { font-size: 16px; }
.mat-link { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mat-link code { background: var(--bg2); padding: 4px 8px; border-radius: 6px; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.mat-num { display: flex; gap: 14px; font-size: 13px; color: var(--texto2); }
.mat-num b { color: var(--texto); }
.mat-outras { border-top: 1px dashed var(--borda2); padding-top: 6px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.mat-outras > div { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mat-acoes { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.mat-slug { display: flex; align-items: center; border: 1px solid var(--borda2); border-radius: 8px; overflow: hidden; background: var(--bg2); }
.mat-slug span { padding: 0 8px; font-size: 12.5px; color: var(--texto2); white-space: nowrap; max-width: 55%; overflow: hidden; text-overflow: ellipsis; }
.mat-slug input { border: 0; border-radius: 0; min-width: 0; }
.mat-up { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mat-rapidos { display: flex; gap: 6px; flex-wrap: wrap; margin-top: -4px; }
.mat-thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; align-items: center; }
.mat-thumbs img { width: 64px; height: 86px; object-fit: cover; border-radius: 6px; border: 1px solid var(--borda2); background: #fff; }
.mat-thumbs.edit > div { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.mat-thumbs.edit small { position: absolute; top: 3px; left: 3px; background: rgba(0,0,0,.6); color: #fff; font-size: 10.5px; border-radius: 4px; padding: 0 5px; }
.mat-thumbs.edit span { display: flex; gap: 2px; }
.mat-thumbs.edit button { width: 24px; height: 24px; border: 1px solid var(--borda2); background: var(--bg); border-radius: 6px; cursor: pointer; font-size: 12px; padding: 0; }
.mat-thumbs.edit button:disabled { opacity: .35; cursor: default; }
.mat-escolha { display: flex; flex-direction: column; gap: 8px; }
.mat-op { display: flex; align-items: center; gap: 12px; padding: 8px; border: 1px solid var(--borda2); border-radius: 10px; background: var(--bg); cursor: pointer; text-align: left; font: inherit; color: inherit; }
.mat-op:hover { border-color: var(--cor); }
.mat-op img, .mat-op .mat-pdf { width: 44px; height: 58px; object-fit: cover; border-radius: 6px; font-size: 12px; }
.mat-op > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; }
@media (max-width: 640px) { .mat-capa, .mat-capa img, .mat-pdf { width: 84px; } .mat-capa img, .mat-capa .mat-pdf { height: 112px; } }

/* v6.54: ensinar a IA e recado do dia */
.ens-recado { display: flex; gap: 14px; align-items: flex-start; justify-content: space-between; background: #fff4e5; border-color: #ffd6a8; }
.ens-recado p { margin: 4px 0; color: #6b3a00; }
.ens-grade { align-items: start; }
.ens-q { border-top: 1px solid var(--borda2); padding: 12px 0; }
.ens-q:first-of-type { border-top: 0; }
.ens-q textarea { width: 100%; margin-top: 8px; min-height: 64px; }
.ens-acoes { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.ens-acoes > span { display: flex; gap: 6px; }
.ens-s { border-top: 1px solid var(--borda2); padding: 10px 0; }
.ens-s:first-of-type { border-top: 0; }
.ens-s p { margin: 4px 0 8px; color: var(--texto2); white-space: pre-wrap; }
.ens-s div { display: flex; gap: 6px; }
.ens-hist { display: flex; flex-direction: column; gap: 6px; font-size: 13px; max-height: 180px; overflow: auto; }
