/* Rafagnin Motors — CRM (/crm). Mesmo padrão do painel da Viageo: barra lateral escura,
   fundo claro, Poppins nos títulos e números, Nunito Sans no texto. */
:root {
	--brand: #DE3F3C;
	--brand-dk: #B92D2A;
	--brand-ink: #9E2421;
	--brand-soft: #FBE8E7;
	--side: #1D2024;
	--side-2: #2A2E34;
	--side-txt: #C9CDD3;
	--side-sub: #F2A7A5;
	--bg: #F4F5F6;
	--card: #FFFFFF;
	--ink: #1D2024;
	--ink-2: #2E333A;
	--muted: #535A63;
	--line: #DDE0E4;
	--line-2: #E8EAED;
	--head: #EEF0F2;
	--input: #C6CBD1;
	--ok: #1F6E3D;
	--ok-bg: #DDF0E3;
	--warn: #6B4A00;
	--warn-bg: #FFE9B0;
	--wa: #1A9E50;
	--disp: 'Poppins', system-ui, sans-serif;
	--body: 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body.rmx { font-family: var(--body); font-size: 15px; line-height: 1.5; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
.rmx h1, .rmx h2, .rmx h3 { font-family: var(--disp); margin: 0; line-height: 1.2; color: var(--ink); }
.rmx p { margin: 0; }
.rmx a { color: var(--brand-ink); font-weight: 700; }
.rmx a:hover { color: var(--brand-dk); }
.rmx img { display: block; max-width: 100%; }
.rmx :focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.rmx [hidden] { display: none !important; }
.rmx-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.rmx-muted { color: var(--muted); }
.rmx-small { font-size: 13px; margin-top: 8px !important; }
.rmx-ok { color: var(--ok) !important; }
.rmx-warn { color: var(--warn) !important; }
.rmx code { background: var(--head); padding: 1px 6px; border-radius: 4px; font-size: 13px; }

/* ---------- Botões ---------- */
.rm-b { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 18px; border-radius: 10px; border: 1px solid transparent; font: inherit; font-weight: 800; font-size: 14px; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .12s, color .12s; }
.rmx a.rm-b { font-weight: 800; }
.rm-b-primary, .rmx a.rm-b-primary { background: var(--brand); color: #fff; }
.rm-b-primary:hover, .rmx a.rm-b-primary:hover { background: var(--brand-dk); color: #fff; }
.rm-b-soft, .rmx a.rm-b-soft { background: var(--brand-soft); color: var(--brand-ink); }
.rm-b-soft:hover, .rmx a.rm-b-soft:hover { background: #F6D5D3; color: var(--brand-ink); }
.rm-b-wa, .rmx a.rm-b-wa { background: var(--wa); color: #fff; }
.rm-b-wa:hover, .rmx a.rm-b-wa:hover { background: #148442; color: #fff; }
.rm-b-danger { background: #A82724; color: #fff; }
.rm-b-ghost-danger { background: #fff; border-color: #E9B7B5; color: #A82724; }
.rm-b-sm { height: 36px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.rm-b-lg { height: 52px; padding: 0 24px; font-size: 15px; border-radius: 12px; }
.rm-b-block { width: 100%; }
.rm-b[disabled] { opacity: .55; cursor: wait; }
.rmx-link { border: 0; background: none; padding: 0 0 0 6px; font: inherit; font-weight: 800; color: var(--brand-ink); cursor: pointer; text-decoration: underline; }

/* ---------- Avatar ---------- */
.rm-av { display: inline-grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--side-2); color: #fff; font-family: var(--disp); font-weight: 600; font-size: 11px; letter-spacing: .3px; }
.rm-av-lg { width: 38px; height: 38px; font-size: 14px; }

/* ---------- Avisos ---------- */
.rmx-alert { padding: 12px 16px; border-radius: 10px; font-weight: 700; margin-bottom: 18px !important; }
.rmx-alert-ok { background: var(--ok-bg); color: var(--ok); }
.rmx-alert-err { background: #FDE2E1; color: #8E1F1C; }
.rm-toast { position: fixed; right: 24px; bottom: 24px; z-index: 100; max-width: 380px; padding: 14px 18px; border-radius: 12px; background: var(--ink); color: #fff; font-weight: 700; box-shadow: 0 10px 30px rgba(0,0,0,.22); }
.rm-toast.is-err { background: #A82724; }
.rm-toast.is-ok { background: var(--ok); }
.rm-toast.is-new { background: var(--brand); }

/* ---------- Login ---------- */
.rmx-login-wrap { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
.rmx-login-side { background: var(--side); display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: 8vw; gap: 18px; }
.rmx-login-side img { width: min(320px, 70%); height: auto; }
.rmx-login-side p { color: var(--side-sub); font-family: var(--disp); font-weight: 600; font-size: 18px; }
.rmx-login-box { align-self: center; justify-self: center; width: min(420px, 100%); padding: 40px 24px; display: flex; flex-direction: column; gap: 10px; }
.rmx-login-logo { display: none !important; align-self: flex-start; height: 72px; width: auto !important; max-width: none; margin-bottom: 18px; }
.rmx-login-box h1 { font-size: 30px; }
.rmx-login-box > .rmx-muted { margin-bottom: 18px; }
.rmx-form { display: flex; flex-direction: column; gap: 16px; }
.rmx-center { text-align: center; }
.rmx-check { display: flex; gap: 10px; align-items: center; font-weight: 600; color: var(--ink-2); }
.rmx-check input { width: 20px; height: 20px; margin: 0; accent-color: var(--brand); }

/* ---------- Campos (mesmo desenho da Viageo) ---------- */
.rmx-f { display: flex; flex-direction: column; gap: 6px; }
.rmx-f label { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.rmx-opt { font-weight: 400; color: var(--muted); }
.rmx-f input, .rmx-f select, .rmx-f textarea, .rmx-filters input, .rmx-filters select, .rmx-nota textarea {
	width: 100%; height: 46px; padding: 0 14px; border: 1px solid var(--input); border-radius: 10px; background: #fff; color: var(--ink); font: inherit; font-size: 15px;
}
.rmx-f textarea, .rmx-nota textarea { height: auto; min-height: 84px; padding: 12px 14px; resize: vertical; }
.rmx-f input:focus, .rmx-f select:focus, .rmx-f textarea:focus, .rmx-filters input:focus, .rmx-filters select:focus, .rmx-nota textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(29,32,36,.08); }
.rmx-f input:disabled { background: var(--head); color: var(--muted); }
.rmx-pass { position: relative; }
.rmx-pass input { padding-right: 92px; }
.rmx-pass-eye { position: absolute; right: 6px; top: 6px; height: 34px; padding: 0 12px; border: 0; border-radius: 8px; background: var(--head); color: var(--ink-2); font: inherit; font-weight: 800; font-size: 13px; cursor: pointer; }
.rmx-grid-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.rmx-span2 { grid-column: 1 / -1; }
.rmx-form-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }

/* ---------- Estrutura ---------- */
.rmx-app { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.rmx-side { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--side); display: flex; flex-direction: column; gap: 6px; padding: 24px 16px 16px; }
.rmx-brand { padding: 0 10px 24px; display: flex; flex-direction: column; gap: 8px; }
.rmx-brand img { width: 150px; height: auto; }
.rmx-brand span { font-size: 13px; font-weight: 800; color: var(--side-sub); }
.rmx-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 44px; padding: 0 14px; border-radius: 10px; color: var(--side-txt) !important; text-decoration: none; font-weight: 700 !important; font-size: 15px; }
.rmx-nav:hover { background: var(--side-2); color: #fff !important; }
.rmx-nav.is-on { background: var(--brand); color: #fff !important; font-weight: 800 !important; }
.rmx-nav-sub { height: 38px; font-size: 14px; font-weight: 600 !important; }
.rmx-count { min-width: 24px; height: 22px; padding: 0 7px; border-radius: 99px; background: #fff; color: var(--brand-ink); font-size: 12px; font-weight: 800; display: inline-grid; place-items: center; }
.rmx-nav.is-on .rmx-count { color: var(--brand-dk); }
.rmx-side-sep { height: 1px; background: var(--side-2); margin: 12px 10px; }
.rmx-me { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--side-2); display: flex; flex-direction: column; gap: 4px; }
.rmx-me-link { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; text-decoration: none; }
.rmx-me-link:hover, .rmx-me-link.is-on { background: var(--side-2); }
.rmx-me-link .rm-av { background: var(--brand); }
.rmx-me-link strong { display: block; color: #fff; font-size: 14px; line-height: 1.25; }
.rmx-me-link small { display: block; color: var(--side-txt); font-size: 12px; font-weight: 600; }
.rmx-sair { padding: 8px 10px; color: var(--side-txt) !important; font-size: 14px; text-decoration: none; }
.rmx-sair:hover { color: #fff !important; }
.rmx-mbar, .rmx-scrim { display: none; }
.rmx-main { padding: 32px 40px 56px; min-width: 0; }

/* ---------- Cabeçalho da tela ---------- */
.rmx-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 20px; flex-wrap: wrap; margin-bottom: 22px; }
.rmx-head h1 { font-size: 28px; }
.rmx-head-lead h1 { font-size: 30px; }
.rmx-head-lead .rmx-muted { margin-top: 4px; }
.rmx-head-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.rmx-back { display: inline-block; font-size: 14px; margin-bottom: 6px; text-decoration: none; }
.rmx-sound { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--muted); }
.rmx-sound input { width: 18px; height: 18px; accent-color: var(--brand); }
.rmx-hint { margin-top: 14px !important; font-size: 13px; color: var(--muted); }

/* ---------- Indicadores (cards de número) ---------- */
.rmx-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.rmx-kpis-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.rmx-kpi { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; display: flex; flex-direction: column; gap: 2px; }
.rmx-kpi span { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .3px; color: #3E444C; }
.rmx-kpi strong { font-family: var(--disp); font-size: 28px; font-weight: 700; line-height: 1.25; }
.rmx-kpi strong small { font-size: 14px; font-weight: 500; color: var(--muted); }
.rmx-kpi-hot strong { color: var(--brand-dk); }

/* ---------- Filtros ---------- */
.rmx-filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.rmx-filters input[type=search] { flex: 1 1 300px; height: 48px; font-size: 16px; }
.rmx-filters select { width: auto; flex: 0 0 auto; height: 48px; font-weight: 700; }
.rmx-chip { height: 48px; display: inline-flex; align-items: center; padding: 0 16px; border-radius: 10px; border: 1px solid var(--input); background: #fff; color: var(--ink-2) !important; font-weight: 800 !important; font-size: 14px; text-decoration: none; white-space: nowrap; }
.rmx-chip:hover { border-color: var(--ink); }
.rmx-chip.is-on { background: var(--brand); border-color: var(--brand); color: #fff !important; }

/* ---------- Tabelas ---------- */
.rmx-table { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.rmx-th, .rmx-tr { display: grid; grid-template-columns: 1.8fr 2fr .8fr .7fr 1.4fr 1.4fr 1.9fr; gap: 16px; padding: 14px 24px; align-items: center; }
.rmx-th { background: var(--head); font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; color: #3E444C; }
.rmx-tr { border-top: 1px solid var(--line-2); font-size: 15px; }
.rmx-tr:hover { background: #FAFBFB; }
.rmx-tr.is-new { animation: rmx-new 1.4s ease-out 2; }
@keyframes rmx-new { 30% { background: #FFF3D6; } }
.rmx-tr.is-off { opacity: .55; }
.rm-td-cli, .rm-td-car { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.rm-td-cli a { color: var(--ink); font-weight: 800; text-decoration: none; }
.rm-td-cli a:hover { color: var(--brand-ink); text-decoration: underline; }
.rm-td-cli small, .rm-td-car small { font-size: 13px; color: var(--muted); font-weight: 600; }
.rm-td-car { font-weight: 600; }
.rm-td-face { font-size: 24px; line-height: 1; }
.rm-td-vend { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.rm-td-vend em { color: var(--brand-ink); font-style: normal; font-weight: 800; }
.rm-td-act { display: flex; gap: 8px; justify-content: flex-end; }
.rm-td-act form { display: contents; }
.rmx-table-equipe .rmx-th, .rmx-table-equipe .rmx-tr { grid-template-columns: 2fr 1.7fr .9fr .7fr .9fr .9fr 3.2fr; }
.rmx-user { flex-direction: row; align-items: center; gap: 12px; }
.rmx-user strong { display: block; }
.rmx-num { font-family: var(--disp); font-weight: 700; font-size: 18px; }
.rmx-empty { padding: 32px 24px; border-top: 1px solid var(--line-2); text-align: center; color: var(--muted); }

/* Etapa como "pílula" selecionável (igual à situação do pagamento na Viageo) */
.rm-pill-select { justify-self: start; height: 34px; max-width: 100%; border: 0; border-radius: 999px; padding: 0 28px 0 12px; font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23333' stroke-width='1.6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; }
.rm-pill-select[disabled] { cursor: default; background-image: none; padding-right: 12px; }
.rm-pill-select[data-st="novo"] { background-color: #FDE2E1; color: #8E1F1C; }
.rm-pill-select[data-st="atendimento"] { background-color: #FFE9B0; color: #5E4100; }
.rm-pill-select[data-st="proposta"] { background-color: #DCE8FB; color: #1D4C9A; }
.rm-pill-select[data-st="aprovado"] { background-color: #E8E1FA; color: #4B329E; }
.rm-pill-select[data-st="ganho"] { background-color: var(--ok-bg); color: var(--ok); }
.rm-pill-select[data-st="perdido"] { background-color: #ECEDEF; color: #3E444C; }
.rmx-pill { display: inline-block; padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 800; }
.rmx-pill-on { background: var(--ok-bg); color: var(--ok); }
.rmx-pill-off { background: #ECEDEF; color: #3E444C; }

/* Etiquetas */
.rm-tag { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; background: #ECEDEF; color: #3E444C; }
.rm-tag-totem { background: #FDE2E1; color: #8E1F1C; }
.rm-tag-site { background: #DCE8FB; color: #1D4C9A; }

/* ---------- Funil ---------- */
.rm-board { display: grid; grid-template-columns: repeat(6, minmax(250px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.rm-col { background: #E9EBEE; border-radius: 14px; border-top: 4px solid var(--c); }
.rm-col header { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 10px; }
.rm-col h2 { font-family: var(--body); font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; color: #3E444C; }
.rm-col-n { min-width: 26px; height: 22px; display: inline-grid; place-items: center; padding: 0 8px; border-radius: 99px; background: #fff; font-weight: 800; font-size: 12px; }
.rm-col-body { min-height: 140px; max-height: calc(100vh - 330px); overflow-y: auto; padding: 0 10px 10px; border-radius: 0 0 14px 14px; }
.rm-col-body.is-over { background: rgba(29,32,36,.06); outline: 2px dashed var(--c); outline-offset: -5px; }
.rm-lead { background: var(--card); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; cursor: grab; }
.rm-lead.is-drag { opacity: .4; }
.rm-lead.is-free { box-shadow: inset 4px 0 0 var(--brand); }
.rm-lead.is-mine { box-shadow: inset 4px 0 0 #2E9E5B; }
.rm-lead.is-new { animation: rmx-new 1.4s ease-out 2; }
.rm-lead-link { display: block; padding: 12px 14px 10px; color: var(--ink) !important; font-weight: 400 !important; text-decoration: none; }
.rm-lead-top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.rm-lead-top strong { font-weight: 800; font-size: 15px; line-height: 1.3; }
.rm-face { font-size: 24px; line-height: 1; }
.rm-lead-car { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); font-weight: 600; }
.rm-lead-sim { display: block; margin-top: 8px; font-family: var(--disp); font-weight: 600; font-size: 15px; }
.rm-lead-sim small { font-family: var(--body); font-size: 12px; font-weight: 700; color: var(--muted); }
.rm-lead-meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.rm-when { margin-left: auto; font-size: 12px; color: var(--muted); font-weight: 600; }
.rm-lead footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 14px 12px; border-top: 1px solid var(--line-2); }
.rm-dono { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; min-width: 0; }

/* ---------- Cards e ficha ---------- */
.rmx-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 22px 24px; margin-bottom: 16px; }
.rmx-card h2 { font-size: 17px; margin-bottom: 16px; }
.rmx-label { display: block; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; color: #3E444C; }
.rmx-ficha { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.rmx-dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; margin: 0; }
.rmx-dl dt { font-size: 13px; color: var(--muted); font-weight: 700; }
.rmx-dl dd { margin: 2px 0 0; font-weight: 700; font-size: 15px; overflow-wrap: anywhere; }
.rmx-big { font-family: var(--disp); font-size: 24px !important; color: var(--brand-dk); }
.rmx-msg { margin-top: 16px !important; padding: 12px 14px; background: var(--bg); border-radius: 10px; }
.rmx-sat { display: flex; gap: 18px; align-items: center; }
.rmx-sat-emoji { font-size: 52px; line-height: 1; }
.rmx-sat strong { display: block; font-family: var(--disp); font-size: 20px; margin: 2px 0 4px; }
.rmx-sat p { color: var(--muted); }
.rmx-sat-1, .rmx-sat-2 { background: #FFF5F4; border-color: #F3C5C3; }
.rmx-sat-4, .rmx-sat-5 { background: #F2FAF4; border-color: #BFE3CB; }
.rmx-nota { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-bottom: 20px; }
.rm-timeline { list-style: none; margin: 0; padding: 0; }
.rm-ev { position: relative; padding: 0 0 16px 20px; border-left: 2px solid var(--line); margin-left: 6px; }
.rm-ev:last-child { border-left-color: transparent; }
.rm-ev::before { content: ''; position: absolute; left: -7px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid var(--muted); }
.rm-ev-nota::before { background: var(--ink); border-color: var(--ink); }
.rm-ev-assumiu::before, .rm-ev-transferiu::before { border-color: #2E9E5B; background: #2E9E5B; }
.rm-ev-head strong { font-weight: 800; }
.rm-ev-head span { margin-left: 6px; font-size: 13px; color: var(--muted); }
.rm-ev p { margin-top: 2px; }
.rm-steps-pick { display: flex; flex-direction: column; gap: 8px; }
.rm-step-btn { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font: inherit; font-weight: 700; color: var(--ink-2); cursor: pointer; text-align: left; }
.rm-step-btn::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; }
.rm-step-btn:hover:not([disabled]) { border-color: var(--ink); }
.rm-step-btn.is-on { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 800; }
.rm-step-btn[disabled] { cursor: not-allowed; opacity: .7; }
.rmx-dono { display: flex; align-items: center; gap: 10px; font-size: 16px; margin-bottom: 4px !important; }
.rmx-ficha-side .rmx-f { margin-top: 16px; }
.rmx-danger h2 { color: #8E1F1C; }
.rmx-danger .rm-b { margin-top: 12px; }

/* ---------- Vendedores, perfil e configurações ---------- */
.rmx-novo { border-color: var(--ink); }
.rmx-novo > .rmx-muted { margin: -6px 0 18px; }
.rmx-narrow { max-width: 760px; }
.rmx-howto .rmx-dl { margin-bottom: 4px; }
.rmx-sticky-save { position: sticky; bottom: 0; padding: 14px 0; background: linear-gradient(to top, var(--bg) 70%, rgba(244,245,246,0)); }
.rmx-dialog { width: min(460px, calc(100vw - 32px)); border: 0; border-radius: 16px; padding: 28px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.rmx-dialog::backdrop { background: rgba(20,22,25,.6); }
.rmx-dialog form { display: flex; flex-direction: column; gap: 14px; }
.rmx-dialog h2 { font-size: 22px; }

/* ---------- Celular e tablet ---------- */
@media (max-width: 1180px) {
	.rmx-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.rmx-ficha { grid-template-columns: 1fr; }
	.rmx-th { display: none; }
	.rmx-tr, .rmx-table-equipe .rmx-tr { grid-template-columns: 1fr auto; gap: 8px 14px; padding: 16px 18px; }
	.rmx-tr > :nth-child(1) { grid-column: 1 / 2; }
	.rmx-tr > .rm-td-car { grid-column: 1 / -1; }
	.rmx-tr > .rm-td-act { grid-column: 1 / -1; justify-content: flex-start; }
	.rmx-table-equipe .rmx-num::before { font-family: var(--body); font-size: 12px; font-weight: 700; color: var(--muted); margin-right: 6px; }
	.rmx-table-equipe .rmx-tr > :nth-child(4)::before { content: 'Em aberto'; }
	.rmx-table-equipe .rmx-tr > :nth-child(5)::before { content: 'Vendidos no mês'; }
}
@media (max-width: 860px) {
	.rmx-app { display: block; }
	.rmx-mbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; height: 60px; padding: 0 8px; padding-top: env(safe-area-inset-top); background: var(--side); }
	.rmx-mbar img { height: 34px; width: auto; }
	.rmx-menu-btn, .rmx-mbar-bell { position: relative; width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: none; color: #fff !important; cursor: pointer; }
	.rmx-mbar-bell span { position: absolute; top: 4px; right: 2px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 99px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; }
	.rmx-side { position: fixed; z-index: 50; left: 0; top: 0; bottom: 0; width: 280px; height: auto; transform: translateX(-100%); transition: transform .2s ease-out; }
	.rmx-side.is-open { transform: none; }
	.rmx-scrim:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 40; background: rgba(20,22,25,.55); }
	.rmx-main { padding: 20px 16px 48px; }
	.rmx-head h1 { font-size: 24px; }
	.rmx-head-lead h1 { font-size: 26px; }
	.rmx-head-actions, .rmx-head-actions .rm-b { width: 100%; }
	.rmx-kpis, .rmx-kpis-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.rmx-kpis:not(.rmx-kpis-4) > :nth-child(5) { grid-column: span 2; }
	.rmx-kpi { padding: 12px 14px; }
	.rmx-table[data-table] .rmx-tr { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "cli face" "car car" "vend st" "act act"; }
	.rmx-table[data-table] .rmx-tr > :nth-child(1) { grid-area: cli; }
	.rmx-table[data-table] .rmx-tr > :nth-child(2) { grid-area: car; }
	.rmx-table[data-table] .rmx-tr > :nth-child(3) { grid-area: face; }
	.rmx-table[data-table] .rmx-tr > :nth-child(4) { display: none; }
	.rmx-table[data-table] .rmx-tr > :nth-child(5) { grid-area: vend; }
	.rmx-table[data-table] .rmx-tr > :nth-child(6) { grid-area: st; }
	.rmx-table[data-table] .rmx-tr > :nth-child(7) { grid-area: act; }
	.rm-td-face.is-none { visibility: hidden; }
	.rmx-tr .rm-td-act .rm-b { flex: 1; }
	.rmx-kpi span { font-size: 11px; }
	.rmx-kpi strong { font-size: 24px; }
	.rmx-filters input[type=search] { flex-basis: 100%; }
	.rmx-chip, .rmx-filters select { height: 42px; font-size: 13px; padding: 0 12px; }
	.rm-board { grid-template-columns: repeat(6, 84vw); scroll-snap-type: x mandatory; margin: 0 -16px; padding: 0 16px 8px; scroll-padding: 0 16px; }
	.rm-col { scroll-snap-align: start; }
	.rm-col-body { max-height: none; }
	.rmx-grid-form, .rmx-dl { grid-template-columns: 1fr; }
	.rmx-card { padding: 18px; }
	.rmx-login-wrap { grid-template-columns: 1fr; }
	.rmx-login-side { display: none; }
	.rmx-login-logo { display: block !important; }
	body.rmx-login { background: #fff; }
	.rm-toast { left: 16px; right: 16px; bottom: 16px; max-width: none; }
	.rmx-sat-emoji { font-size: 40px; }
}
@media (prefers-reduced-motion: reduce) {
	.rmx-side { transition: none; }
	.rm-lead.is-new, .rmx-tr.is-new { animation: none; }
}

/* Atalho para o totem na tela de login */
.rmx-login-totem { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.rmx-login-totem span { font-size: 14px; font-weight: 700; color: var(--muted); text-align: center; }

/* ---------- Estoque ---------- */
.rmx-table-estoque .rmx-th, .rmx-table-estoque .rmx-tr { grid-template-columns: 3fr 1.2fr 1.2fr .6fr 1.5fr 2.2fr; }
.rmx-car { display: flex; align-items: center; gap: 14px; min-width: 0; text-decoration: none; }
.rmx-car .rm-td-cli strong { color: var(--ink); font-weight: 800; }
.rmx-car:hover strong { color: var(--brand-ink); text-decoration: underline; }
.rmx-car-img { flex: none; width: 88px; height: 62px; border-radius: 8px; overflow: hidden; background: var(--head); display: grid; place-items: center; }
.rmx-car-img img { width: 100%; height: 100%; object-fit: cover; }
.rmx-car-img em { font-style: normal; font-size: 11px; font-weight: 800; color: var(--muted); }
.rmx-price { font-family: var(--disp); font-weight: 600; font-size: 16px; white-space: nowrap; }
.rmx-price em { font-family: var(--body); font-style: normal; font-size: 13px; font-weight: 700; color: var(--brand-ink); }
.rmx-sit { display: flex; flex-wrap: wrap; gap: 6px; }
.rmx-pill-warn { background: var(--warn-bg); color: var(--warn); }
.rmx-pill-brand { background: var(--brand-soft); color: var(--brand-ink); }
.rmx-tr.is-off .rmx-car-img { filter: grayscale(1); }

/* Cadastro do carro */
.rmx-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rmx-mt { margin-top: 16px !important; }
.rmx-mb { margin: -8px 0 14px !important; }
.rmx-fotos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; border-radius: 12px; }
.rmx-fotos.is-drop { outline: 2px dashed var(--brand); outline-offset: 6px; }
.rmx-foto { position: relative; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: var(--head); cursor: grab; }
.rmx-foto img { width: 100%; height: 100%; object-fit: cover; }
.rmx-foto.is-drag { opacity: .4; }
.rmx-foto.is-loading img { opacity: .45; }
.rmx-foto.is-loading::after { content: ''; position: absolute; inset: 50% auto auto 50%; width: 28px; height: 28px; margin: -14px; border: 3px solid #fff; border-top-color: var(--brand); border-radius: 50%; animation: rmx-spin .8s linear infinite; }
@keyframes rmx-spin { to { transform: rotate(360deg); } }
.rmx-foto-capa { display: none; position: absolute; top: 8px; left: 8px; padding: 3px 10px; border-radius: 999px; background: var(--brand); color: #fff; font-size: 12px; font-weight: 800; }
.rmx-fotos > .rmx-foto:first-child .rmx-foto-capa { display: block; }
.rmx-fotos > .rmx-foto:first-child [data-capa] { display: none; }
.rmx-foto-act { position: absolute; left: 0; right: 0; bottom: 0; display: flex; gap: 6px; padding: 8px; background: linear-gradient(to top, rgba(0,0,0,.65), rgba(0,0,0,0)); }
.rmx-foto-act button { flex: 1; white-space: nowrap; height: 30px; border: 0; border-radius: 7px; background: rgba(255,255,255,.92); color: var(--ink); font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.rmx-foto-act [data-remover] { color: #A82724; }
.rmx-foto.is-loading .rmx-foto-act { display: none; }
.rmx-foto-add { aspect-ratio: 4 / 3; }
.rmx-foto-add label { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; border: 2px dashed #B6BCC3; border-radius: 10px; color: var(--brand-ink); font-weight: 800; font-size: 14px; cursor: pointer; text-align: center; padding: 8px; }
.rmx-foto-add label:hover, .rmx-foto-add label:focus-within { border-color: var(--brand); background: var(--brand-soft); }
.rmx-foto-status { margin-top: 10px !important; font-weight: 700; color: var(--muted); min-height: 1.4em; }
.rmx-foto-status.is-err { color: #8E1F1C; }
.rmx-money { display: flex; align-items: center; height: 46px; border: 1px solid var(--input); border-radius: 10px; background: #fff; padding-left: 14px; }
.rmx-money:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(29,32,36,.08); }
.rmx-money span { font-weight: 800; color: var(--muted); }
.rmx-f .rmx-money input { border: 0; height: 100%; box-shadow: none !important; font-family: var(--disp); font-weight: 600; font-size: 17px; }
.rmx-preview { margin-top: 14px !important; padding: 12px 14px; border-radius: 10px; background: var(--bg); color: var(--ink-2); }
.rmx-preview strong { color: var(--brand-dk); }
.rmx-toggle { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.rmx-toggle input { width: 22px; height: 22px; margin: 1px 0 0; flex: none; accent-color: var(--brand); }
.rmx-toggle strong { display: block; font-weight: 800; }
.rmx-toggle small { display: block; color: var(--muted); font-size: 13px; }
.rmx-carro-form .rmx-ficha-side { position: sticky; top: 24px; }

@media (max-width: 1180px) {
	.rmx-table-estoque .rmx-tr { grid-template-columns: minmax(0, 1fr) auto; }
	.rmx-table-estoque .rmx-tr > .rmx-car { grid-column: 1 / -1; }
	.rmx-table-estoque .rmx-num::before { content: 'Leads'; font-family: var(--body); font-size: 12px; font-weight: 700; color: var(--muted); margin-right: 6px; }
	.rmx-carro-form .rmx-ficha-side { position: static; }
}
@media (max-width: 860px) {
	.rmx-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.rmx-fotos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.rmx-carro-form { display: flex; flex-direction: column; }
	.rmx-table-estoque .rmx-tr > .rm-td-act .rm-b { flex: 1; }
}

/* Uso interno (consignação) */
.rmx-interno { border-color: #E2CF94; background: #FFFCF2; }
.rmx-interno h2 { display: flex; align-items: center; gap: 8px; }
.rmx-consig { display: flex; flex-direction: column; gap: 14px; padding-top: 14px; }
.rmx-pill-consig { background: #F3E8C6; color: #5E4100; }
.rmx-dl dd .rmx-pill { margin-left: 8px; vertical-align: middle; }

/* Instalar como app */
.rmx-install { width: 100%; border: 0; background: none; font: inherit; cursor: pointer; justify-content: flex-start; gap: 10px; }
.rmx-install-dica { padding: 4px 14px; font-size: 12px; line-height: 1.4; color: var(--side-txt); }
.rmx-install-dica-light { padding: 0; text-align: center; color: var(--muted); }
.rm-b-ghost { background: #fff; border-color: var(--input); color: var(--ink-2); }
.rm-b-ghost:hover { border-color: var(--ink); }
/* Quando aberto como app instalado, o link "Ver o site" e o "Abrir totem" continuam; some só o botão de instalar */
.rm-is-app .rmx-side [data-install] { display: none !important; }

/* Login: apps da loja */
.rmx-login-apps { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.rmx-login-apps .rmx-label { margin-bottom: 2px; }
.rmx-app-btn { display: flex; align-items: center; gap: 14px; width: 100%; padding: 10px 14px 10px 10px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font: inherit; text-align: left; text-decoration: none; cursor: pointer; color: var(--ink) !important; }
.rmx-app-btn:hover { border-color: var(--ink); }
.rmx-app-btn img { width: 44px; height: 44px; border-radius: 10px; flex: none; }
.rmx-app-btn strong { display: block; font-weight: 800; font-size: 15px; }
.rmx-app-btn small { display: block; color: var(--muted); font-size: 13px; font-weight: 600; }
.rmx-install-dica.is-ok { color: var(--ok); font-weight: 700; }
.rmx-login-apps > a.rmx-center { margin-top: 4px; }
.rm-is-app .rmx-login-apps button[data-install] { display: none; }

.rmx-h3 { font-family: var(--disp); font-size: 15px; margin: 0 0 8px; }
.rmx-steps-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.rmx-steps-list li { padding-left: 4px; }

/* Lead cadastrado pelo vendedor */
.rm-tag-vendedor { background: #E3F1E7; color: #1F6E3D; }
.rm-por { display: block; margin-top: 3px; font-size: 12px; font-weight: 600; color: var(--muted); }
.rmx-toggle-inline { grid-column: 1 / -1; border-bottom: 0; padding: 4px 0; }
.rmx-docs { margin-bottom: 4px; }

/* ---------- Clientes, vendas e contrato ---------- */
.rmx-alert-warn { background: var(--warn-bg); color: var(--warn); }
.rmx-pill-blue { background: #DCE8FB; color: #1D4C9A; }
.rmx-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.rmx-card-head h2 { margin: 0; }
.rmx-inline-select { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--muted); }
.rmx-inline-select select { height: 38px; border: 1px solid var(--input); border-radius: 8px; padding: 0 10px; font: inherit; font-weight: 600; color: var(--ink); max-width: 280px; }
.rmx-seg { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.rmx-seg label { flex: 1 1 0; min-width: 140px; display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 14px; border: 1px solid var(--input); border-radius: 10px; font-weight: 700; cursor: pointer; background: #fff; }
.rmx-seg label:has(input:checked) { border-color: var(--ink); background: var(--ink); color: #fff; }
.rmx-seg input { accent-color: var(--brand); }
.rmx-seg-3 { margin-bottom: 0; }
.rmx-seg-3 label { min-width: 0; font-size: 14px; }
.rmx-mb2 { margin-bottom: 16px; }
.rmx-consig-aviso { color: var(--warn); font-weight: 700; }
.rmx-dl-1 { grid-template-columns: 1fr; }
.rmx-dl-1 > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.rmx-resumo-venda { position: sticky; top: 24px; }
.rmx-mini-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.rmx-mini-list li { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.rmx-mini-list a { text-decoration: none; }
.rmx-mini-list small { color: var(--muted); font-size: 13px; }
.rmx-passo { border-left: 5px solid var(--warn); }
.rmx-passo h2 { font-size: 20px; margin: 4px 0 6px; }
.rmx-passo-hot { border-left-color: var(--brand); background: #FFF8F7; }
.rmx-passo-ok { border-left-color: #2E9E5B; background: #F3FBF6; }
.rmx-acts { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0 10px; }
.rmx-linha { list-style: none; margin: 0; padding: 0; }
.rmx-linha li { position: relative; padding: 0 0 14px 24px; color: var(--muted); font-weight: 700; }
.rmx-linha li::before { content: ''; position: absolute; left: 0; top: 4px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--input); background: #fff; }
.rmx-linha li.is-done { color: var(--ink); }
.rmx-linha li.is-done::before { background: #2E9E5B; border-color: #2E9E5B; }
.rmx-linha small { display: block; font-weight: 600; font-size: 12px; color: var(--muted); }
.rmx-pad { position: relative; height: 200px; border: 1.5px dashed var(--input); border-radius: 12px; background: #fff; touch-action: none; margin: 12px 0 10px; }
.rmx-pad canvas { width: 100%; height: 100%; display: block; cursor: crosshair; border-radius: 12px; }
.rmx-pad .rm-b { position: absolute; top: 8px; right: 8px; }
.rmx-dialog-sig { width: min(620px, calc(100vw - 32px)); }
.rmx-table-cli .rmx-th, .rmx-table-cli .rmx-tr { grid-template-columns: 2.2fr 1.3fr 1.3fr .7fr 1.2fr 2.2fr; }
.rmx-table-vendas .rmx-th, .rmx-table-vendas .rmx-tr { grid-template-columns: 2fr 2.2fr 1.2fr 1.5fr 1.5fr 1fr; }
.rmx-modelo { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.rmx-modelo textarea { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.55; }
.rmx-vars { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 8px; }
.rmx-vars-g { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; color: #3E444C; margin-top: 6px !important; }
.rmx-vars-l { display: flex; flex-wrap: wrap; gap: 6px; }
.rmx-var { border: 1px solid var(--line); background: var(--bg); border-radius: 6px; padding: 4px 8px; font: 12px ui-monospace, Menlo, Consolas, monospace; color: var(--ink-2); cursor: pointer; }
.rmx-var:hover { border-color: var(--ink); }
.rmx-contrato-cfg { margin-top: 24px; }
@media (max-width: 1180px) {
	.rmx-table-cli .rmx-tr, .rmx-table-vendas .rmx-tr { grid-template-columns: minmax(0, 1fr) auto; }
	.rmx-table-cli .rmx-tr > :nth-child(1), .rmx-table-vendas .rmx-tr > :nth-child(1) { grid-column: 1 / 2; }
	.rmx-table-vendas .rmx-tr > .rm-td-car { grid-column: 1 / -1; }
	.rmx-resumo-venda, .rmx-vars { position: static; }
	.rmx-modelo { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
	.rmx-seg-3 label { flex-basis: 100%; }
	.rmx-venda-form { display: flex; flex-direction: column; }
	.rmx-inline-select { width: 100%; }
	.rmx-inline-select select { flex: 1; max-width: none; }
}

.rmx-grid-3 > .rmx-span2 { grid-column: span 2; }
.rmx-seg-3 label { justify-content: center; }
@media (max-width: 860px) { .rmx-grid-3 > .rmx-span2 { grid-column: 1 / -1; } }
.rmx-f .rmx-seg input, .rmx-seg input { width: 18px; height: 18px; min-height: 0; flex: none; margin: 0; padding: 0; border: 0; box-shadow: none; }

/* Assinatura em loco (1.6) */
.rmx-mt-s{margin-top:8px}
.rmx-opcoes{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:14px 0 12px}
.rmx-opcoes-3{grid-template-columns:repeat(3,minmax(0,1fr))}
@media (max-width:1180px){.rmx-opcoes-3{grid-template-columns:1fr 1fr}.rmx-opcoes-3>:first-child{grid-column:1/-1}}
.rmx-f input[type=file]{padding:10px;background:#F6F7F8}
.rmx-opcao{display:flex;flex-direction:column;gap:6px;padding:16px;border:1.5px solid var(--line,#E3E6EA);border-radius:14px;background:#fff;color:inherit;text-decoration:none}
.rmx-opcao strong{font-size:16px}
.rmx-opcao span{font-size:13.5px;color:#5B636D;line-height:1.45}
.rmx-opcao .rmx-acts{margin-top:auto;padding-top:6px}
.rmx-opcao-on{border-color:var(--brand,#E8462B);background:var(--brand-soft);transition:transform .15s,box-shadow .15s}
.rmx-opcao-on strong{color:var(--brand,#E8462B)}
.rmx-opcao-on strong::after{content:" →"}
.rmx-opcao-on:hover{transform:translateY(-1px);box-shadow:0 6px 18px rgba(0,0,0,.08)}
.rmx-ao-vivo{display:flex;align-items:center;gap:8px}
.rmx-dot{width:8px;height:8px;border-radius:50%;background:#22A06B;flex:none;animation:rmxPulse 1.8s infinite}
@keyframes rmxPulse{0%{box-shadow:0 0 0 0 rgba(34,160,107,.5)}70%{box-shadow:0 0 0 7px rgba(34,160,107,0)}100%{box-shadow:0 0 0 0 rgba(34,160,107,0)}}
@media (max-width:700px){.rmx-opcoes{grid-template-columns:1fr}}
.rmx-imp-bar{height:10px;border-radius:99px;background:#EEF0F2;overflow:hidden;margin:6px 0 8px}
.rmx-imp-bar span{display:block;height:100%;width:0;background:var(--brand,#E8462B);transition:width .3s}
.rm-tag-vender{background:#E5F5EA;color:#1F6E3D}
.rmx-h3{font-size:16px;margin:20px 0 10px}
.rmx-fotos{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:8px}
.rmx-fotos a{display:block;aspect-ratio:4/3;border-radius:10px;overflow:hidden;background:#EEF0F2}
.rmx-fotos img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .2s}
.rmx-fotos a:hover img{transform:scale(1.04)}
.rmx-card .rmx-h3{margin:22px 0 10px!important;font-size:16px}
