/* =========================================================================
   Kloops CRM — estilos do login e do aplicativo
   As cores do cliente chegam por --b23-primary e --b23-dark (definidas no head).
   ========================================================================= */
:root {
	--b23-bg: #f3f5f8;
	--b23-surface: #ffffff;
	--b23-border: #e2e6ec;
	--b23-text: #1c2430;
	--b23-muted: #667085;
	--b23-danger: #d92d20;
	--b23-ok: #12805c;
	--b23-radius: 10px;
	--b23-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
	--b23-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font: 14px/1.45 var(--b23-font); color: var(--b23-text); background: var(--b23-bg); min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--b23-primary); }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* ---------- Botões e formulários ---------- */
.b23-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--b23-border); background: var(--b23-surface); padding: 8px 14px; border-radius: 8px; cursor: pointer; font-weight: 500; text-decoration: none; color: var(--b23-text); white-space: nowrap; }
.b23-btn:hover { border-color: #c5ccd6; }
.b23-btn-primary { background: var(--b23-primary); border-color: var(--b23-primary); color: #fff; }
.b23-btn-primary:hover { filter: brightness(.95); border-color: var(--b23-primary); }
.b23-btn-danger { color: var(--b23-danger); }
.b23-btn-wa { background: #25d366; border-color: #25d366; color: #fff; }
.b23-btn-block { width: 100%; padding: 11px 14px; }
.b23-btn-sm { padding: 5px 10px; font-size: 13px; }
.b23-form { display: grid; gap: 14px; }
.b23-form label, .b23-field { display: grid; gap: 5px; font-weight: 500; font-size: 13px; }
input[type=text], input[type=email], input[type=number], input[type=url], input[type=password], input[type=tel], input[type=date], input[type=search], select, textarea {
	width: 100%; padding: 9px 11px; border: 1px solid var(--b23-border); border-radius: 8px; background: #fff; font-weight: 400; font-size: 14px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--b23-primary) 35%, transparent); border-color: var(--b23-primary); }
input[type=color] { width: 40px; height: 34px; padding: 2px; border: 1px solid var(--b23-border); border-radius: 6px; background: #fff; }
.b23-check { display: flex !important; align-items: center; gap: 8px; font-weight: 400 !important; }
.b23-muted { color: var(--b23-muted); }
.b23-alert { padding: 10px 12px; border-radius: 8px; margin-bottom: 14px; font-size: 13px; }
.b23-alert-error { background: #fef3f2; color: #b42318; border: 1px solid #fecdca; }
.b23-alert-ok { background: #ecfdf3; color: #067647; border: 1px solid #abefc6; }

/* ---------- Tela de login — Kloops CRM ---------- */
body.b23-page-login, body.b23-page-lost, body.b23-page-reset, body.b23-page-invite, body.b23-page-suspended, body.b23-page-owner-denied { background: #f4f7f5; }
body.b23-page-login .b23-credit, body.b23-page-lost .b23-credit, body.b23-page-reset .b23-credit, body.b23-page-invite .b23-credit, body.b23-page-suspended .b23-credit, body.b23-page-owner-denied .b23-credit { display: none; }
.k-auth { --k-green: #2BFF88; --k-deep: #007A40; --k-ink: #0A0A0A; flex: 1; display: grid; grid-template-columns: minmax(380px, 1.05fr) 1fr; min-height: 100vh; }
.k-brand { position: relative; overflow: hidden; background: radial-gradient(120% 90% at 0% 100%, #0d2a1b 0%, var(--k-ink) 55%); color: #fff; display: flex; align-items: center; }
.k-vec { position: absolute; inset: 0; width: 100%; height: 100%; }
.k-brand-in { position: relative; padding: 56px clamp(32px, 6vw, 84px); max-width: 600px; }
.k-logo { width: 190px; height: auto; display: block; margin-bottom: 44px; }
.k-brand h2 { font-size: clamp(30px, 3.4vw, 44px); line-height: 1.08; letter-spacing: -.02em; margin: 0 0 14px; font-weight: 800; }
.k-brand h2 span { color: var(--k-green); }
.k-brand p { color: rgba(255,255,255,.72); font-size: 16px; margin: 0 0 30px; max-width: 440px; }
.k-mock { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 430px; padding: 14px; border-radius: 18px; background: rgba(255,255,255,.05); border: 1px solid rgba(43,255,136,.22); backdrop-filter: blur(6px); box-shadow: 0 20px 60px rgba(0,0,0,.35); margin-bottom: 30px; transform: rotate(-2deg); }
.k-col b { display: block; font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: rgba(255,255,255,.55); margin-bottom: 8px; }
.k-card { position: relative; display: block; height: 46px; border-radius: 10px; background: rgba(255,255,255,.09); margin-bottom: 8px; padding: 9px 10px; }
.k-card em, .k-card u { display: block; height: 6px; border-radius: 4px; background: rgba(255,255,255,.45); width: 70%; text-decoration: none; }
.k-card u { margin-top: 8px; width: 45%; background: rgba(255,255,255,.22); }
.k-card.is-hot { background: rgba(43,255,136,.14); outline: 1px solid rgba(43,255,136,.5); animation: k-move 5s ease-in-out infinite; }
.k-card.is-won { background: var(--k-green); } .k-card.is-won em { background: rgba(0,0,0,.55); } .k-card.is-won u { background: rgba(0,0,0,.25); }
.k-card s { position: absolute; right: 8px; top: 8px; width: 16px; height: 16px; border-radius: 50%; background: var(--k-green); color: #000; font-size: 10px; line-height: 16px; text-align: center; text-decoration: none; font-weight: 700; }
.k-bul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.k-bul li { position: relative; padding-left: 28px; color: rgba(255,255,255,.85); font-size: 14.5px; }
.k-bul li::before { content: ""; position: absolute; left: 0; top: 2px; width: 18px; height: 18px; border-radius: 6px; background: var(--k-green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L19 7'/%3E%3C/svg%3E") center / 12px no-repeat; }
.k-side { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 24px 20px; background: radial-gradient(60% 50% at 100% 0%, rgba(43,255,136,.14), transparent 70%), #f4f7f5; }
.k-card-form { width: 100%; max-width: 410px; background: #fff; border-radius: 22px; padding: 36px 34px 30px; box-shadow: 0 1px 2px rgba(10,10,10,.04), 0 24px 60px rgba(0,60,30,.12); border: 1px solid #e6ece8; }
.k-tenant { display: flex; align-items: center; justify-content: flex-start; min-height: 48px; margin-bottom: 26px; }
.k-tenant img { max-width: 200px; max-height: 64px; object-fit: contain; }
.k-tenant strong { font-size: 19px; color: var(--k-ink); }
.k-card-form h1 { font-size: 25px; letter-spacing: -.01em; margin: 0 0 6px; color: var(--k-ink); }
.k-sub { color: #667085; margin: 0 0 22px; }
.k-card-form .b23-form label { font-weight: 600; font-size: 13px; color: #344054; }
.k-card-form .b23-form input[type=text], .k-card-form .b23-form input[type=email], .k-card-form .b23-form input[type=password] { height: 48px; border-radius: 12px; border: 1.5px solid #dfe5e1; background: #fafcfb; padding: 0 14px; font-size: 15px; transition: border-color .15s, box-shadow .15s, background .15s; }
.k-card-form .b23-form input:focus { outline: none; border-color: var(--k-deep); background: #fff; box-shadow: 0 0 0 4px rgba(43,255,136,.25); }
.k-pw { position: relative; display: block; } .k-pw input { width: 100%; padding-right: 46px !important; }
.k-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; background: transparent; color: #98a2b3; border-radius: 9px; cursor: pointer; display: grid; place-items: center; }
.k-eye:hover, .k-eye.is-on { color: var(--k-deep); background: rgba(43,255,136,.15); }
.k-card-form .b23-check input { accent-color: var(--k-deep); width: 16px; height: 16px; }
.k-card-form .b23-btn-primary { height: 50px; border-radius: 12px; background: var(--k-ink); border-color: var(--k-ink); color: #fff; font-size: 15.5px; font-weight: 700; margin-top: 4px; transition: transform .12s, box-shadow .2s; }
.k-card-form .b23-btn-primary:hover { filter: none; background: #000; box-shadow: 0 10px 24px rgba(0,122,64,.28), inset 0 -3px 0 var(--k-green); transform: translateY(-1px); }
.k-go span { color: var(--k-green); transition: transform .15s; } .k-go:hover span { transform: translateX(3px); }
.k-card-form .b23-auth-link { text-align: center; margin: 18px 0 0; font-size: 13.5px; }
.k-card-form .b23-auth-link a, .k-card-form a { color: var(--k-deep); font-weight: 600; text-decoration: none; }
.k-card-form a:hover { text-decoration: underline; }
.k-powered { display: flex; align-items: center; gap: 7px; margin: 22px 0 0; font-size: 12px; color: #8a948f; }
.k-powered img { border-radius: 4px; }
/* compatibilidade: telas antigas que ainda usam as classes do cartão */
.b23-auth-link { text-align: center; margin: 16px 0 0; font-size: 13px; }
@keyframes k-move { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(6px); } }
@keyframes k-floaty { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-12px) rotate(6deg); } }
@keyframes k-rot { to { transform: rotate(360deg); } }
@keyframes k-pul { 0%, 100% { opacity: .85; } 50% { opacity: 1; } }
.k-float { transform-box: fill-box; transform-origin: center; animation: k-floaty 7s ease-in-out infinite; } .k-d2 { animation-delay: -2s; animation-duration: 9s; } .k-d3 { animation-delay: -4s; animation-duration: 6s; }
.k-spin { transform-box: view-box; transform-origin: 520px 110px; animation: k-rot 60s linear infinite; }
.k-pulse { animation: k-pul 6s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .k-float, .k-spin, .k-pulse, .k-card.is-hot { animation: none; } }
@media (max-width: 900px) {
	.k-auth { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
	.k-brand { min-height: 0; }
	.k-brand-in { padding: calc(28px + env(safe-area-inset-top)) 24px 70px; }
	.k-logo { width: 140px; margin-bottom: 18px; }
	.k-brand h2 { font-size: 26px; margin-bottom: 0; }
	.k-brand p, .k-mock, .k-bul { display: none; }
	.k-side { position: relative; z-index: 2; margin-top: -50px; padding: 0 16px 20px; background: transparent; justify-content: flex-start; }
	.k-card-form { padding: 28px 22px 24px; border-radius: 20px; }
}

/* ---------- Crédito Base23 ---------- */
.b23-credit { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 16px; font-size: 11px; color: var(--b23-muted); opacity: .8; }
body.b23-page-login .b23-credit, body.b23-page-lost .b23-credit, body.b23-page-reset .b23-credit, body.b23-page-invite .b23-credit, body.b23-page-suspended .b23-credit { color: rgba(255, 255, 255, .6); }
.b23-credit img { opacity: .8; }

/* ---------- App: barra superior ---------- */
.b23-app { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.b23-top { display: flex; align-items: center; gap: 18px; padding: 0 20px; height: 58px; background: var(--b23-dark); color: #fff; position: sticky; top: 0; z-index: 20; }
.b23-top-brand img { max-height: 46px; max-width: 220px; display: block; object-fit: contain; }
.b23-top-brand strong { font-size: 16px; }
.b23-tabs { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.b23-tabs button { background: transparent; border: 0; color: rgba(255, 255, 255, .75); padding: 8px 12px; border-radius: 8px; cursor: pointer; font-weight: 500; white-space: nowrap; }
.b23-tabs button:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.b23-tabs button.is-active { background: var(--b23-primary); color: #fff; }
.b23-top-user { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.b23-top-user .b23-link-small { color: rgba(255, 255, 255, .75); text-decoration: none; }
.b23-top-user .b23-link-small:hover { color: #fff; }
.b23-main { flex: 1; padding: 18px 20px; min-height: 0; }
.b23-loading { padding: 40px; text-align: center; color: var(--b23-muted); }

/* ---------- Barra de ferramentas ---------- */
.b23-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.b23-toolbar input[type=search] { max-width: 260px; }
.b23-toolbar select, .b23-toolbar input[type=date] { width: auto; min-width: 130px; }
.b23-toolbar .b23-spacer { flex: 1; }
.b23-count { color: var(--b23-muted); font-size: 13px; }

/* ---------- Kanban ---------- */
.b23-board { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 10px; align-items: flex-start; height: calc(100vh - 58px - 36px - 56px - 40px); min-height: 380px; }
.b23-col { flex: 0 0 290px; background: #e9edf2; border-radius: var(--b23-radius); display: flex; flex-direction: column; max-height: 100%; }
.b23-col-head { display: flex; align-items: center; gap: 8px; padding: 12px 12px 8px; font-weight: 600; border-top: 3px solid var(--stage, #64748b); border-radius: var(--b23-radius) var(--b23-radius) 0 0; }
.b23-col-head .b23-badge { margin-left: auto; }
.b23-col-body { padding: 4px 8px 10px; overflow-y: auto; flex: 1; min-height: 60px; display: flex; flex-direction: column; gap: 8px; }
.b23-badge { background: rgba(0, 0, 0, .07); color: var(--b23-muted); border-radius: 999px; padding: 1px 8px; font-size: 12px; font-weight: 600; }
.b23-card { background: var(--b23-surface); border: 1px solid var(--b23-border); border-radius: 9px; padding: 10px 11px; box-shadow: var(--b23-shadow); cursor: grab; display: grid; gap: 4px; }
.b23-card:hover { border-color: #c5ccd6; }
.b23-card-name { font-weight: 600; word-break: break-word; }
.b23-card-line { font-size: 12.5px; color: var(--b23-muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.b23-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 4px; font-size: 12px; color: var(--b23-muted); }
.b23-card-wa { color: #128c4b; text-decoration: none; font-weight: 600; }
.b23-tag { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: color-mix(in srgb, var(--b23-primary) 10%, #fff); color: color-mix(in srgb, var(--b23-primary) 80%, #000); border-radius: 5px; padding: 1px 7px; font-size: 11.5px; font-weight: 500; }
.b23-ghost { opacity: .4; }
.b23-chosen { box-shadow: 0 8px 24px rgba(0, 0, 0, .18); }
.b23-col-more { text-align: center; font-size: 12px; color: var(--b23-muted); padding: 4px; }

/* ---------- Lista ---------- */
.b23-table-wrap { background: var(--b23-surface); border: 1px solid var(--b23-border); border-radius: var(--b23-radius); overflow-x: auto; }
.b23-table { width: 100%; border-collapse: collapse; }
.b23-table th, .b23-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--b23-border); white-space: nowrap; }
.b23-table th { font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--b23-muted); background: #f9fafb; }
.b23-table tbody tr { cursor: pointer; }
.b23-table tbody tr:hover { background: #f9fafb; }
.b23-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.b23-pager { display: flex; justify-content: flex-end; align-items: center; gap: 8px; padding: 12px 0; }

/* ---------- Indicadores ---------- */
.b23-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.b23-kpi { background: var(--b23-surface); border: 1px solid var(--b23-border); border-radius: var(--b23-radius); padding: 14px 16px; }
.b23-kpi span { display: block; font-size: 12px; color: var(--b23-muted); }
.b23-kpi strong { font-size: 26px; font-variant-numeric: tabular-nums; }
.b23-panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.b23-panel { background: var(--b23-surface); border: 1px solid var(--b23-border); border-radius: var(--b23-radius); padding: 16px; }
.b23-panel h3 { margin: 0 0 12px; font-size: 14px; }
.b23-bars { display: grid; gap: 8px; }
.b23-bar { display: grid; grid-template-columns: minmax(90px, 38%) 1fr 40px; align-items: center; gap: 8px; font-size: 13px; }
.b23-bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b23-bar-track { background: #eef1f5; border-radius: 4px; height: 10px; overflow: hidden; }
.b23-bar-fill { height: 100%; background: var(--b23-primary); border-radius: 4px; }
.b23-bar-n { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.b23-days { display: flex; align-items: flex-end; gap: 3px; height: 140px; padding-top: 10px; }
.b23-day { flex: 1; background: var(--b23-primary); border-radius: 3px 3px 0 0; min-height: 2px; position: relative; opacity: .85; }
.b23-day:hover { opacity: 1; }
.b23-days-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--b23-muted); margin-top: 6px; }

/* ---------- Configurações ---------- */
.b23-settings { display: grid; gap: 16px; max-width: 920px; }
.b23-stage-row, .b23-user-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--b23-border); flex-wrap: wrap; }
.b23-stage-row input[type=text] { flex: 1; min-width: 160px; }
.b23-handle { cursor: grab; color: var(--b23-muted); padding: 0 4px; user-select: none; }
.b23-user-row .b23-user-info { flex: 1; min-width: 180px; }
.b23-user-row .b23-user-info small { display: block; color: var(--b23-muted); }
.b23-pill { font-size: 11.5px; padding: 2px 8px; border-radius: 999px; background: #eef1f5; color: var(--b23-muted); font-weight: 600; }
.b23-pill-off { background: #fef3f2; color: #b42318; }
.b23-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ---------- Modal / ficha do lead ---------- */
.b23-modal { position: fixed; inset: 0; z-index: 50; display: flex; justify-content: flex-end; }
.b23-modal-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .45); }
.b23-modal-panel { position: relative; width: min(560px, 100%); height: 100%; background: var(--b23-bg); overflow-y: auto; box-shadow: -10px 0 30px rgba(0, 0, 0, .15); display: flex; flex-direction: column; }
.b23-modal-panel.is-small { margin: auto; height: auto; max-height: 92vh; border-radius: 14px; width: min(460px, calc(100% - 32px)); }
.b23-modal:has(.is-small) { justify-content: center; align-items: center; }
.b23-mhead { display: flex; align-items: flex-start; gap: 10px; padding: 18px 20px; background: var(--b23-surface); border-bottom: 1px solid var(--b23-border); position: sticky; top: 0; z-index: 2; }
.b23-mhead h2 { margin: 0; font-size: 18px; flex: 1; word-break: break-word; }
.b23-mhead small { display: block; font-weight: 400; color: var(--b23-muted); font-size: 12.5px; margin-top: 2px; }
.b23-close { background: none; border: 0; font-size: 24px; line-height: 1; cursor: pointer; color: var(--b23-muted); padding: 0 4px; }
.b23-mbody { padding: 16px 20px 28px; display: grid; gap: 16px; }
.b23-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.b23-section { background: var(--b23-surface); border: 1px solid var(--b23-border); border-radius: var(--b23-radius); padding: 14px 16px; }
.b23-section h3 { margin: 0 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--b23-muted); }
.b23-timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.b23-timeline li { display: grid; grid-template-columns: 10px 1fr; gap: 10px; font-size: 13px; }
.b23-timeline li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--b23-primary); margin-top: 6px; }
.b23-timeline small { display: block; color: var(--b23-muted); font-size: 12px; }
.b23-note { background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; padding: 9px 11px; font-size: 13px; white-space: pre-wrap; word-break: break-word; }
.b23-note small { display: block; color: var(--b23-muted); margin-top: 4px; white-space: normal; }
.b23-notes { display: grid; gap: 8px; margin-top: 10px; }


/* ---------- Ficha do lead (página inteira, estilo negociação RD) ---------- */
.b23-deal { position: fixed; inset: 0; z-index: 40; background: var(--b23-bg); overflow-y: auto; }
.b23-deal-inner { max-width: 1280px; margin: 0 auto; padding: 22px 24px 40px; }
.b23-deal-head { display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.b23-back { border: 1px solid var(--b23-border); background: var(--b23-surface); width: 38px; height: 38px; border-radius: 10px; font-size: 18px; cursor: pointer; flex: 0 0 auto; }
.b23-back:hover { border-color: var(--b23-primary); color: var(--b23-primary); }
.b23-deal-title { flex: 1; min-width: 220px; }
.b23-deal-title h1 { margin: 2px 0 8px; font-size: 24px; line-height: 1.2; word-break: break-word; }
.b23-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.b23-chip { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; padding: 3px 8px; border-radius: 5px; background: #eef1f5; color: #475467; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b23-chip-soft { font-weight: 500; text-transform: none; letter-spacing: 0; background: transparent; border: 1px solid var(--b23-border); }
.b23-chip-open { background: #7c3aed; color: #fff; }
.b23-chip-won { background: #16a34a; color: #fff; }
.b23-chip-lost { background: #dc2626; color: #fff; }
.b23-deal-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.b23-btn-won { background: var(--b23-dark); border-color: var(--b23-dark); color: #fff; }
.b23-btn-won:hover { filter: brightness(1.15); border-color: var(--b23-dark); }
.b23-btn-lost { background: #fee4e2; border-color: #fecdca; color: #b42318; }
.b23-btn-lost:hover { border-color: #f97066; }

.b23-stepper { display: flex; margin: 20px 0 14px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 2px; }
.b23-stepper button { flex: 1 0 auto; min-width: 96px; max-width: 220px; border: 0; background: #e4e8ee; color: #475467; font-weight: 600; font-size: 13px; padding: 10px 18px 10px 26px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
	clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%, 12px 50%); margin-right: -6px; transition: background .15s; }
.b23-stepper button:first-child { clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%); padding-left: 16px; border-radius: 8px 0 0 8px; }
.b23-stepper button:hover { background: #d5dbe3; }
.b23-stepper button.is-done { background: color-mix(in srgb, var(--b23-primary) 22%, #fff); color: color-mix(in srgb, var(--b23-primary) 70%, #000); }
.b23-stepper button.is-current { background: var(--b23-primary); color: #fff; }
.b23-banner { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; font-size: 13.5px; }
.b23-banner-won { background: #ecfdf3; border: 1px solid #abefc6; color: #067647; }
.b23-banner-lost { background: #fef3f2; border: 1px solid #fecdca; color: #b42318; }

.b23-deal-grid { display: grid; grid-template-columns: minmax(300px, 400px) 1fr; gap: 18px; align-items: start; }
.b23-deal-side { display: grid; gap: 14px; position: relative; z-index: 2; }
.b23-box { background: var(--b23-surface); border: 1px solid var(--b23-border); border-radius: 12px; padding: 14px 16px; }
.b23-box h3 { margin: 0 0 8px; font-size: 15px; }
.b23-box select { margin-top: 4px; }
.b23-kv { display: grid; grid-template-columns: 42% 1fr 24px; align-items: center; gap: 8px; padding: 7px 6px; border-radius: 6px; font-size: 13.5px; min-height: 34px; }
.b23-kv:hover { background: #f5f7fa; }
.b23-kv-l { color: var(--b23-muted); }
.b23-kv-v { font-weight: 600; word-break: break-word; }
.b23-kv-edit { border: 0; background: none; color: var(--b23-muted); cursor: pointer; opacity: 0; font-size: 14px; padding: 2px; }
.b23-kv:hover .b23-kv-edit, .b23-kv-edit:focus { opacity: 1; }
.b23-kv.is-editing { grid-template-columns: 42% 1fr; }
.b23-kv.is-editing .b23-kv-edit { display: none; }
.b23-inline { display: flex; gap: 4px; }
.b23-inline input { padding: 5px 8px; font-size: 13px; }
.b23-contact-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.b23-link-danger { background: none; border: 0; color: var(--b23-danger); font-size: 12.5px; cursor: pointer; padding: 10px 0 0; }

.b23-stars { display: inline-flex; gap: 1px; color: #d0d5dd; font-size: 15px; line-height: 1; }
.b23-stars .on { color: #f5a524; }
.b23-stars i { font-style: normal; }
.b23-stars.is-edit button { border: 0; background: none; color: #d0d5dd; font-size: 18px; cursor: pointer; padding: 0 1px; }
.b23-stars.is-edit button.on { color: #f5a524; }
.b23-stars.is-edit:hover button { color: #f5a524; }
.b23-stars.is-edit button:hover ~ button { color: #d0d5dd; }

.b23-deal-main { background: var(--b23-surface); border: 1px solid var(--b23-border); border-radius: 12px; padding: 4px 18px 18px; min-width: 0; }
.b23-dtabs { display: flex; gap: 18px; border-bottom: 1px solid var(--b23-border); margin-bottom: 16px; }
.b23-dtabs button { border: 0; background: none; padding: 14px 2px 11px; font-weight: 600; color: var(--b23-muted); cursor: pointer; border-bottom: 3px solid transparent; }
.b23-dtabs button.is-active { color: var(--b23-primary); border-bottom-color: var(--b23-primary); }
.b23-composer { border: 1px solid var(--b23-border); border-radius: 10px; padding: 10px; margin-bottom: 18px; background: #fbfcfd; }
.b23-composer textarea { border: 0; background: transparent; resize: vertical; padding: 4px; }
.b23-composer textarea:focus { outline: none; }
.b23-composer-foot { display: flex; justify-content: flex-end; }
.b23-feed { list-style: none; margin: 0; padding: 0 0 0 4px; position: relative; }
.b23-feed::before { content: ""; position: absolute; left: 17px; top: 8px; bottom: 8px; width: 2px; background: #e4e8ee; }
.b23-feed-item { display: grid; grid-template-columns: 30px 1fr; gap: 12px; padding: 8px 0; position: relative; font-size: 13.5px; }
.b23-feed-ico { width: 28px; height: 28px; border-radius: 50%; background: #eef1f5; display: grid; place-items: center; font-size: 13px; position: relative; z-index: 1; border: 2px solid var(--b23-surface); }
.b23-feed-item.is-note .b23-feed-ico { background: #fef3c7; }
.b23-feed-item.is-won .b23-feed-ico { background: #dcfce7; }
.b23-feed-item.is-lost .b23-feed-ico { background: #fee2e2; }
.b23-feed-item.is-created .b23-feed-ico { background: #fce7f3; }
.b23-feed-body { padding-top: 4px; min-width: 0; }
.b23-feed-body small { display: block; color: var(--b23-muted); font-size: 12px; margin-top: 3px; }
.b23-task-form { display: grid; grid-template-columns: 1fr 210px auto; gap: 8px; margin-bottom: 16px; }
.b23-tasks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.b23-tasks li { display: grid; grid-template-columns: 1fr auto 24px; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--b23-border); border-radius: 9px; }
.b23-tasks li label { display: flex; gap: 8px; align-items: center; cursor: pointer; font-weight: 500; }
.b23-tasks li small { color: var(--b23-muted); font-size: 12px; white-space: nowrap; }
.b23-tasks li.is-done label span { text-decoration: line-through; color: var(--b23-muted); }
.b23-tasks li.is-late { border-color: #fecdca; background: #fffafa; }
.b23-tasks li.is-late small { color: var(--b23-danger); font-weight: 600; }
.b23-tasks li .b23-kv-edit { opacity: .6; }
.b23-task-badge { font-size: 11.5px; padding: 1px 6px; border-radius: 5px; background: #eef1f5; color: #475467; font-weight: 600; }
.b23-task-badge.is-today { background: #fef3c7; color: #92400e; }
.b23-task-badge.is-late { background: #fee2e2; color: #b42318; }

@media (max-width: 900px) {
	.b23-deal-inner { padding: 14px 16px 32px; }
	.b23-deal-grid { grid-template-columns: 1fr; }
	.b23-deal-side { position: static; }
	.b23-deal-actions { width: 100%; }
	.b23-deal-actions .b23-btn { flex: 1; }
	.b23-deal-title h1 { font-size: 20px; }
	.b23-task-form { grid-template-columns: 1fr; }
	.b23-kv-edit { opacity: .6; }
}


/* ========================= v1.2 ========================= */
.b23-h2 { font-size: 18px; margin: 4px 0 12px; }
.b23-span { grid-column: 1 / -1; }
.b23-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.b23-tabbadge { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 999px; background: #f59e0b; color: #fff; font-size: 11px; line-height: 18px; text-align: center; margin-left: 4px; }
.b23-tabbadge.is-late { background: #dc2626; }
.b23-mute { background: none; border: 0; cursor: pointer; font-size: 15px; padding: 0 2px; }

/* Indicadores coloridos */
.b23-ind { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.b23-ind.is-good { background: #dcfce7; color: #166534; }
.b23-ind.is-mid { background: #fef3c7; color: #92400e; }
.b23-ind.is-bad { background: #fee2e2; color: #b91c1c; }
.b23-ind.is-na { background: #eef1f5; color: #667085; }
.b23-mini { display: inline-block; width: 46px; height: 5px; background: #eef1f5; border-radius: 3px; margin-left: 6px; vertical-align: middle; overflow: hidden; }
.b23-mini i { display: block; height: 100%; background: var(--b23-primary); }

/* Card: saúde, canal, relógio */
.b23-card-top { display: flex; align-items: center; gap: 6px; }
.b23-card-health { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12px; color: #344054; align-items: center; }
.b23-city { font-weight: 700; color: #0f172a; }
.b23-city.is-missing { color: #b42318; font-weight: 600; }
.b23-cnpj { font-size: 10.5px; font-weight: 800; padding: 1px 6px; border-radius: 4px; letter-spacing: .03em; }
.b23-cnpj.yes { background: #dbeafe; color: #1e40af; }
.b23-cnpj.no { background: #f3e8ff; color: #6b21a8; }
.b23-int-tag.is-plan { background: #e0e7ff; color: #3730a3; margin-left: 4px; }
.b23-int-tag { font-size: 11.5px; font-weight: 600; color: #0f766e; background: #ccfbf1; border-radius: 5px; padding: 1px 7px; }
.b23-ch { --ch: #667085; display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; color: #344054; white-space: nowrap; }
.b23-ch b { display: inline-grid; place-items: center; min-width: 22px; height: 18px; padding: 0 4px; border-radius: 5px; background: var(--ch); color: #fff; font-size: 10px; font-weight: 800; }
.b23-chips .b23-ch { border: 1px solid var(--b23-border); border-radius: 5px; padding: 2px 6px 2px 3px; }
.b23-clock-chip { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.b23-clock-chip.is-good { background: #dcfce7; color: #166534; }
.b23-clock-chip.is-mid { background: #fef3c7; color: #92400e; }
.b23-clock-chip.is-bad { background: #fee2e2; color: #b91c1c; }
.b23-clock-chip.is-run.is-bad { animation: b23pulse 1.4s infinite; }
@keyframes b23pulse { 50% { box-shadow: 0 0 0 4px rgba(220, 38, 38, .15); } }
.b23-chip-city { background: #0f172a; color: #fff; text-transform: none; letter-spacing: 0; font-size: 13px; }
.b23-chip-city.is-missing { background: #fee2e2; color: #b91c1c; }
.b23-box-health { border-top: 3px solid var(--b23-primary); }
.b23-city-big { font-size: 15px; }

/* Agenda */
.b23-agenda { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; align-items: start; }
.b23-agcol { background: #e9edf2; border-radius: 12px; padding: 10px; display: grid; gap: 8px; }
.b23-agcol header { display: flex; align-items: center; justify-content: space-between; padding: 4px 4px 2px; }
.b23-agcol h3 { margin: 0; font-size: 14px; }
.b23-agcol.is-late { background: #fde8e8; }
.b23-agcol.is-today { background: #fef6dc; }
.b23-agitem { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: start; background: #fff; border: 1px solid var(--b23-border); border-radius: 9px; padding: 10px; cursor: pointer; }
.b23-agitem:hover { border-color: #c5ccd6; }
.b23-agbody { display: grid; gap: 2px; font-size: 13px; min-width: 0; }
.b23-agbody span, .b23-agbody small { color: var(--b23-muted); }
.b23-agempty { text-align: center; padding: 14px 0; margin: 0; }

/* Dashboard */
.b23-kpi small { display: block; font-size: 12px; color: var(--b23-muted); margin-top: 2px; }
.b23-kpi.is-bad strong { color: #b91c1c; }
.b23-kpi.is-good strong { color: #166534; }
.b23-gauges { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 16px; }
.b23-gauge { background: var(--b23-surface); border: 1px solid var(--b23-border); border-radius: 12px; padding: 14px; text-align: center; display: grid; justify-items: center; gap: 2px; }
.b23-gauge svg { width: 150px; height: 84px; }
.b23-gauge .trk { fill: none; stroke: #eef1f5; stroke-width: 12; stroke-linecap: round; }
.b23-gauge .val { fill: none; stroke: #98a2b3; stroke-width: 12; stroke-linecap: round; transition: stroke-dasharray .6s; }
.b23-gauge.is-good .val { stroke: #16a34a; } .b23-gauge.is-mid .val { stroke: #f59e0b; } .b23-gauge.is-bad .val { stroke: #dc2626; }
.b23-gauge strong { font-size: 26px; margin-top: -30px; font-variant-numeric: tabular-nums; }
.b23-gauge.is-good strong { color: #166534; } .b23-gauge.is-mid strong { color: #92400e; } .b23-gauge.is-bad strong { color: #b91c1c; }
.b23-gauge span { font-weight: 600; }
.b23-gauge small { color: var(--b23-muted); font-size: 12px; }
.b23-clock { font-size: 34px; line-height: 1; height: 54px; display: grid; place-items: center; }
.b23-gauge .b23-clock + strong { margin-top: 0; }
.b23-funnel { display: grid; gap: 6px; justify-items: center; }
.b23-fstep { --c: #64748b; background: var(--c); color: #fff; border-radius: 8px; padding: 8px 12px; display: flex; align-items: center; gap: 8px; min-width: 180px; transition: width .4s; }
.b23-fstep span { flex: 1; font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b23-fstep em { font-style: normal; font-size: 12px; opacity: .85; }
.b23-daychart { width: 100%; height: 170px; display: block; }
.b23-daychart .r { fill: color-mix(in srgb, var(--b23-primary) 30%, #fff); }
.b23-daychart .w { fill: #16a34a; }
.b23-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin: 0 4px 0 10px; vertical-align: -1px; }
.b23-legend i.r { background: color-mix(in srgb, var(--b23-primary) 30%, #fff); } .b23-legend i.w { background: #16a34a; }
.b23-rank td, .b23-rank th { text-align: center; } .b23-rank td:nth-child(2), .b23-rank th:nth-child(2) { text-align: left; }
.b23-legend-note { font-size: 12.5px; color: var(--b23-muted); margin-top: 14px; }
.b23-seg { display: inline-flex; flex-wrap: wrap; gap: 4px; background: #e9edf2; padding: 4px; border-radius: 10px; margin-bottom: 14px; }
.b23-seg button { border: 0; background: none; padding: 7px 12px; border-radius: 7px; cursor: pointer; font-weight: 600; color: #475467; }
.b23-seg button.is-active { background: #fff; color: var(--b23-primary); box-shadow: var(--b23-shadow); }
.b23-report-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.b23-report tfoot td { font-weight: 700; background: #f9fafb; }
.b23-report td, .b23-report th { text-align: center; } .b23-report td:first-child, .b23-report th:first-child { text-align: left; }

/* Fila + rodízio */
.b23-qteam { border: 1px solid var(--b23-border); border-radius: 10px; margin-top: 12px; overflow: hidden; }
.b23-qteam header { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: #f9fafb; flex-wrap: wrap; }
.b23-qteam .b23-spacer { flex: 1; }
.b23-qrow { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-top: 1px solid var(--b23-border); flex-wrap: wrap; }
.b23-qrow.is-off { background: #fafafa; } .b23-qrow.is-off .b23-qinfo strong { color: var(--b23-muted); }
.b23-qinfo { flex: 1; min-width: 160px; } .b23-qinfo small { display: block; color: var(--b23-muted); }
.b23-qstat { font-size: 12px; background: #eef1f5; border-radius: 999px; padding: 2px 8px; }
.b23-qstat.is-warn { background: #fee2e2; color: #b91c1c; font-weight: 600; }
.b23-qstate { font-size: 12px; font-weight: 700; width: 86px; text-align: right; }
.b23-switch { position: relative; display: inline-block; width: 40px; height: 22px; flex: 0 0 auto; }
.b23-switch input { opacity: 0; width: 0; height: 0; }
.b23-switch span { position: absolute; inset: 0; background: #d0d5dd; border-radius: 999px; cursor: pointer; transition: .2s; }
.b23-switch span::before { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.b23-switch input:checked + span { background: #16a34a; }
.b23-switch input:checked + span::before { transform: translateX(18px); }
.b23-sla-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .b23-sla-head h3 { margin: 0; }
.b23-days-pick { display: flex; gap: 4px; flex-wrap: wrap; }
.b23-days-pick label { cursor: pointer; } .b23-days-pick input { display: none; }
.b23-days-pick span { display: inline-block; padding: 6px 8px; border: 1px solid var(--b23-border); border-radius: 6px; font-weight: 500; font-size: 12.5px; }
.b23-days-pick input:checked + span { background: var(--b23-primary); border-color: var(--b23-primary); color: #fff; }

/* Integrações */
.b23-int-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.b23-int-head p { margin: 0; }
.b23-intgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.b23-int { background: #fff; border: 1px solid var(--b23-border); border-radius: 12px; padding: 14px; display: grid; gap: 10px; }
.b23-int.is-off { opacity: .7; }
.b23-int header { display: flex; align-items: center; gap: 10px; } .b23-int header > div { flex: 1; min-width: 0; }
.b23-int header small { display: block; color: var(--b23-muted); }
.b23-int-ico { width: 38px; height: 38px; border-radius: 9px; color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 14px; flex: 0 0 auto; }
.b23-int-flow { font-size: 13px; background: #f5f7fa; border-radius: 8px; padding: 8px 10px; }
.b23-int-url { display: flex; gap: 6px; } .b23-int-url input { font-family: ui-monospace, monospace; font-size: 12px; }
.b23-int-meta { font-size: 12px; color: var(--b23-muted); }
.b23-int footer { display: flex; gap: 6px; flex-wrap: wrap; }
.b23-typepick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.b23-typepick input { display: none; }
.b23-typepick span { display: flex; align-items: center; gap: 8px; border: 2px solid var(--b23-border); border-radius: 10px; padding: 10px; cursor: pointer; font-weight: 600; font-size: 13px; height: 100%; }
.b23-typepick b { width: 28px; height: 28px; border-radius: 7px; color: #fff; display: grid; place-items: center; font-size: 11px; flex: 0 0 auto; }
.b23-typepick input:checked + span { border-color: var(--b23-primary); background: color-mix(in srgb, var(--b23-primary) 6%, #fff); }
.b23-flow { border: 1px solid var(--b23-border); border-radius: 10px; padding: 12px 14px; display: grid; gap: 12px; }
.b23-flow legend { font-weight: 700; padding: 0 6px; }
.b23-flow h4 { margin: 4px 0 0; font-size: 13.5px; }
.b23-flowline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--b23-muted); }
.b23-flownode { background: #eef4ff; color: #1e3a8a; border-radius: 6px; padding: 4px 9px; font-weight: 600; }
.b23-rule { display: grid; grid-template-columns: 150px 1fr 120px 1fr 32px; gap: 6px; margin-bottom: 6px; }
.b23-help ol { padding-left: 20px; } .b23-help li { margin-bottom: 6px; }
.b23-help code { background: #f2f4f7; padding: 1px 5px; border-radius: 4px; font-size: 12px; word-break: break-all; }
.b23-aibox { border-left: 4px solid #a855f7; }

/* IA na ficha */
.b23-aiask { display: flex; gap: 8px; margin-bottom: 14px; }
.b23-ai { display: grid; gap: 10px; }
.b23-ai h4 { margin: 6px 0 0; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--b23-muted); }
.b23-ai ul { margin: 0; padding-left: 18px; }
.b23-ai-sum { display: flex; gap: 10px; align-items: flex-start; background: #faf5ff; border: 1px solid #e9d5ff; border-radius: 10px; padding: 12px; }
.b23-ai-sum p { margin: 0; }
.b23-ai-reply { border: 1px solid var(--b23-border); border-radius: 10px; padding: 10px 12px; display: grid; gap: 8px; }
.b23-ai-reply p { margin: 0; white-space: pre-wrap; }
.b23-ai-reply div { display: flex; gap: 6px; }
.b23-ai-alerts li { color: #b42318; }

/* Usuários e pacote */
.b23-licbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: #f5f7fa; border-radius: 8px; padding: 8px 12px; margin-bottom: 8px; font-size: 13px; }
.b23-licbar .b23-mini { width: 120px; height: 7px; }
.b23-licbar.is-full { background: #fef3f2; color: #b42318; }
.b23-pill-wait { background: #fef3c7; color: #92400e; }
.b23-role-admin { background: #0f172a; color: #fff; } .b23-role-manager { background: #dbeafe; color: #1e40af; }
.b23-role-supervisor { background: #ede9fe; color: #5b21b6; } .b23-role-consultant { background: #eef1f5; color: #344054; }
.b23-listgrid { display: grid; gap: 0; }
.b23-stage-row.is-off input[type=text] { color: var(--b23-muted); text-decoration: line-through; }
.b23-stage-row .b23-check { font-size: 12.5px; }

/* Confete */
.b23-confetti { position: fixed; inset: 0; pointer-events: none; z-index: 100; }

/* Impressão de relatórios (PDF pelo navegador) */
@media print {
	.b23-top, .b23-toolbar, .b23-seg, .b23-credit, .b23-toast, .b23-deal, .b23-modal { display: none !important; }
	body { background: #fff; }
	.b23-main { padding: 0; }
	.b23-panel, .b23-kpi, .b23-gauge, .b23-table-wrap { break-inside: avoid; box-shadow: none; }
	.b23-ind { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

@media (max-width: 900px) {
	.b23-agenda { grid-template-columns: 1fr; }
	.b23-grid-3 { grid-template-columns: 1fr; }
	.b23-typepick { grid-template-columns: 1fr; }
	.b23-rule { grid-template-columns: 1fr 1fr; }
	.b23-intgrid { grid-template-columns: 1fr; }
	.b23-aiask { flex-direction: column; }
}


/* Card: equipe e responsável (rodapé) */
.b23-card-team { display: flex; justify-content: space-between; align-items: center; gap: 6px; border-top: 1px dashed var(--b23-border); margin-top: 4px; padding-top: 6px; font-size: 11.5px; color: #475467; }
.b23-owner { background: #fee4e2; color: #b42318; border-radius: 999px; padding: 1px 8px; font-weight: 600; max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b23-owner { background: color-mix(in srgb, var(--b23-primary) 12%, #fff); color: color-mix(in srgb, var(--b23-primary) 80%, #000); }
.b23-owner.is-none { background: #fef3c7; color: #92400e; }

/* Filtros recolhíveis */
.b23-more { display: contents; }
.b23-more[hidden] { display: none !important; }
.b23-filterbtn.is-on { border-color: var(--b23-primary); color: var(--b23-primary); }
body.b23-page-app .b23-credit { padding-left: 80px; }

/* ---------- Barra lateral expansível ---------- */
.b23-app { display: flex; flex-direction: row; min-height: 100vh; }
.b23-shell { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.b23-side { --w: 64px; width: var(--w); flex: 0 0 var(--w); background: var(--b23-dark); color: #fff; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 10px 8px; gap: 6px; transition: width .2s, flex-basis .2s; z-index: 30; overflow: hidden; }
.b23-app.is-expanded .b23-side { --w: 232px; }
.b23-side-toggle, .b23-burger { background: none; border: 0; color: rgba(255,255,255,.8); cursor: pointer; width: 48px; height: 40px; border-radius: 10px; display: grid; place-items: center; }
.b23-side-toggle:hover { background: rgba(255,255,255,.08); color: #fff; }
.b23-side svg, .b23-burger svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.b23-side .b23-tabs { display: flex; flex-direction: column; gap: 4px; flex: 1; overflow: visible; }
.b23-side .b23-tabs button { display: flex; align-items: center; gap: 12px; width: 100%; height: 44px; padding: 0 14px; border-radius: 10px; color: rgba(255,255,255,.72); background: none; border: 0; cursor: pointer; font-weight: 600; text-align: left; white-space: nowrap; position: relative; }
.b23-side .b23-tabs button:hover { background: rgba(255,255,255,.08); color: #fff; }
.b23-side .b23-tabs button.is-active { background: var(--b23-primary); color: #fff; }
.b23-side-label { opacity: 0; transition: opacity .15s; overflow: hidden; }
.b23-app.is-expanded .b23-side-label { opacity: 1; }
.b23-app:not(.is-expanded) .b23-side .b23-tabbadge { position: absolute; top: 4px; right: 4px; margin: 0; }
.b23-top { background: var(--b23-surface); color: var(--b23-text); border-bottom: 1px solid var(--b23-border); }
.b23-top-title { font-weight: 700; font-size: 15px; flex: 1; }
.b23-top-user .b23-link-small { color: var(--b23-muted); }
.b23-top-user .b23-link-small:hover { color: var(--b23-text); }
.b23-top-brand strong { color: var(--b23-dark); }
.b23-burger { display: none; color: var(--b23-text); }
.b23-side-backdrop { display: none; }
.b23-board { height: calc(100vh - 58px - 36px - 70px - 40px); }
@media (max-width: 760px) {
	.b23-side { position: fixed; left: 0; top: 0; bottom: 0; --w: 240px; transform: translateX(-100%); transition: transform .2s; }
	.b23-side .b23-side-label { opacity: 1; }
	.b23-side-toggle { display: none; }
	body.b23-side-open .b23-side { transform: none; }
	body.b23-side-open .b23-side-backdrop { display: block; position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 25; }
	.b23-burger { display: grid; width: 40px; }
	.b23-top { flex-wrap: nowrap; height: 56px; padding: 0 10px; }
	.b23-top-title { display: none; }
	.b23-board { height: calc(100vh - 56px - 160px); }
}


/* ========================= v1.3 ========================= */
/* Ícones SVG */
.b23-ico { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; flex: 0 0 auto; }
.b23-city, .b23-phone, .b23-lives { display: inline-flex; align-items: center; gap: 3px; }
.b23-city .b23-ico { color: #e11d48; }
.b23-city.is-missing .b23-ico { color: #b42318; }
.b23-btn .b23-ico { width: 16px; height: 16px; }
.b23-panel h3 .b23-ico { color: #e11d48; }

/* Botões de conexão em ícones */
.b23-cicons { display: inline-flex; gap: 4px; }
.b23-cico { width: 26px; height: 26px; border-radius: 8px; display: inline-grid; place-items: center; border: 1px solid var(--b23-border); background: #fff; color: #475467; text-decoration: none; transition: .15s; }
.b23-cico .b23-ico { width: 15px; height: 15px; vertical-align: 0; }
.b23-cico.is-wa { color: #16a34a; } .b23-cico.is-wa:hover { background: #25d366; border-color: #25d366; color: #fff; }
.b23-cico.is-call { color: #2563eb; } .b23-cico.is-call:hover { background: #2563eb; border-color: #2563eb; color: #fff; }
.b23-cico.is-mail { color: #7c3aed; } .b23-cico.is-mail:hover { background: #7c3aed; border-color: #7c3aed; color: #fff; }

/* Relógio rodando: sempre vermelho */
.b23-clock-chip.is-run { background: #dc2626; color: #fff; }
.b23-clock-chip.is-run { animation: b23pulse 1.6s infinite; }

/* Colunas: cabem na tela (100% do Chrome) */
.b23-board { gap: 10px; }
.b23-col { flex: 1 1 0; min-width: 210px; max-width: 320px; background: var(--colbg, #e9edf2); }
.b23-col-head { flex-wrap: wrap; row-gap: 2px; padding: 10px 10px 6px; font-size: 13px; }
.b23-col-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.b23-col-head .b23-badge { margin-left: 0; }
.b23-col-total { flex-basis: 100%; font-size: 12px; font-weight: 800; color: var(--stage); filter: brightness(.7); font-variant-numeric: tabular-nums; }
.b23-col-total.is-zero { visibility: hidden; height: 0; }
.b23-col-body { padding: 4px 6px 8px; gap: 6px; }
.b23-card { padding: 8px 9px; border-left: 3px solid var(--tone, var(--b23-border)); font-size: 12.5px; gap: 3px; }
.b23-card-name { font-size: 13px; }
.b23-card-prop { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; font-size: 12px; background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; border-radius: 6px; padding: 2px 6px; }
.b23-card-prop span { color: #15803d; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.b23-card-foot { margin-top: 2px; }
@media (min-width: 761px) and (max-width: 1400px) { .b23-col { min-width: 200px; } }

/* Proposta na ficha */
.b23-box-prop { border-top: 3px solid #16a34a; }
.b23-box-prop h3 { display: flex; justify-content: space-between; align-items: center; }
.b23-prop-val { font-size: 24px; font-weight: 800; color: #166534; margin: 2px 6px 6px; font-variant-numeric: tabular-nums; }

/* Edição em linha suave */
.b23-inline { display: flex; align-items: center; gap: 4px; width: 100%; }
.b23-inline input, .b23-inline select { height: 30px; padding: 3px 8px; font-size: 13px; border-radius: 7px; border: 1px solid #d0d5dd; background: #fff; flex: 1; min-width: 0; box-shadow: none; }
.b23-inline input:focus, .b23-inline select:focus { outline: none; border-color: var(--b23-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--b23-primary) 15%, transparent); }
.b23-inline input[type=number] { -moz-appearance: textfield; }
.b23-inline input[type=number]::-webkit-outer-spin-button, .b23-inline input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.b23-ibtn { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--b23-border); background: #fff; color: #667085; display: grid; place-items: center; cursor: pointer; flex: 0 0 auto; padding: 0; }
.b23-ibtn .b23-ico { width: 14px; height: 14px; vertical-align: 0; }
.b23-ibtn.is-ok { background: var(--b23-primary); border-color: var(--b23-primary); color: #fff; }
.b23-ibtn:hover { filter: brightness(.95); }
.b23-kv.is-editing { background: #f8fafc; }

/* Aparência (paleta) */
.b23-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.b23-swatch { display: inline-flex; align-items: center; gap: 6px; border: 2px solid var(--b23-border); background: #fff; border-radius: 999px; padding: 4px 10px 4px 4px; cursor: pointer; font-size: 12.5px; font-weight: 600; }
.b23-swatch i { width: 20px; height: 20px; border-radius: 50%; display: inline-block; }
.b23-swatch.is-on { border-color: #0f172a; }
.b23-swatch-custom input { width: 22px; height: 22px; border: 0; padding: 0; border-radius: 50%; background: none; }
.b23-tonebar { display: flex; margin-top: 10px; border-radius: 8px; overflow: hidden; }
.b23-tonebar span { flex: 1; padding: 8px 6px; font-size: 11.5px; font-weight: 700; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.25); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Tarefas com motivo */
.b23-task-form { grid-template-columns: 170px 1fr 200px auto; }
@media (max-width: 900px) { .b23-task-form { grid-template-columns: 1fr; } }

/* Catálogo de integrações com logos */
.b23-catalog { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.b23-cat { background: #fff; border: 1px solid var(--b23-border); border-radius: 12px; padding: 14px; display: grid; justify-items: center; gap: 4px; text-align: center; }
.b23-cat-logo { height: 92px; width: 100%; display: grid; place-items: center; border-top: 1px solid var(--b23-border); border-bottom: 1px solid var(--b23-border); margin-bottom: 8px; }
.b23-cat small { color: var(--b23-muted); font-size: 12px; }
.b23-cat-actions { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; justify-content: center; }
.b23-btn-dark { background: #3f3f46; border-color: #3f3f46; color: #fff; }
.b23-intlogo { max-height: 38px; max-width: 120px; object-fit: contain; }
.b23-intlogo.is-big { max-height: 64px; max-width: 170px; }
.b23-int-ico.is-big { width: 58px; height: 58px; font-size: 20px; border-radius: 14px; }
.b23-typepick { grid-template-columns: repeat(4, 1fr); }
.b23-typepick .b23-intlogo { max-height: 22px; max-width: 70px; }
.b23-typepick .b23-int-ico { width: 26px; height: 26px; font-size: 11px; border-radius: 7px; }

/* Ajustes de encaixe (nada vaza do card) */
.b23-card { overflow: hidden; min-width: 0; flex-shrink: 0; }
.b23-card > * { min-width: 0; }
.b23-card-line { min-width: 0; }
.b23-card .b23-tag, .b23-card .b23-int-tag { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: middle; }
.b23-card-foot { flex-wrap: wrap; row-gap: 4px; }
.b23-card-foot > span:first-child { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.b23-card-prop { max-width: 100%; }
.b23-card-team .b23-owner { max-width: 60%; }
.b23-kv > * { min-width: 0; }
.b23-kv.is-editing { grid-template-columns: 38% minmax(0, 1fr); }
.b23-inline input, .b23-inline select { width: 100%; }

/* Venda / perda: fundo cheio, letra branca */
.b23-btn-won, .b23-btn-won:hover { background: #16a34a; border-color: #16a34a; color: #fff; }
.b23-btn-won:hover { filter: brightness(.93); }
.b23-btn-lost, .b23-btn-lost:hover { background: #dc2626; border-color: #dc2626; color: #fff; }
.b23-btn-lost:hover { filter: brightness(.93); }

/* Compositor de WhatsApp */
.b23-mhead h2 .b23-ico { color: #16a34a; width: 20px; height: 20px; vertical-align: -4px; }
.b23-wa { display: grid; gap: 10px; }
.b23-wa-bar { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; background: #f2f4f7; border-radius: 10px; padding: 5px; }
.b23-wa-bar button { min-width: 32px; height: 30px; border: 0; background: #fff; border-radius: 7px; cursor: pointer; font-size: 14px; padding: 0 8px; box-shadow: 0 1px 1px rgba(0,0,0,.05); }
.b23-wa-bar button:hover { background: #e6f7ec; }
.b23-wa-sep { width: 1px; height: 20px; background: #d0d5dd; margin: 0 2px; }
.b23-emojis { display: grid; grid-template-columns: repeat(auto-fill, minmax(34px, 1fr)); gap: 2px; max-height: 150px; overflow-y: auto; border: 1px solid var(--b23-border); border-radius: 10px; padding: 6px; }
.b23-emojis button { border: 0; background: none; font-size: 20px; cursor: pointer; border-radius: 6px; height: 34px; }
.b23-emojis button:hover { background: #f2f4f7; }
.b23-wa textarea { resize: vertical; font-size: 14.5px; line-height: 1.45; }
.b23-wa-hint { margin: -4px 0 0; font-size: 12px; color: var(--b23-muted); }
.b23-wa-preview { background: #efeae2; border-radius: 10px; padding: 10px 12px; }
.b23-wa-preview > span { display: block; font-size: 11px; color: #667085; margin-bottom: 4px; }
.b23-wa-bubble { background: #d9fdd3; border-radius: 8px 0 8px 8px; padding: 8px 10px; font-size: 14px; line-height: 1.45; word-break: break-word; box-shadow: 0 1px 1px rgba(0,0,0,.08); margin-left: auto; max-width: 92%; width: fit-content; }
.b23-wa-bubble code { font-family: ui-monospace, monospace; font-size: 13px; }
.b23-wa-bubble.is-hist { margin: 6px 0 0; font-size: 13px; }

/* Plano (upgrade) */
.b23-plan-cur { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.b23-plan-cur span { display: block; font-size: 12px; color: var(--b23-muted); }
.b23-plan-cur strong { font-size: 20px; }
.b23-plan-use .b23-mini { width: 180px; height: 7px; margin: 4px 0 0; }
.b23-upgrades { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.b23-up { border: 1px solid var(--b23-border); border-radius: 12px; padding: 12px; display: grid; gap: 4px; justify-items: start; }
.b23-up > span { font-size: 20px; font-weight: 800; color: var(--b23-primary); }
.b23-up > span small { font-size: 12px; font-weight: 500; color: var(--b23-muted); }
.b23-up > small { color: var(--b23-muted); font-size: 12px; }
.b23-up.is-pending { border-color: #f59e0b; background: #fffbeb; }
.b23-plan-down { margin: 14px 0 0; font-size: 13px; color: #475467; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---------- Toast ---------- */
.b23-toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: #1c2430; color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 60; font-size: 13px; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); max-width: calc(100% - 32px); }
.b23-toast.is-error { background: var(--b23-danger); }

/* ---------- Celular ---------- */
@media (max-width: 760px) {
	.b23-top { height: auto; flex-wrap: wrap; padding: 10px 16px; gap: 8px 12px; }
	.b23-top-brand { flex: 1; }
	.b23-user-name { display: none; }
	.b23-main { padding: 14px 16px; }
	.b23-board { height: calc(100vh - 110px - 110px); scroll-snap-type: x mandatory; gap: 10px; }
	.b23-col { flex-basis: 85vw; scroll-snap-align: start; }
	.b23-toolbar input[type=search], .b23-toolbar select, .b23-toolbar input[type=date] { max-width: none; flex: 1 1 140px; }
	.b23-grid-2 { grid-template-columns: 1fr; }
	.b23-mhead, .b23-mbody { padding-left: 16px; padding-right: 16px; }
}

/* Presets de período */
.b23-toolbar .b23-dates { display: inline-flex; gap: 8px; align-items: center; }
.b23-toolbar .b23-dates[hidden] { display: none; }
.b23-toolbar select[data-period] { min-width: 170px; }
@media (max-width: 640px) { .b23-toolbar .b23-dates { flex: 1 1 100%; } .b23-toolbar .b23-dates input { flex: 1 1 0; } }

/* Lista: seleção em massa e paginação */
.b23-table th.b23-ck, .b23-table td.b23-ck { width: 36px; padding-right: 0; }
.b23-ck input { width: 16px; height: 16px; cursor: pointer; accent-color: var(--b23-primary); }
.b23-table tr.is-sel td { background: color-mix(in srgb, var(--b23-primary) 7%, transparent); }
.b23-bulkbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 10px 14px; margin-bottom: 10px; border-radius: var(--b23-radius); background: color-mix(in srgb, var(--b23-primary) 9%, var(--b23-surface)); border: 1px solid color-mix(in srgb, var(--b23-primary) 25%, transparent); position: sticky; top: 0; z-index: 5; }
.b23-bulkbar[hidden] { display: none; }
.b23-bulkbar .b23-spacer { flex: 1; }
.b23-linkbtn { background: none; border: 0; padding: 0; color: var(--b23-primary); font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.b23-bulkbar .b23-btn-danger { background: var(--b23-danger); border-color: var(--b23-danger); color: #fff; }
.b23-bulkbar .b23-btn-danger:hover { filter: brightness(.92); }
.b23-pager { flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.b23-perpage { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--b23-muted); }
.b23-perpage select { width: auto; min-width: 0; padding: 4px 8px; }
.b23-pgnav { display: inline-flex; align-items: center; gap: 4px; }
.b23-pgnum { min-width: 34px; height: 34px; padding: 0 8px; border: 1px solid var(--b23-border); border-radius: 8px; background: var(--b23-surface); color: var(--b23-text); font: inherit; font-size: 13px; cursor: pointer; }
.b23-pgnum:hover:not(:disabled) { border-color: var(--b23-primary); color: var(--b23-primary); }
.b23-pgnum.is-active { background: var(--b23-primary); border-color: var(--b23-primary); color: #fff; font-weight: 700; }
.b23-pgnum:disabled { opacity: .4; cursor: default; }
.b23-pgdots { padding: 0 4px; color: var(--b23-muted); }
@media (max-width: 640px) { .b23-pager { justify-content: center; } .b23-bulkbar .b23-spacer { display: none; } }

/* Lixeira e detalhes da proposta */
.b23-btn-danger-solid { background: var(--b23-danger); border-color: var(--b23-danger); color: #fff; }
.b23-btn-danger-solid:hover { filter: brightness(.92); }
.b23-btn[hidden] { display: none; }
.b23-prop-notes { padding: 8px 6px 2px; }
.b23-prop-notes p { margin: 4px 0 0; font-size: 13px; line-height: 1.5; white-space: normal; color: var(--b23-text); }

/* Compositor de e-mail */
.b23-mail { gap: 12px; }
.b23-mail-from { display: flex; gap: 10px; align-items: baseline; font-size: 13px; padding: 8px 12px; border-radius: 10px; background: var(--b23-bg); }
.b23-mail-from span { color: var(--b23-muted); }
.b23-mail textarea[name=body] { min-height: 160px; }
.b23-mail .b23-wa-bar { margin-bottom: -6px; }
.b23-mail-att { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 12px; }
.b23-mail-att label.b23-btn { cursor: pointer; }
.b23-mail-att ul { flex-basis: 100%; list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.b23-mail-att li { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 6px 10px; border: 1px solid var(--b23-border); border-radius: 8px; }
.b23-mail-att li small { color: var(--b23-muted); }
.b23-mail-att li button { margin-left: auto; border: 0; background: none; font-size: 18px; line-height: 1; cursor: pointer; color: var(--b23-muted); }
.b23-mail-att li.is-bad { color: var(--b23-danger); border-color: var(--b23-danger); }
.b23-mail-sig summary { cursor: pointer; font-weight: 600; font-size: 13px; padding: 4px 0; }
.b23-mail-sig textarea { margin-top: 8px; }
.b23-mail-prev > span { display: block; font-size: 12px; color: var(--b23-muted); margin-bottom: 6px; }
.b23-sig { display: flex; align-items: center; gap: 16px; padding-top: 12px; border-top: 2px solid var(--b23-primary); }
.b23-sig img { max-width: 120px; max-height: 60px; object-fit: contain; }
.b23-sig strong { display: block; font-size: 14px; }
.b23-sig span { display: block; font-size: 12px; color: var(--b23-muted); }

/* Twilio */
.b23-tw { display: grid; gap: 10px; margin-top: 4px; }
.b23-tw-win { font-size: 12.5px; padding: 8px 12px; border-radius: 10px; }
.b23-tw-win.is-open { background: #ecfdf3; color: #05603a; }
.b23-tw-win.is-closed { background: #fff6ed; color: #93370d; }
.b23-tw-mode { justify-self: start; }
.b23-tw-tpl { display: grid; gap: 10px; }
.b23-tw-tpl[hidden] { display: none; }
.b23-tw-tpl label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; }
.b23-wa.is-tplmode > .b23-wa-bar, .b23-wa.is-tplmode > textarea, .b23-wa.is-tplmode > .b23-wa-hint, .b23-wa.is-tplmode > .b23-wa-preview, .b23-wa.is-tplmode > .b23-emojis { display: none; }
.b23-tplrow { display: grid; grid-template-columns: 1fr 1.2fr 1fr auto; gap: 8px; align-items: start; padding: 10px 0; border-bottom: 1px dashed var(--b23-border); }
.b23-tplrow textarea { grid-column: 1 / 4; }
.b23-tplrow [data-tdel] { grid-column: 4; grid-row: 1; }
@media (max-width: 640px) { .b23-tplrow { grid-template-columns: 1fr; } .b23-tplrow textarea, .b23-tplrow [data-tdel] { grid-column: auto; grid-row: auto; } }
.b23-int-url > span { font-size: 12px; color: var(--b23-muted); white-space: nowrap; }
#b23-channels .b23-cat .b23-ind { justify-self: center; margin-top: 2px; }
/* E-mail sem spam */
.b23-dnsbox { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--b23-border); }
.b23-dnshead { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.b23-dnshead h3 { margin: 0 auto 0 0; font-size: 15px; }
.b23-dnshead input { width: auto; flex: 1 1 140px; }
.b23-dns { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.b23-dns li { display: grid; grid-template-columns: 90px 1fr; gap: 10px; font-size: 13px; padding: 8px 10px; border-radius: 8px; }
.b23-dns li.is-ok { background: #ecfdf3; } .b23-dns li.is-ok strong { color: #067647; }
.b23-dns li.is-bad { background: #fef3f2; } .b23-dns li.is-bad strong { color: #b42318; }
.b23-dns code { word-break: break-all; font-size: 12px; }
.b23-int-ico .b23-ico { width: 20px; height: 20px; stroke: #fff; }
.b23-int-ico.is-big .b23-ico { width: 30px; height: 30px; }

/* Logos das integrações: envio */
.b23-cat-logo { position: relative; }
.b23-logo-up { position: absolute; top: 4px; right: 4px; font-size: 11px; padding: 2px 7px; border-radius: 999px; border: 1px solid var(--b23-border); background: var(--b23-surface); color: var(--b23-muted); cursor: pointer; opacity: 0; transition: opacity .15s; }
.b23-cat:hover .b23-logo-up, .b23-logo-up:focus { opacity: 1; }
@media (hover: none) { .b23-logo-up { opacity: 1; } }
/* Histórico: WhatsApp recebido e gravação */
.b23-wa-bubble.is-in { background: #fff; border: 1px solid var(--b23-border); }
.b23-rec { display: block; width: 100%; max-width: 360px; height: 34px; margin-top: 6px; }
/* Softphone */
.b23-softphone { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 9998; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 16px; background: #101828; color: #fff; box-shadow: 0 12px 40px rgba(0,0,0,.3); max-width: calc(100vw - 32px); }
.b23-softphone[hidden] { display: none; }
.b23-sp-who { display: flex; align-items: center; gap: 10px; }
.b23-sp-who .b23-ico { width: 22px; height: 22px; stroke: #4ade80; }
.b23-sp-who strong { display: block; font-size: 14px; } .b23-sp-who small { color: #98a2b3; font-size: 12px; }
.b23-sp-st { font-size: 12px; color: #d0d5dd; } .b23-sp-st.is-bad { color: #fda29b; }
.b23-sp-t { font-variant-numeric: tabular-nums; font-weight: 700; min-width: 48px; }
.b23-softphone .b23-btn:not(.b23-btn-danger-solid) { background: #1d2939; border-color: #344054; color: #fff; }
.b23-softphone .b23-btn.is-on { background: #b42318; border-color: #b42318; }
.b23-sp-keys { flex-basis: 100%; display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.b23-sp-keys[hidden] { display: none; }
.b23-sp-keys button { padding: 8px 0; border-radius: 8px; border: 1px solid #344054; background: #1d2939; color: #fff; font-size: 16px; cursor: pointer; }

/* Central de avisos */
.b23-alerts-wrap { position: relative; }
.b23-bell { position: relative; width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 10px; background: transparent; color: inherit; cursor: pointer; }
.b23-bell:hover { background: rgba(127,127,127,.12); }
.b23-bell svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.b23-bell.has-new svg { animation: b23-ring 1.6s ease-in-out 2; transform-origin: 50% 10%; }
@keyframes b23-ring { 0%,100% { transform: rotate(0); } 10%,30% { transform: rotate(14deg); } 20%,40% { transform: rotate(-14deg); } 50% { transform: rotate(0); } }
.b23-bell-n { position: absolute; top: -3px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #e11d48; color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px var(--b23-surface); }
.b23-bell-n[hidden] { display: none; }
.b23-alerts { position: absolute; right: -60px; top: calc(100% + 8px); z-index: 9990; width: 380px; max-width: calc(100vw - 24px); max-height: min(560px, calc(100vh - 90px)); display: flex; flex-direction: column; background: var(--b23-surface); color: var(--b23-text); border: 1px solid var(--b23-border); border-radius: 14px; box-shadow: 0 18px 50px rgba(16,24,40,.18); overflow: hidden; }
.b23-alerts[hidden] { display: none; }
.b23-al-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--b23-border); }
.b23-al-head strong { font-size: 15px; }
.b23-al-tabs { margin-left: auto; } .b23-al-tabs button { font-size: 12px; padding: 4px 10px; }
.b23-al-gear { border: 0; background: none; font-size: 16px; cursor: pointer; color: var(--b23-muted); }
.b23-al-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; }
.b23-al-item { display: flex; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--b23-border); cursor: pointer; border-left: 3px solid transparent; }
.b23-al-item:hover { background: var(--b23-bg); }
.b23-al-item.is-unread { background: color-mix(in srgb, var(--b23-primary) 6%, transparent); }
.b23-al-item.is-unread strong::after { content: ''; display: inline-block; width: 7px; height: 7px; margin-left: 6px; border-radius: 50%; background: var(--b23-primary); vertical-align: middle; }
.b23-al-item.is-bad { border-left-color: #e11d48; } .b23-al-item.is-warn { border-left-color: #f59e0b; } .b23-al-item.is-good { border-left-color: #16a34a; } .b23-al-item.is-new { border-left-color: var(--b23-primary); }
.b23-al-ico { font-size: 18px; line-height: 1.2; flex: 0 0 22px; text-align: center; }
.b23-al-item strong { display: block; font-size: 13.5px; }
.b23-al-item span { display: block; font-size: 12.5px; color: var(--b23-muted); margin-top: 1px; }
.b23-al-item small { display: block; font-size: 11.5px; color: var(--b23-muted); margin-top: 3px; }
.b23-al-empty { padding: 28px 14px; text-align: center; color: var(--b23-muted); margin: 0; }
.b23-al-foot { padding: 10px 14px; border-top: 1px solid var(--b23-border); text-align: center; font-size: 13px; }
.b23-al-prefs { padding: 12px 14px; display: grid; gap: 8px; overflow-y: auto; font-size: 13px; }
.b23-al-prefs p { margin: 0; } .b23-al-prefs hr { border: 0; border-top: 1px solid var(--b23-border); margin: 4px 0; width: 100%; }
@media (max-width: 640px) { .b23-alerts { position: fixed; left: 12px; right: 12px; top: 60px; width: auto; } }

/* =====================================================================
 * Versão mobile (celular)
 * ================================================================== */
.b23-mnav, .b23-mcontact { display: none; }
.b23-install { display: none; }
@media (max-width: 760px) {
	/* Barra de navegação inferior */
	.b23-mnav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 9000; background: var(--b23-surface); border-top: 1px solid var(--b23-border); padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); box-shadow: 0 -4px 18px rgba(16,24,40,.06); }
	.b23-mnav button { position: relative; display: grid; justify-items: center; gap: 2px; padding: 6px 2px; border: 0; background: none; color: var(--b23-muted); font: inherit; font-size: 10.5px; font-weight: 600; cursor: pointer; border-radius: 10px; }
	.b23-mnav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
	.b23-mnav button.is-active { color: var(--b23-primary); }
	.b23-mnav button.is-active svg { stroke-width: 2.2; }
	.b23-mnav .b23-tabbadge { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 16px; height: 16px; font-size: 10px; line-height: 16px; padding: 0 4px; }
	body.b23-page-app { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
	.b23-burger { display: none !important; }
	.b23-user-name, .b23-mute { display: none; }
	.b23-top { position: sticky; top: 0; z-index: 50; padding-top: env(safe-area-inset-top); }
	.b23-main { padding: 12px 12px 20px; }

	/* Barra de filtros: busca em linha cheia, botões compactos */
	.b23-toolbar { gap: 6px; }
	.b23-toolbar input[type=search] { flex: 1 1 100%; max-width: none; }
	.b23-toolbar .b23-spacer { display: none; }
	.b23-toolbar .b23-btn { padding: 8px 10px; }
	.b23-toolbar [data-new] { position: fixed; right: 16px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 8000; border-radius: 999px; padding: 12px 18px; box-shadow: 0 8px 24px rgba(15,98,254,.35); }

	/* Cards (Kanban): uma coluna por tela, deslizando para o lado */
	.b23-board { scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; gap: 10px; padding-bottom: 8px; }
	.b23-board > * { scroll-snap-align: start; flex: 0 0 86vw !important; width: 86vw !important; max-width: 86vw !important; }

	/* Lista vira cartões */
	.b23-list-table thead { display: none; }
	.b23-list-table, .b23-list-table tbody { display: block; }
	.b23-list-table tr { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 10px; padding: 12px; margin-bottom: 10px; border: 1px solid var(--b23-border); border-radius: 14px; background: var(--b23-surface); }
	.b23-list-table td { display: block; padding: 0; border: 0; white-space: normal; }
	.b23-list-table td.b23-ck { grid-row: 1 / span 2; align-self: start; padding-top: 2px; }
	.b23-list-table td.m-name { grid-column: 2; font-size: 15px; }
	.b23-list-table td.m-clock { grid-column: 3; grid-row: 1; justify-self: end; }
	.b23-list-table td.m-phone, .b23-list-table td.m-city, .b23-list-table td.m-stage, .b23-list-table td.m-owner, .b23-list-table td.m-ch { grid-column: 2 / span 2; font-size: 13px; color: var(--b23-muted); }
	.b23-list-table td.m-origin, .b23-list-table td.m-date, .b23-list-table td.m-value { display: none; }
	.b23-list-table td.m-owner::before { content: 'Responsável: '; }
	.b23-list-table td.m-icons { grid-column: 2 / span 2; margin-top: 4px; }
	.b23-list-table tr:not(:has(.b23-ck)) td.m-name, .b23-list-table tr:not(:has(.b23-ck)) td.m-phone, .b23-list-table tr:not(:has(.b23-ck)) td.m-city, .b23-list-table tr:not(:has(.b23-ck)) td.m-stage, .b23-list-table tr:not(:has(.b23-ck)) td.m-owner, .b23-list-table tr:not(:has(.b23-ck)) td.m-ch, .b23-list-table tr:not(:has(.b23-ck)) td.m-icons { grid-column: 1 / span 2; }
	.b23-list-table tr.is-sel { border-color: var(--b23-primary); }
	.b23-table-wrap:has(.b23-list-table) { overflow: visible; border: 0; background: transparent; box-shadow: none; }
	.b23-bulkbar { position: sticky; top: 56px; }

	/* Ficha do lead */
	.b23-deal-head { flex-wrap: wrap; }
	.b23-deal-actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
	.b23-deal-actions .b23-btn { justify-content: center; }
	.b23-mcontact { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 9500; background: var(--b23-surface); border-top: 1px solid var(--b23-border); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); gap: 6px; }
	.b23-mcontact a { display: grid; justify-items: center; gap: 2px; padding: 6px 4px; border-radius: 10px; text-decoration: none; color: var(--b23-text); font-size: 11px; font-weight: 600; }
	.b23-mcontact a .b23-ico { width: 22px; height: 22px; }
	.b23-mcontact a.is-wa { background: #25d366; color: #fff; }
	.b23-deal-inner { padding-top: calc(18px + env(safe-area-inset-top)); padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
	/* A ficha abre por cima da barra do topo (o nome do cliente não fica escondido). */
	.b23-deal { z-index: 60; }
	.b23-deal-head { align-items: flex-start; }
	.b23-deal-title h1 { font-size: 21px; line-height: 1.25; word-break: break-word; }
	body:has(.b23-deal:not([hidden])) .b23-mnav, body:has(.b23-deal:not([hidden])) .b23-toolbar [data-new] { display: none; }
	.b23-mcontact .b23-mc-ic { font-size: 20px; line-height: 22px; height: 22px; }

	/* Modais ocupam a tela */
	.b23-modal-panel { width: 100vw !important; max-width: 100vw !important; height: 100%; max-height: 100%; border-radius: 0 !important; }
	.b23-modal-panel.is-small { height: auto; max-height: 92vh; border-radius: 16px 16px 0 0 !important; align-self: end; }

	/* Avisos e softphone acima da barra inferior */
	.b23-softphone { bottom: calc(72px + env(safe-area-inset-bottom)); width: calc(100vw - 24px); }
	.b23-toast { bottom: calc(80px + env(safe-area-inset-bottom)) !important; }

	/* Convite para instalar */
	.b23-install { display: flex; align-items: center; gap: 10px; position: fixed; left: 12px; right: 12px; bottom: calc(74px + env(safe-area-inset-bottom)); z-index: 9600; padding: 12px 14px; border-radius: 14px; background: #101828; color: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.25); font-size: 13px; }
	.b23-install div { flex: 1; } .b23-install strong { display: block; font-size: 14px; } .b23-install span { color: #d0d5dd; }
	body:has(.b23-modal:not([hidden])) .b23-install, body:has(.b23-deal:not([hidden])) .b23-install { display: none; }
	.b23-install-x { border: 0; background: none; color: #98a2b3; font-size: 22px; cursor: pointer; }
}
@media (display-mode: standalone) { .b23-credit { display: none; } }

/* Base23 Forms — construtor */
.b23-modal-panel.is-wide { width: min(1240px, 96vw); max-width: 96vw; display: flex; flex-direction: column; }
.b23-fb { display: grid; grid-template-columns: 420px 1fr; gap: 0; padding: 0 !important; flex: 1; min-height: 0; }
.b23-fb-side { border-right: 1px solid var(--b23-border); overflow-y: auto; padding: 14px 16px; max-height: calc(100vh - 170px); }
.b23-fb-tabs { width: 100%; display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 12px; }
.b23-fb-tabs button { font-size: 12.5px; padding: 7px 4px; }
.b23-fb-list { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 8px; }
.b23-fb-field { border: 1px solid var(--b23-border); border-radius: 12px; background: var(--b23-surface); }
.b23-fb-field.is-open { border-color: var(--b23-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--b23-primary) 15%, transparent); }
.b23-fb-row { display: flex; align-items: center; gap: 4px; padding: 6px 6px 6px 8px; }
.b23-fb-drag { color: var(--b23-muted); font-size: 12px; letter-spacing: -2px; }
.b23-fb-name { flex: 1; min-width: 0; text-align: left; border: 0; background: none; padding: 4px 6px; cursor: pointer; font: inherit; color: inherit; }
.b23-fb-name strong { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b23-fb-name small { display: block; font-size: 11.5px; color: var(--b23-muted); }
.b23-fb-ic { width: 28px; height: 28px; border: 1px solid var(--b23-border); border-radius: 8px; background: var(--b23-surface); cursor: pointer; color: var(--b23-muted); font-size: 14px; }
.b23-fb-ic:disabled { opacity: .35; cursor: default; }
.b23-fb-edit { display: grid; gap: 10px; padding: 4px 12px 12px; }
.b23-fb-edit label { display: grid; gap: 4px; font-size: 12.5px; font-weight: 600; }
.b23-fb-checks { display: flex; flex-wrap: wrap; gap: 14px; }
.b23-fb-checks .b23-check { font-weight: 500; }
.b23-fb-sub { font-size: 13px; font-weight: 700; margin: 14px 0 6px; }
.b23-fb-add { display: flex; flex-wrap: wrap; gap: 6px; }
.b23-chipbtn { border: 1px dashed var(--b23-border); background: var(--b23-surface); border-radius: 999px; padding: 6px 11px; font: inherit; font-size: 12.5px; cursor: pointer; color: var(--b23-text); }
.b23-chipbtn:hover { border-color: var(--b23-primary); color: var(--b23-primary); border-style: solid; }
.b23-fb-body input[type=color] { height: 40px; padding: 3px; }
.b23-fb-main { display: flex; flex-direction: column; min-width: 0; background: repeating-conic-gradient(#f2f4f7 0% 25%, #fff 0% 50%) 50% / 22px 22px; }
.b23-fb-prevhead { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; background: var(--b23-surface); border-bottom: 1px solid var(--b23-border); font-size: 13px; font-weight: 600; }
.b23-fb-canvas { flex: 1; overflow-y: auto; padding: 26px 22px; max-height: calc(100vh - 220px); }
.b23-fb-canvas.is-mobile #b23-fprev { max-width: 380px; margin: 0 auto; }
.b23-fb-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--b23-border); background: var(--b23-surface); }
.b23-fcode h3 { font-size: 14.5px; margin: 16px 0 6px; } .b23-fcode h3:first-child { margin-top: 0; }
.b23-fcode textarea { width: 100%; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; margin-bottom: 8px; }
.b23-fcode ul { margin: 6px 0 0; padding-left: 18px; } .b23-fcode li { margin-bottom: 4px; }
@media (max-width: 900px) {
	.b23-fb { grid-template-columns: 1fr; }
	.b23-fb-side { max-height: none; border-right: 0; border-bottom: 1px solid var(--b23-border); }
	.b23-fb-canvas { max-height: none; }
}

/* Limpar filtros */
.b23-btn-clear { color: #b42318; border-color: #fecdca; background: #fef3f2; }
.b23-btn-clear:hover { background: #fee4e2; border-color: #fda29b; }

/* Funis (pipelines) */
.b23-toolbar .b23-pipesel { font-weight: 700; min-width: 190px; border-color: color-mix(in srgb, var(--b23-primary) 40%, var(--b23-border)); }
.b23-chip-pipe { border: 1px solid var(--pc, var(--b23-primary)); color: var(--pc, var(--b23-primary)); background: color-mix(in srgb, var(--pc, var(--b23-primary)) 10%, transparent); cursor: pointer; font: inherit; font-size: 12px; font-weight: 700; }
.b23-chip-pipe:hover { background: color-mix(in srgb, var(--pc, var(--b23-primary)) 18%, transparent); }
.b23-pipe-row { border: 1px solid var(--b23-border); border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; background: var(--b23-surface); }
.b23-pipe-main { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.b23-pipe-main input[type=text] { flex: 1 1 220px; max-width: 360px; font-weight: 700; }
.b23-pipe-main input[type=color] { width: 40px; height: 36px; padding: 2px; }
.b23-pipe-teams { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 8px; font-size: 13px; }
.b23-pipe-teams > span { font-weight: 600; color: var(--b23-muted); }
.b23-pipeteams { display: flex; flex-wrap: wrap; gap: 4px 14px; }
#b23-pipetabs { margin-bottom: 10px; }
#b23-pipetabs .b23-dot { margin-right: 6px; }
@media (max-width: 760px) { .b23-top-brand img { max-height: 38px; max-width: 170px; } }
/* Identidade visual */
.b23-brandgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.b23-brandslot { display: flex; gap: 14px; align-items: center; padding: 12px; border: 1px solid var(--b23-border); border-radius: 12px; background: var(--b23-surface); }
.b23-brandslot strong { display: block; } .b23-brandslot small { display: block; color: var(--b23-muted); font-size: 12px; }
.b23-brandprev { flex: 0 0 150px; height: 70px; display: grid; place-items: center; border-radius: 10px; background: repeating-conic-gradient(#f2f4f7 0% 25%, #fff 0% 50%) 50% / 14px 14px; border: 1px dashed var(--b23-border); }
.b23-brandprev.is-fav { flex-basis: 70px; }
.b23-brandprev img { max-width: 92%; max-height: 60px; object-fit: contain; }
.b23-brandprev span { font-size: 12px; color: var(--b23-muted); }
