/* ipc.css — estilos do IPC (config admin + carteira vendedor) e do cabeçalho
   page-head/mod-*/cfg-* usados também pela Central de Cashback.
   Portado do slq lite (admin-ui.css) com cores literais (sem depender de vars). */

/* ── Cabeçalho de página (ícone + título + ação) ── */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head-l { display: flex; align-items: center; gap: 14px; }
.page-head-ic { width: 52px; height: 52px; border-radius: 14px; flex: 0 0 auto; background: #2e7d32; color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 18px rgba(46,125,50,.28); }
.page-head-ic.laranja { background: #f57c00; box-shadow: 0 8px 18px rgba(245,124,0,.28); }
.page-head-ic.azul { background: #1565c0; box-shadow: 0 8px 18px rgba(21,101,192,.28); }
.page-head-ic .icon { font-size: 26px; }
.page-head h2 { font-size: 22px; font-weight: 800; color: #1f2937; margin: 0; line-height: 1.15; }
.page-head-sub { font-size: 13px; color: #8b8f96; margin: 2px 0 0; }

/* ── Cabeçalho de módulo (título + ações) ── */
.mod-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.mod-title { font-size: 18px; font-weight: 700; color: #1f2937; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mod-title span:not(.icon) { font-size: 14px; font-weight: 400; color: #8b8f96; }
.mod-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mod-actions .btn { height: 40px; display: inline-flex; align-items: center; gap: 6px; padding: 0 16px; }

/* ── Blocos de configuração ── */
.cfg-bloco { padding: 20px 22px; margin-top: 16px; }
.cfg-bloco-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.cfg-bloco-head h3 { font-size: 15px; font-weight: 800; color: #1f2937; margin: 0; }
.cfg-bloco-head p { font-size: 12.5px; color: #8b8f96; margin: 1px 0 0; }
.cfg-bloco h3 { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 800; color: #1f2937; margin: 0 0 4px; }
.cfg-bloco h3 .icon { font-size: 20px; color: #1565c0; }
.cfg-hint { font-size: 12.5px; color: #8b8f96; margin: 0 0 12px; }
.cfg-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid #f2f3f5; }
.cfg-row label { font-size: 13px; color: #444; }
.cfg-row .form-control { max-width: 120px; text-align: right; }
.cfg-check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #444; padding: 5px 0; cursor: pointer; }
.cfg-check input { width: 16px; height: 16px; }
.cfg-bloco.full { grid-column: 1 / -1; }
.cfg-stack { display: contents; }
.ipc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; margin-bottom: 16px; }
.ipc-grid > .cfg-bloco { margin: 0; }
@media (max-width: 1000px) { .ipc-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 680px) { .ipc-grid { grid-template-columns: 1fr; } }
.cfg-adv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 700px) { .cfg-adv-grid { grid-template-columns: 1fr; } }

/* ── Cashback: barra de config do % ── */
.cb-config { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: #fff; border-radius: 8px; padding: 14px 18px; margin-bottom: 16px; box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,.1)); font-size: 13px; color: #555; }
.cb-status { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #e8f5e9; color: #2e7d32; }

/* ══ IPC — Carteira do Vendedor ══ */
/* Cards de segmento (6): qtd · % · valor */
.ipc-seg-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.ipc-seg { background: #fff; border-radius: 12px; padding: 10px 12px; box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,.1)); border-top: 3px solid #ccc; cursor: pointer; transition: transform .12s, box-shadow .12s, outline-color .12s; outline: 2px solid transparent; outline-offset: 2px; }
.ipc-seg:hover { transform: translateY(-2px); box-shadow: var(--shadow-md, 0 4px 14px rgba(0,0,0,.12)); }
.ipc-seg.active { outline-color: var(--brand, #212121); }
.ipc-seg-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.ipc-seg-lbl { font-size: 11.5px; font-weight: 700; color: #555; display: flex; align-items: center; gap: 4px; }
.ipc-seg-pct { font-size: 10.5px; color: #999; font-weight: 700; }
.ipc-seg-num { font-size: 22px; font-weight: 800; line-height: 1.1; margin-top: 2px; }
.ipc-seg-val { font-size: 11px; color: #888; margin-top: 1px; }

/* Badge IPC + popover de detalhamento */
.ipc-badge { display: inline-flex; align-items: center; gap: 6px; cursor: default; position: relative; }
.ipc-num { font-weight: 800; font-size: 16px; min-width: 26px; text-align: center; color: #fff; border-radius: 8px; padding: 2px 6px; }
.ipc-temp { font-size: 11px; font-weight: 700; white-space: nowrap; }
.ipc-pop { position: absolute; z-index: 400; left: 0; top: calc(100% + 6px); width: 250px; background: #fff; border: 1px solid #e0e0e0; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.16); padding: 12px; display: none; }
.ipc-badge:hover .ipc-pop { display: block; }
.ipc-pop-head { font-size: 12px; font-weight: 800; margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; }
.ipc-bar-row { display: grid; grid-template-columns: 78px 1fr 30px; align-items: center; gap: 7px; margin-bottom: 5px; font-size: 11px; }
.ipc-bar-lbl { color: #666; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ipc-bar-track { background: #eef0f2; border-radius: 6px; height: 8px; overflow: hidden; }
.ipc-bar-fill { height: 100%; border-radius: 6px; }
.ipc-bar-val { font-weight: 700; color: #444; text-align: right; }
.ipc-bar-row.total .ipc-bar-lbl { font-weight: 800; color: #222; }
.ipc-bar-row.total .ipc-bar-val { font-weight: 800; color: #111; }

/* Próxima ação (pill) */
.ipc-acao { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; background: #eef1f4; color: #455; }
.ipc-atrasada { color: #c62828; font-weight: 700; font-size: 11px; }

/* Radar de Oportunidades */
.ipc-radar { background: #fff; border-radius: 12px; box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,.1)); padding: 14px 16px; }
.ipc-radar-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.ipc-radar-head .icon { color: #e53935; }
.ipc-radar-head h3 { margin: 0; font-size: 14px; }
.ipc-radar-head small { color: #999; font-weight: 600; }
.ipc-radar-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.ipc-op { display: flex; align-items: center; gap: 10px; border: 1px solid #eee; border-radius: 10px; padding: 8px 10px; }
.ipc-op-ipc { font-weight: 800; font-size: 15px; color: #fff; border-radius: 8px; padding: 3px 8px; min-width: 34px; text-align: center; }
.ipc-op-info { flex: 1; min-width: 0; }
.ipc-op-nome { font-weight: 700; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ipc-op-meta { font-size: 11px; color: #888; }
.ipc-op-wa { background: #25d366; color: #fff; border: none; border-radius: 8px; padding: 6px 10px; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; text-decoration: none; white-space: nowrap; }
.ipc-radar-vazio { color: #999; font-size: 13px; padding: 6px 2px; }

/* ══ Central de Notificações ══ */
.nt-modulo { margin-bottom: 22px; }
.nt-modulo-tit { font-size: 12px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: #9aa0a6; margin: 0 2px 10px; }
.nt-card { background: #fff; border: 1px solid #f0f0f0; border-radius: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.04); padding: 16px 18px; margin-bottom: 12px; }
.nt-card.off { opacity: .6; }
.nt-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.nt-card-tit { font-size: 15px; font-weight: 800; color: #1f2937; }
.nt-card-desc { font-size: 12.5px; color: #8b8f96; margin-top: 2px; }
.nt-card.off .nt-card-body { display: none; }
.nt-card-body { margin-top: 14px; display: flex; flex-direction: column; gap: 12px; }
.nt-linha { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.nt-lbl { font-size: 12.5px; font-weight: 700; color: #6b7280; }
.nt-chk { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: #374151; font-weight: 600; cursor: pointer; }
.nt-chk .icon { font-size: 17px; color: #9aa0a6; }
.nt-campo .form-label { display: block; margin-bottom: 5px; }
.nt-vars { margin-top: 8px; font-size: 12px; color: #9aa0a6; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.nt-var { background: #eef0f2; border: none; border-radius: 6px; padding: 3px 9px; font-size: 12px; font-weight: 600; color: #4b5563; cursor: pointer; font-family: inherit; }
.nt-var:hover { background: #e0f2e1; color: #2e7d32; }
.nt-acoes { display: flex; justify-content: flex-end; gap: 8px; }

/* Switch (liga/desliga) — usado nos cards de notificação */
.nt-switch { position: relative; display: inline-block; width: 44px; height: 24px; flex: 0 0 auto; }
.nt-switch input { opacity: 0; width: 0; height: 0; }
.nt-slider { position: absolute; inset: 0; background: #cfd4da; border-radius: 999px; transition: .2s; cursor: pointer; }
.nt-slider::before { content: ''; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.nt-switch input:checked + .nt-slider { background: #2e7d32; }
.nt-switch input:checked + .nt-slider::before { transform: translateX(20px); }
