/* ============ BRAXZIN PLUS — identidade visual ============
   Base grafite neutra, azul como cor da marca, ciano nos detalhes
   e laranja (cor secundária) só nas ações mais importantes. */
@font-face { font-family: 'Bricolage'; src: url('/fonts/bricolage-grotesque/bricolage-grotesque-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Bricolage'; src: url('/fonts/bricolage-grotesque/bricolage-grotesque-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Figtree'; src: url('/fonts/figtree/figtree-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Figtree'; src: url('/fonts/figtree/figtree-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Figtree'; src: url('/fonts/figtree/figtree-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Figtree'; src: url('/fonts/figtree/figtree-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
  /* superfícies (do mais fundo ao mais alto) */
  --bg: #0c0e12;
  --side: #090a0d;
  --field: #0f1217;
  --panel: #14171d;
  --panel2: #1b1f27;
  --panel3: #232833;
  --line: #232833;
  --line2: #323947;
  /* texto */
  --white: #f5f7fb;
  --text: #b9c0ce;
  --muted: #7b8496;
  /* marca e apoio */
  --blue: #3d6df2;
  --blue2: #86a8ff;
  --blue-soft: rgba(61,109,242,.14);
  --cyan: #3cc8e8;
  --accent: #ff9142;      /* cor secundária: só nas ações principais */
  --green: #36c98d;
  --red: #ef5d6c;
  --amber: #f2b441;
  --r: 10px;
  --r-sm: 8px;
  --font: 'Figtree', system-ui, sans-serif;
  --head: 'Bricolage', 'Figtree', system-ui, sans-serif;
  --hw: 700;
  --sh: 0 1px 0 rgba(255,255,255,.03) inset, 0 10px 24px -18px rgba(0,0,0,.9);
  --sh-lg: 0 24px 60px -20px rgba(0,0,0,.85), 0 0 0 1px rgba(255,255,255,.03) inset;
  --hex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1 22 6.5v11L12 23 2 17.5v-11z M12 7 7 9.8v4.4L12 17l5-2.8V9.8z' fill-rule='evenodd'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { background: var(--bg); color: var(--text); font: 400 14.5px/1.5 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: var(--blue2); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--blue); color: #fff; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: var(--line2); border-radius: 9px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }
.mono, .num, .big, .row .id, .coin b { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.pos { color: var(--green); }
.neg { color: var(--red); }
.hidden { display: none !important; }

/* ============ Cards: 3 níveis ============ */
/* padrão (secundário) */
.frame { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh); }
.frame > .in { height: 100%; position: relative; border-radius: inherit; }
/* principal: mais alto, com filete azul→ciano no topo */
.frame.hero { background: linear-gradient(180deg, #181c25, var(--panel) 55%); border-color: #2b3345; }
.frame.hero::before { content: ''; position: absolute; left: 20px; top: -1px; width: 56px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--blue), var(--cyan)); }
/* informativo: rebaixado, sem sombra */
.frame.flat { background: var(--field); box-shadow: none; }

/* ============ Estrutura ============ */
.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; z-index: 40; display: flex; flex-direction: column; gap: 2px; padding: 18px 12px 14px; background: var(--side); border-right: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 11px; padding: 2px 8px 18px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.brand .mark { width: 34px; height: 34px; flex: none; border-radius: 8px; overflow: hidden; background: var(--panel2); box-shadow: 0 0 0 1px var(--line2); }
.brand .mark img { width: 100%; height: 100%; object-fit: cover; display: block; }
.brand .name { font: 700 17px/1.1 var(--head); color: var(--white); letter-spacing: -.01em; }
.brand .name b { font-weight: inherit; }

.nav-label { font: 600 11.5px var(--font); color: var(--muted); padding: 16px 10px 6px; }
.nav a { position: relative; display: flex; align-items: center; gap: 11px; height: 38px; padding: 0 10px; border-radius: var(--r-sm); color: var(--text); font: 500 14.5px var(--font); transition: background .15s, color .15s; }
.nav a svg { width: 18px; height: 18px; flex: none; color: var(--muted); transition: color .15s; }
.nav a:hover { color: var(--white); background: var(--panel); }
.nav a.on { color: var(--white); background: var(--panel2); font-weight: 600; box-shadow: 0 0 0 1px var(--line) inset; }
.nav a.on svg { color: var(--blue2); }
.nav a.on::before { content: ''; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--blue); }
.side .spacer { flex: 1; }
.side .user { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 4px 0 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13.5px; }
.side .user b { color: var(--white); font-weight: 600; }
.scrim, .menu-btn { display: none; }

.main { min-width: 0; padding: 22px clamp(16px, 2.2vw, 36px) 56px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.title { display: flex; align-items: center; gap: 12px; }
.title h1 { font: 700 25px/1.1 var(--head); color: var(--white); letter-spacing: -.02em; }
.hud { display: flex; align-items: stretch; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: var(--sh); }
.coin { display: flex; align-items: center; gap: 9px; padding: 7px 14px; font: 600 14px var(--font); color: var(--white); }
.coin + .coin { border-left: 1px solid var(--line); }
.coin i { width: 14px; height: 14px; flex: none; background: var(--cyan); mask: var(--hex) center/contain no-repeat; -webkit-mask: var(--hex) center/contain no-repeat; }
.coin.brl i { mask: none; -webkit-mask: none; background: var(--green); width: 8px; height: 8px; border-radius: 50%; box-shadow: 0 0 0 3px rgba(54,201,141,.18); }
.rbx-n::before { content: ''; display: inline-block; width: .74em; height: .74em; margin-right: .32em; vertical-align: -.03em; background: var(--cyan); mask: var(--hex) center/contain no-repeat; -webkit-mask: var(--hex) center/contain no-repeat; }

/* ============ Botões ============ */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 14px; border: 0; border-radius: var(--r-sm); cursor: pointer; white-space: nowrap;
  font: 600 13.5px/1 var(--font); color: #fff; background: var(--blue);
  box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 0 0 1px #2f58cf, 0 6px 14px -8px rgba(61,109,242,.9);
  transition: transform .12s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease, color .15s ease;
}
.btn svg { width: 15px; height: 15px; flex: none; }
.btn:hover { background: #4a78f5; transform: translateY(-1px); box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 0 0 1px #3a63da, 0 10px 18px -8px rgba(61,109,242,.95); }
.btn:active { transform: translateY(0) scale(.985); background: #3562e0; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn:focus-visible, .input:focus-visible, .x:focus-visible, .seg button:focus-visible, .nav a:focus-visible, .ib:focus-visible { outline: 2px solid var(--blue2); outline-offset: 2px; }
/* secundário: discreto */
.btn.ghost { background: var(--panel2); color: #dfe3ec; box-shadow: 0 0 0 1px var(--line2) inset; }
.btn.ghost:hover { background: var(--panel3); color: #fff; box-shadow: 0 0 0 1px #46506a inset; }
.btn.ghost:active { background: var(--panel2); }
/* ação principal da página: cor secundária */
.btn.accent { background: var(--accent); color: #231304; box-shadow: 0 1px 0 rgba(255,255,255,.3) inset, 0 0 0 1px #e07a30, 0 6px 14px -8px rgba(255,145,66,.9); }
.btn.accent:hover { background: #ffa25e; box-shadow: 0 1px 0 rgba(255,255,255,.35) inset, 0 0 0 1px #e8843a, 0 10px 18px -8px rgba(255,145,66,.95); }
.btn.accent:active { background: #f5863a; }
/* positivo / negativo */
.btn.success { background: rgba(54,201,141,.13); color: var(--green); box-shadow: 0 0 0 1px rgba(54,201,141,.35) inset; }
.btn.success:hover { background: var(--green); color: #05241a; box-shadow: none; }
.btn.danger { background: var(--red); box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 0 0 1px #d34455; }
.btn.danger:hover { background: #f37380; box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 0 0 1px #d34455, 0 10px 18px -8px rgba(239,93,108,.9); }
.btn.danger.sm { background: rgba(239,93,108,.12); color: var(--red); box-shadow: 0 0 0 1px rgba(239,93,108,.35) inset; }
.btn.danger.sm:hover { background: var(--red); color: #fff; }
.btn.sm { height: 30px; padding: 0 11px; font-size: 13px; gap: 6px; border-radius: 7px; }
.btn.sm svg { width: 14px; height: 14px; }
/* carregando */
.btn.loading { color: transparent !important; pointer-events: none; }
.btn.loading > * { visibility: hidden; }
.btn.loading::after { content: ''; position: absolute; width: 15px; height: 15px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; animation: spin .6s linear infinite; }

/* ============ Grades ============ */
.grid { display: grid; gap: 16px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); }
.mt { margin-top: 16px; }
/* conteúdo + coluna lateral */
.split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.split > aside { display: grid; gap: 16px; align-content: start; }
.split.stretch { align-items: stretch; }

.panel .in { padding: 16px 18px 18px; }
.panel-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; min-height: 30px; }
.panel-h h2 { font: 600 15.5px var(--head); color: var(--white); letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; }
.eyebrow { font: 500 13px var(--font); color: var(--muted); }

/* ---- Painel: card principal de lucro ---- */
.profit .in { padding: 18px 20px 16px; display: flex; flex-direction: column; }
.profit .big { font: 700 38px/1.05 var(--head); color: var(--white); letter-spacing: -.03em; margin: 2px 0 4px; }
.profit .meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13.5px; color: var(--muted); margin-bottom: 14px; }
.profit .meta b { color: var(--text); font-weight: 600; }
/* ---- card de estoque (ciano) ---- */
.stockc .in { padding: 16px 18px; }
.stockc .big { font: 700 30px/1.1 var(--head); color: var(--white); letter-spacing: -.02em; margin: 2px 0 12px; }
.meter { height: 6px; border-radius: 6px; background: var(--panel3); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--blue), var(--cyan)); }
.pairs { display: grid; gap: 0; margin-top: 12px; }
.pairs div { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.pairs div span { color: var(--muted); }
.pairs div b { color: var(--white); font-weight: 600; font-variant-numeric: tabular-nums; }
/* ---- faixa de indicadores (informativo) ---- */
.kpis { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); }
.kpi { padding: 14px 18px; display: flex; gap: 12px; align-items: center; min-width: 0; }
.kpi + .kpi { border-left: 1px solid var(--line); }
.kpi .ic { width: 34px; height: 34px; flex: none; border-radius: 8px; display: grid; place-items: center; background: color-mix(in srgb, var(--tone, var(--blue)) 14%, transparent); color: var(--tone, var(--blue2)); }
.kpi .ic svg { width: 17px; height: 17px; }
.kpi small { display: block; font-size: 12.5px; color: var(--muted); }
.kpi b { display: block; font: 600 18px/1.2 var(--head); color: var(--white); letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.kpi > div { min-width: 0; }
.kpi[data-tone='green'] { --tone: var(--green); }
.kpi[data-tone='red'] { --tone: var(--red); }
.kpi[data-tone='cyan'] { --tone: var(--cyan); }
.kpi[data-tone='amber'] { --tone: var(--accent); }

/* ============ Segmented ============ */
.seg { display: inline-flex; background: var(--field); border: 1px solid var(--line); padding: 3px; gap: 2px; border-radius: var(--r-sm); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg button { flex: none; border: 0; background: transparent; cursor: pointer; height: 28px; padding: 0 12px; border-radius: 6px; font: 500 13px var(--font); color: var(--muted); transition: background .15s, color .15s; }
.seg button:hover { color: var(--white); }
.seg button.on { background: var(--panel3); color: var(--white); font-weight: 600; box-shadow: 0 0 0 1px var(--line2) inset, 0 1px 2px rgba(0,0,0,.4); }
.seg button:disabled { opacity: .4; cursor: not-allowed; }

/* ============ Listas (tabela) ============ */
.rows { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--sh); }
.panel .rows { background: transparent; border: 0; border-radius: 0; box-shadow: none; margin: 0 -18px -18px; border-top: 1px solid var(--line); }
.row {
  position: relative; display: grid; align-items: center; gap: 14px;
  grid-template-columns: var(--cols, 52px minmax(0,1.6fr) minmax(0,.8fr) minmax(0,1fr) 124px 264px);
  padding: 11px 18px; border-bottom: 1px solid var(--line); transition: background .12s;
}
.row:last-child { border-bottom: 0; }
.row.click { cursor: pointer; }
.row:not(.head):hover { background: var(--panel2); }
.row.head { background: var(--field); padding-top: 9px; padding-bottom: 9px; font: 500 12.5px var(--font); color: var(--muted); }
.row .id { font: 500 13px var(--font); color: var(--muted); }
.row .main-t { color: var(--white); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .sub-t { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .num { font: 600 14.5px var(--font); color: var(--white); }
.row.compact { --cols: 40px minmax(0,1fr) auto; }
.rows.plain .row { --cols: 52px minmax(0,2fr) minmax(0,1fr) minmax(0,1fr) 120px; }
.rows.plain .row > :nth-child(n+6) { display: none; }
.row .acts { display: flex; gap: 6px; justify-content: flex-end; }
.row[data-st='cancelado'], .row[data-st='expirado'] { opacity: .55; }
/* sinal de entrada/saída no extrato */
.row[data-st='in'] .id::before, .row[data-st='out'] .id::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 7px; background: var(--green); vertical-align: 1px; }
.row[data-st='out'] .id::before { background: var(--red); }

/* status: pílula com ponto */
.chip { justify-self: start; display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 6px; font: 600 12px var(--font); white-space: nowrap; background: color-mix(in srgb, var(--c, var(--muted)) 13%, transparent); color: var(--c, var(--text)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--c, var(--muted)) 26%, transparent) inset; }
.chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.pendente { --c: var(--amber); }
.chip.pendente::before { animation: pulse 1.6s ease infinite; }
.chip.pago, .chip.processando { --c: var(--blue2); }
.chip.entregue, .chip.recebido { --c: var(--cyan); }
.chip.concluido, .chip.completo { --c: var(--green); }
.chip.cancelado, .chip.falha { --c: var(--red); }
.chip.ch { --c: var(--muted); color: var(--text); font-weight: 500; }
.chip.ch::before { display: none; }

.empty { padding: 26px 10px; text-align: center; color: var(--muted); font-size: 14px; }
.empty svg { width: 26px; height: 26px; opacity: .45; display: block; margin: 0 auto 8px; }

/* ============ Formulários ============ */
.form { display: grid; gap: 14px; }
.f-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font: 500 13px var(--font); color: var(--text); }
.input, select.input, textarea.input { width: 100%; height: 38px; padding: 0 12px; background: var(--field); color: var(--white); border: 1px solid var(--line2); border-radius: var(--r-sm); outline: none; font: 500 14.5px var(--font); transition: border-color .15s, box-shadow .15s; }
textarea.input { height: 104px; padding: 9px 12px; resize: vertical; line-height: 1.45; }
.input:hover { border-color: #414a5c; }
.input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(61,109,242,.22); }
.input::placeholder { color: #566072; }
.input.money, .input.num { font-variant-numeric: tabular-nums; }
select.input { appearance: none; cursor: pointer; padding-right: 32px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) 16px, calc(100% - 12px) 16px; background-size: 5px 5px; background-repeat: no-repeat; }
input[type=color].input { padding: 3px; cursor: pointer; width: 46px; flex: none; }
.file { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px; cursor: pointer; border: 1px dashed var(--line2); border-radius: var(--r-sm); background: var(--field); color: var(--muted); overflow: hidden; transition: border-color .15s, color .15s; }
.file:hover { border-color: var(--blue2); color: var(--white); }
.file input { display: none; }
.file svg { width: 16px; height: 16px; color: var(--blue2); flex: none; }
.toggles { display: flex; gap: 8px; flex-wrap: wrap; }
.tg { position: relative; cursor: pointer; user-select: none; }
.tg input { position: absolute; opacity: 0; pointer-events: none; }
.tg span { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border: 1px solid var(--line2); border-radius: var(--r-sm); background: var(--field); color: var(--text); font: 500 13.5px var(--font); transition: border-color .15s, background .15s, color .15s; }
.tg span::before { content: ''; width: 14px; height: 14px; border-radius: 4px; border: 1.5px solid #586277; transition: background .15s, border-color .15s; }
.tg input:checked + span { color: var(--white); border-color: var(--blue); background: var(--blue-soft); }
.tg input:checked + span::before { background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L19 7'/%3E%3C/svg%3E") center/10px no-repeat; border-color: var(--blue); }
.tg input:focus-visible + span { outline: 2px solid var(--blue2); outline-offset: 2px; }
.calc { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; background: var(--field); border: 1px solid var(--line); border-radius: var(--r-sm); font-size: 13.5px; color: var(--muted); }
.calc b { font: 600 14.5px var(--font); color: var(--white); font-variant-numeric: tabular-nums; }
.note { font-size: 13px; color: var(--muted); }
.note.warn { color: var(--amber); }

/* ============ Modal ============ */
.overlay { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(5,6,9,.72); backdrop-filter: blur(3px); animation: fade .15s ease; }
.modal { width: min(520px, 100%); max-height: calc(100vh - 32px); animation: pop .18s cubic-bezier(.2,.8,.2,1); border-radius: 12px; border-color: var(--line2); box-shadow: var(--sh-lg); }
.modal.wide { width: min(700px, 100%); }
.modal > .in { display: flex; flex-direction: column; max-height: calc(100vh - 34px); }
.modal-h { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.modal-h h3 { font: 600 16.5px var(--head); color: var(--white); letter-spacing: -.01em; }
.modal-h h3 small { color: var(--muted); font: 500 13.5px var(--font); margin-right: 8px; }
.modal-b { padding: 18px; overflow-y: auto; }
.modal-f { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px 14px; border-top: 1px solid var(--line); background: var(--field); border-radius: 0 0 12px 12px; flex-wrap: wrap; }
.modal-f.inline-f { padding: 14px 0 0; margin-top: 16px; background: none; border-radius: 0; }
.x { background: none; border: 0; cursor: pointer; color: var(--muted); width: 30px; height: 30px; display: grid; place-items: center; border-radius: 7px; transition: background .15s, color .15s; }
.x:hover { color: var(--white); background: var(--panel2); }
.x svg { width: 17px; height: 17px; }
.kv { display: grid; grid-template-columns: 118px 1fr; gap: 0; font-size: 14.5px; }
.kv dt, .kv dd { padding: 8px 0; border-bottom: 1px solid var(--line); }
.kv dt { color: var(--muted); font-size: 13.5px; }
.kv dd { color: var(--white); font-weight: 500; word-break: break-word; }
.kv dt:last-of-type, .kv dd:last-of-type { border-bottom: 0; }
.proofs { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.proofs a { display: block; width: 150px; }
.proofs img { width: 150px; height: 104px; object-fit: cover; border: 1px solid var(--line2); border-radius: var(--r-sm); display: block; }
.proofs small { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }

/* ============ PIX ============ */
.qr { display: grid; justify-items: center; gap: 14px; text-align: center; }
.qr img { width: 200px; height: 200px; border-radius: 10px; background: #fff; padding: 8px; }
.qr .amount { font: 700 30px var(--head); color: var(--white); letter-spacing: -.02em; }
.copybox { display: flex; gap: 8px; width: 100%; }
.copybox .input { font-size: 13px; text-overflow: ellipsis; }
.wait { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13.5px; }
.wait::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--amber); animation: pulse 1.2s ease infinite; }
.receipt { border: 1px solid var(--line2); border-radius: var(--r); overflow: hidden; background: var(--field); }
.receipt-h { padding: 20px; text-align: center; border-bottom: 1px dashed var(--line2); background: var(--panel); }
.receipt-h .ok { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 10px; background: rgba(54,201,141,.14); color: var(--green); box-shadow: 0 0 0 1px rgba(54,201,141,.3) inset; }
.receipt-h .ok.bad { background: rgba(239,93,108,.14); color: var(--red); box-shadow: 0 0 0 1px rgba(239,93,108,.3) inset; }
.receipt-h .ok.wait-i { background: rgba(242,180,65,.14); color: var(--amber); box-shadow: 0 0 0 1px rgba(242,180,65,.3) inset; }
.receipt-h .ok svg { width: 20px; height: 20px; }
.receipt-h small { display: block; color: var(--muted); font-size: 13px; }
.receipt-h b { display: block; font: 700 30px var(--head); color: var(--white); margin-top: 2px; letter-spacing: -.02em; }
.receipt .kv { padding: 8px 18px; }
.receipt-f { padding: 10px 18px; border-top: 1px dashed var(--line2); display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; gap: 10px; flex-wrap: wrap; }

/* ============ Toast ============ */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 90; display: flex; flex-direction: column; gap: 8px; }
.toast { display: flex; align-items: center; gap: 10px; min-width: 220px; max-width: 340px; padding: 11px 14px; background: var(--panel3); border: 1px solid var(--line2); border-radius: var(--r-sm); color: var(--white); font-weight: 500; font-size: 14px; box-shadow: var(--sh-lg); animation: slide .22s cubic-bezier(.2,.8,.2,1); }
.toast::before { content: ''; width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--blue2); }
.toast.ok::before { background: var(--green); }
.toast.err::before { background: var(--red); }

/* ============ Gráfico ============ */
.chart { width: 100%; height: 150px; display: block; flex: 1; min-height: 120px; }
.chart .b { fill: var(--blue); transition: fill .15s; }
.chart .b.z { fill: var(--panel3); }
.chart .b.n { fill: var(--red); }
.chart .b:hover { fill: var(--cyan); }
.chart .ax { stroke: var(--line); stroke-width: 1; }
.chart-x { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; margin-top: 6px; }

/* ============ Carteira ============ */
.acc .in { padding: 16px 18px; }
.acc .nm { display: flex; align-items: center; gap: 9px; font: 500 13.5px var(--font); color: var(--text); }
.acc .nm i { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; background: var(--panel3); color: var(--text); }
.acc.hero .nm i { background: var(--blue-soft); color: var(--blue2); }
.acc .nm i svg { width: 15px; height: 15px; }
.acc .nm .real { margin-left: auto; font-size: 12.5px; color: var(--muted); }
.acc .bal { font: 700 28px/1.1 var(--head); color: var(--white); letter-spacing: -.02em; margin: 10px 0 14px; font-variant-numeric: tabular-nums; }
.acc .acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.acc .acts .btn { width: 100%; }

/* ============ Fornecedores ============ */
.sup .in { display: flex; flex-direction: column; }
.sup .nm { display: flex; align-items: center; gap: 11px; min-width: 0; padding: 14px 16px; }
.sup .av { width: 36px; height: 36px; flex: none; border-radius: 8px; display: grid; place-items: center; background: var(--panel3); color: var(--blue2); font: 700 15px var(--head); box-shadow: 0 0 0 1px var(--line2) inset; }
.sup .nm b { font: 600 15px var(--font); color: var(--white); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sup .nm small { font-size: 12.5px; color: var(--muted); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sup .nm > div:not(.av) { min-width: 0; flex: 1; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--field); }
.stats div { padding: 10px 16px; min-width: 0; }
.stats div + div { border-left: 1px solid var(--line); }
.stats small { display: block; font-size: 12px; color: var(--muted); }
.stats b { font: 600 14px var(--font); color: var(--white); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sup .acts { padding: 12px 16px; }
.filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.filters select.input { width: auto; min-width: 150px; height: 34px; font-size: 13.5px; background-position: calc(100% - 17px) 14px, calc(100% - 12px) 14px; }

/* ============ Ajustes ============ */
.logo-set { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.logo-set img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: var(--panel2); box-shadow: 0 0 0 1px var(--line2); }
.logo-set .file { flex: 1; min-width: 160px; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.dot.on { background: var(--green); box-shadow: 0 0 0 3px rgba(54,201,141,.18); }
.dot.off { background: var(--red); }
.title-ed { font: 600 17px var(--head); color: var(--white); }

/* ============ Bot: lista de mensagens ============ */
.msg .in { padding: 14px; display: flex; flex-direction: column; gap: 12px; height: 100%; }
.msg .nm { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.msg .nm b { font: var(--hw) 16px var(--head); color: var(--white); display: block; }
.msg .nm small { color: var(--muted); font-size: 13px; }
.msg .pv { background: #313338; border-radius: 12px; padding: 12px; flex: 1; max-height: 260px; overflow: hidden; position: relative; }
.msg .pv::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 40px; background: linear-gradient(transparent, #313338); }

/* prévia estilo Discord (Components V2) */
.dcv { background: #393a41; border: 1px solid #4a4b54; border-radius: 8px; border-left: 4px solid var(--c, #4a4b54); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; color: #dbdee1; font: 400 15px/1.375 var(--font); max-width: 520px; overflow-wrap: anywhere; }
.dcv .tx { white-space: pre-wrap; }
.dcv .tx b { color: #fff; font-weight: 700; }
.dcv .tx .h1 { font-size: 22px; font-weight: 700; color: #fff; }
.dcv .tx .h2 { font-size: 19px; font-weight: 700; color: #fff; }
.dcv .tx .h3 { font-size: 16px; font-weight: 700; color: #fff; }
.dcv .tx .sm { font-size: 12px; color: #a5a8ae; }
.dcv .tx code { background: #2b2d31; border-radius: 4px; padding: 1px 5px; font-size: 13px; }
.dcv .tx pre { background: #2b2d31; border: 1px solid #1e1f22; border-radius: 4px; padding: 8px; font-size: 13px; white-space: pre-wrap; }
.dcv .em { width: 1.375em; height: 1.375em; vertical-align: -.3em; object-fit: contain; }
.dcv hr { border: 0; border-top: 1px solid #4e5058; margin: 4px 0; }
.dcv hr.nd { border-color: transparent; }
.dcv hr.big { margin: 10px 0; }
.dcv .media { max-width: 100%; max-height: 260px; border-radius: 8px; display: block; object-fit: cover; }
.dcv .ph { background: #2b2d31; border: 1px dashed #5c5e66; border-radius: 8px; padding: 14px; text-align: center; color: #a5a8ae; font-size: 13px; }
.dcv .sec { display: flex; gap: 12px; justify-content: space-between; }
.dcv .sec img { width: 72px; height: 72px; border-radius: 8px; object-fit: cover; flex: none; }
.dcv .brow { display: flex; gap: 8px; flex-wrap: wrap; }
.dcv .b { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: 8px; font-size: 14px; font-weight: 500; color: #fff; background: #5865f2; }
.dcv .b.secondary, .dcv .b.link { background: #4e5058; }
.dcv .b.success { background: #248046; }
.dcv .b.danger { background: #da373c; }
.dcv .b .em { width: 18px; height: 18px; vertical-align: 0; }

/* ============ Bot: editor ============ */
.ed { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 18px; align-items: start; }
.ed-pv { position: sticky; top: 16px; }
.ed-pv .pvbox { background: #313338; border-radius: var(--r-sm); padding: 16px; min-height: 160px; }
.ed-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.blk { background: var(--field); border: 1px solid var(--line); border-radius: var(--r-sm); }
.blk-h { display: flex; align-items: center; gap: 6px; padding: 8px 8px 8px 14px; border-bottom: 1px solid var(--line); font: 600 13px var(--font); color: var(--text); }
.blk-h span { flex: 1; }
.blk-h > svg { width: 16px; height: 16px; flex: none; color: var(--blue2); }
.blk-b { padding: 12px; display: grid; gap: 10px; }
.blk.auto .blk-b { color: var(--muted); font-size: 13px; }
.ib { width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.ib:hover { background: var(--panel2); color: var(--white); }
.ib:disabled { opacity: .3; cursor: default; }
.ib svg { width: 16px; height: 16px; }
.ib.del:hover { color: var(--red); }
.ta-wrap { position: relative; }
.ta-wrap .ib.face { position: absolute; right: 6px; bottom: 6px; background: var(--panel2); }
.bt { display: grid; grid-template-columns: 40px minmax(0, 1fr) 130px 30px; gap: 8px; align-items: center; }
.bt .emo { height: 38px; border: 1px solid var(--line2); border-radius: var(--r-sm); background: var(--field); cursor: pointer; display: grid; place-items: center; font-size: 20px; color: var(--muted); }
.bt .emo img { width: 22px; height: 22px; object-fit: contain; }
.bt .emo svg { width: 18px; height: 18px; }
.bt .url { grid-column: 2 / -1; }
.bt .tag { grid-column: 2 / -1; font-size: 12px; color: var(--blue2); }
.addbar { display: flex; gap: 8px; flex-wrap: wrap; }
.vars { display: flex; gap: 6px; flex-wrap: wrap; }
.vars button { border: 1px solid var(--line2); background: var(--field); color: var(--blue2); border-radius: 8px; padding: 3px 9px; font-size: 12px; font-weight: 600; cursor: pointer; }
.vars button:hover { border-color: var(--blue2); }

/* seletor de emoji (a "carinha") */
.ep { position: fixed; z-index: 95; width: 320px; max-width: calc(100vw - 16px); background: var(--panel); border: 1px solid var(--line2); border-radius: var(--r-sm); box-shadow: var(--sh-lg); padding: 10px; display: grid; gap: 10px; }
.ep .seg { width: 100%; }
.ep .seg button { flex: 1; }
.ep-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; max-height: 220px; overflow-y: auto; }
.ep-grid button { aspect-ratio: 1; border: 0; background: transparent; border-radius: 8px; cursor: pointer; font-size: 20px; display: grid; place-items: center; }
.ep-grid button:hover { background: var(--panel2); }
.ep-grid img { width: 24px; height: 24px; object-fit: contain; }

/* emojis do bot */
.emo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.emo-card { position: relative; background: var(--field); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 6px 8px; display: grid; justify-items: center; gap: 6px; cursor: pointer; }
.emo-card:hover { border-color: var(--blue2); }
.emo-card img { width: 40px; height: 40px; object-fit: contain; }
.emo-card small { font-size: 12px; color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.emo-card .ib { position: absolute; top: 2px; right: 2px; width: 24px; height: 24px; opacity: 0; }
.emo-card:hover .ib, .emo-card .ib:focus-visible { opacity: 1; }
.emo-add { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.emo-add .input { width: 170px; }
.emo-add .file { flex: 1; min-width: 160px; }

/* ============ Login ============ */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(700px 380px at 50% 0, rgba(61,109,242,.10), transparent 70%); }
.login { width: min(370px, 100%); border-radius: 12px; box-shadow: var(--sh-lg); }
.login .in { padding: 28px 26px 26px; }
.login .brand { flex-direction: column; text-align: center; padding: 0 0 20px; margin-bottom: 20px; }
.login .brand .mark { width: 52px; height: 52px; border-radius: 12px; }
.login .brand .name { font-size: 22px; }
.login .btn { width: 100%; height: 40px; margin-top: 2px; font-size: 14.5px; }
.login .err { color: var(--red); font-weight: 500; min-height: 20px; text-align: center; font-size: 13.5px; }

@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.985); } }
@keyframes slide { from { opacity: 0; transform: translateY(8px); } }
@keyframes pulse { 50% { opacity: .35; } }
@keyframes spin { to { transform: rotate(360deg); } }
.load { height: 120px; display: grid; place-items: center; color: var(--muted); font-size: 14px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ============ Responsivo ============ */
@media (max-width: 1240px) {
  .row { --cols: 44px minmax(0,1.4fr) minmax(0,.7fr) minmax(0,.9fr) 112px 256px; }
  .split { grid-template-columns: minmax(0, 1fr) 320px; }
  .ed { grid-template-columns: 1fr; }
  .ed-pv { position: static; order: -1; }
}
@media (max-width: 1020px) {
  .split { grid-template-columns: 1fr; }
  .split > aside { order: -1; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
  .split.stretch > aside { order: 0; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi:nth-child(odd) { border-left: 0; }
  .kpi:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 264px; height: auto; transform: translateX(-102%); transition: transform .22s ease; overflow-y: auto; }
  body.menu-open .side { transform: none; box-shadow: 30px 0 80px rgba(0,0,0,.7); }
  .scrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(5,6,9,.65); opacity: 0; pointer-events: none; transition: opacity .2s; }
  body.menu-open .scrim { opacity: 1; pointer-events: auto; }
  .menu-btn { display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r-sm); border: 1px solid var(--line2); background: var(--panel); color: var(--white); cursor: pointer; }
  .menu-btn svg { width: 18px; height: 18px; }
  .main { padding: 14px 14px 40px; }
  .title h1 { font-size: 21px; }
  .g-2, .f-row { grid-template-columns: 1fr; }
  .profit .big { font-size: 30px; }
  .row, .rows.plain .row { grid-template-columns: minmax(0,1fr) auto !important; gap: 6px 10px; padding: 11px 14px; }
  .row.compact { grid-template-columns: auto minmax(0,1fr) auto !important; padding: 11px 14px; }
  .kpi { padding: 12px 14px; }
  .kpi b { font-size: 15.5px; }
  .panel .rows { margin: 0 -18px -18px; }
  .row.head, .row > .hide-m { display: none; }
  .row .acts { grid-column: 1 / -1; justify-content: flex-start; flex-wrap: wrap; }
  .filters { width: 100%; }
  .kv { grid-template-columns: 96px 1fr; }
  .bt { grid-template-columns: 40px minmax(0, 1fr) 30px; }
  .bt select { grid-column: 2 / -1; }
}

/* ---- perfis, ranks e tipos ---- */
.row.r-prof { --cols: 40px minmax(0,1.7fr) 70px minmax(0,1fr) minmax(0,1fr) minmax(0,1fr); }
.pos-n { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 6px; background: var(--field); color: var(--muted); font: 600 13px/1 var(--font); text-align: center; font-variant-numeric: tabular-nums; }
.pos-n.top { background: rgba(255,145,66,.14); color: var(--accent); }
.kind-row { padding: 11px 0; border-top: 1px solid var(--line); }
.kind-row:first-of-type { border-top: 0; }
.kind-h { display: flex; justify-content: space-between; margin-bottom: 7px; color: var(--white); }
.kind-s { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 7px; font-size: 13px; color: var(--muted); }
.chip.kind-plus { color: var(--cyan); }
.chip.kind-gamepass { color: var(--accent); }
.chip.kind-alt { color: #b79cff; }
.input.sm { height: 32px; font-size: 13.5px; min-width: 130px; }
.kpis.profile-k { --n: 3; margin-bottom: 12px; border: 1px solid var(--line); border-radius: var(--r); }
@media (max-width: 860px) { .row.r-prof { grid-template-columns: 30px minmax(0,1fr) auto !important; } .row.r-prof > :nth-child(3), .row.r-prof > :nth-child(4), .row.r-prof > :nth-child(6) { display: none; } }

/* ---- cartão de detalhe (venda / pedido) ---- */
.sum { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding: 2px 0 14px; }
.sum .who { display: grid; gap: 2px; min-width: 0; }
.sum small { font-size: 12.5px; color: var(--muted); }
.sum .who b { font: 600 20px/1.2 var(--head); color: var(--white); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sum .who .mono { font-size: 12.5px; color: var(--muted); }
.sum .amt { display: grid; justify-items: end; gap: 2px; flex: none; }
.sum .amt b { font: 700 26px/1.1 var(--head); color: var(--white); letter-spacing: -.02em; }
.sum .amt span { font-size: 13.5px; }
.tags { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.mini-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.mini { background: var(--field); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 11px 14px 6px; min-width: 0; }
.mini h4 { margin: 0 0 2px; font: 600 12.5px var(--font); color: var(--muted); }
.mini .pairs { margin-top: 0; }
.mini .pairs div:first-child { border-top: 0; }
.mini .pairs div { padding: 7px 0; }
.mini .pairs b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.track { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.track > div { position: relative; padding-top: 14px; display: grid; gap: 1px; font-size: 13px; color: var(--muted); }
.track > div::before { content: ''; position: absolute; left: 0; right: 0; top: 4px; height: 2px; background: var(--line2, var(--line)); border-radius: 2px; }
.track > div.done::before { background: var(--green); }
.track i { display: none; }
.track b { font-weight: 600; color: var(--text); }
.track .done b { color: var(--white); }
@media (max-width: 860px) { .mini-grid { grid-template-columns: 1fr; } .sum .amt b { font-size: 22px; } }
.tags .input.sm { width: auto; flex: none; }
.owners { display: grid; gap: 0; margin-top: 4px; }
.owner { display: grid; grid-template-columns: 34px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.owner:first-child { border-top: 0; }
.owner .av { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; background: var(--field); color: var(--blue2); font: 600 14px var(--head); }
.owner b { display: block; color: var(--white); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.owner small { color: var(--muted); font-size: 12.5px; }
.btn.icon { padding: 0 9px; }
.btn.icon span:empty { display: none; }

/* ---- comprovante ---- */
.receipt-h > span { font-size: 13px; color: var(--muted); }
.rc-sec { padding: 12px 18px 2px; border-top: 1px dashed var(--line2); }
.rc-sec h4 { margin: 0; font: 600 12.5px var(--font); color: var(--blue2); }
.rc-sec .pairs { margin-top: 4px; }
.rc-sec .pairs div:first-child { border-top: 0; }
.rc-sec .pairs b { text-align: right; min-width: 0; overflow-wrap: anywhere; }
.rc-id { font-size: 12px; }

/* ---- editor de mensagens: grupos, ação do botão, imagens automáticas ---- */
.msg-group + .msg-group { margin-top: 26px; }
.msg-group-h { display: flex; align-items: baseline; gap: 8px; margin: 0 2px 12px; }
.msg-group-h h3 { margin: 0; font: 700 16px var(--head); color: var(--white); }
.msg-group-h span { font-size: 13px; color: var(--muted); }
.msg .nm b .chip { vertical-align: 2px; margin-left: 4px; font-size: 11px; }
.bt { padding: 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--panel); }
.bt + .bt { margin-top: 8px; }
.bt-act { grid-column: 2 / -1; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.bt-act select { font-weight: 600; color: var(--blue2); }
.bt .url { grid-column: auto; }
.blk-b .f-row { gap: 10px; }
.dcv .ph.img { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 90px; }
.dcv .ph.img svg { width: 18px; height: 18px; }
.dcv .ph.thumb { width: 72px; height: 72px; flex: none; display: grid; place-items: center; padding: 0; }
.dcv .ph.thumb svg { width: 20px; height: 20px; }
.dcv .fsel { display: flex; justify-content: space-between; align-items: center; background: #1e1f22; border: 1px solid #3f4147; border-radius: 8px; padding: 9px 12px; color: #b5bac1; font-size: 14px; }
.dcv .fsel svg { width: 14px; height: 14px; }
@media (max-width: 860px) { .bt-act { grid-column: 1 / -1; } }

/* ---- clientes ---- */
.input.search { max-width: 420px; }
.frame.cli { cursor: pointer; transition: border-color .15s; }
.frame.cli:hover { border-color: var(--line2); }
.cli .in { padding: 16px; display: grid; gap: 12px; }
.cli-h { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.cli-h .av { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--field); color: var(--blue2); font: 700 16px var(--head); }
.cli-n b { display: block; color: var(--white); font: 600 16px var(--head); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cli-n small { font-size: 12.5px; color: var(--muted); }
.cli-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r-sm); }
.cli-stats div { padding: 8px 10px; min-width: 0; }
.cli-stats div + div { border-left: 1px solid var(--line); }
.cli-stats small { display: block; font-size: 12px; color: var(--muted); }
.cli-stats b { display: block; color: var(--white); font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.cli-kinds { display: flex; flex-wrap: wrap; gap: 6px; }
.cli-rb { display: flex; gap: 8px; font-size: 13px; min-width: 0; }
.cli-rb small { color: var(--muted); flex: none; }
.cli-rb span { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cli-f { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 10px; }
.cli-f span:first-child { margin-right: auto; }
@media (max-width: 860px) { .cli-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cli-stats div:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); } .cli-stats div:nth-child(4) { border-top: 1px solid var(--line); } }
#lf .note { margin: -4px 0 12px; }

/* ---- pendências ---- */
.nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: #1a1206; font: 700 12px/20px var(--font); font-style: normal; text-align: center; }
.pend-list { display: grid; gap: 12px; }
.pend .in { padding: 14px 16px; display: grid; gap: 10px; }
.pend-h { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.pend-h .av { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,145,66,.12); color: var(--accent); font: 700 16px var(--head); }
.pend-n b { display: block; color: var(--white); font: 600 16px var(--head); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pend-n small { font-size: 13px; color: var(--muted); }
.pend-h .acts { display: flex; gap: 8px; }
.pend-items { display: grid; border: 1px solid var(--line); border-radius: var(--r-sm); }
.pend-it { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 10px; align-items: center; padding: 9px 12px; font-size: 13.5px; }
.pend-it + .pend-it { border-top: 1px solid var(--line); }
.pend-it b { color: var(--white); font-weight: 600; white-space: nowrap; }
.pend-it span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 860px) {
  .pend-h { grid-template-columns: 40px minmax(0, 1fr); }
  .pend-h .acts { grid-column: 1 / -1; }
  .pend-it { grid-template-columns: auto minmax(0, 1fr); }
  .pend-it span { grid-column: 1 / -1; white-space: normal; }
}

/* ---- prévia de formulário (estilo Discord) ---- */
.form-pv { background: #1e1f22; }
.form-pv::after { background: linear-gradient(transparent, #1e1f22); }
.dmodal { background: #313338; border-radius: 10px; padding: 16px; display: grid; gap: 14px; color: #dbdee1; font: 14px/1.35 var(--font); }
.dm-t { font: 700 18px var(--head); color: #f2f3f5; }
.dm-l { font-weight: 600; color: #f2f3f5; font-size: 14px; }
.dm-l i { color: #f23f43; font-style: normal; margin-left: 3px; }
.dm-d { font-size: 12.5px; color: #b5bac1; margin-top: 2px; }
.dm-i { margin-top: 8px; background: #1e1f22; border: 1px solid #3f4147; border-radius: 8px; min-height: 40px; padding: 10px 12px; color: #6d6f78; font-size: 14px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dm-i.big { min-height: 72px; align-items: flex-start; }
.dm-i.file { justify-content: center; border-style: dashed; min-height: 64px; }
.dm-i svg { width: 16px; height: 16px; flex: none; }
.dm-b { display: flex; justify-content: flex-end; gap: 10px; }
.dm-b span { padding: 8px 16px; border-radius: 8px; font-weight: 600; color: #dbdee1; }
.dm-b .ok { background: #5865f2; color: #fff; }
.row.r-ntf { grid-template-columns: minmax(0,1fr) auto !important; }
