:root {
  --paper: #F0EEE5;
  --surface: #FAF9F5;
  --white: #FFFFFF;
  --ink: #1F1E1D;
  --muted: #87837B;
  --line: #E3DFD5;
  --accent: #D97757;
  --accent-2: #C15F3C;
  --accent-soft: #F4E5DE;
  --ok: #6A9B72;
  --ok-soft: #E7EFE8;
  --warn: #C98A2D;
  --warn-soft: #F6ECD9;
  --cinza: #B7B2A7;
  --novo: #7A8CA8;
  --rede: #9C7BB8;
  --pub: #5E9DA8;
  --prop: #C98A2D;
  --resp: #6A9B72;
  --fech: #4E8757;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: -apple-system, 'Segoe UI', Roboto, Inter, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
}

aside {
  width: 232px;
  min-height: 100vh;
  background: var(--ink);
  color: #EDEAE3;
  padding: 22px 14px;
  position: fixed;
  top: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  z-index: 100;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px 20px;
  border-bottom: 1px solid #3A3835;
  margin-bottom: 16px;
}

.logo .burst {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  color: #fff;
}

.logo b {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: .2px;
}

.logo span {
  display: block;
  font-size: 10.5px;
  color: #A8A399;
  margin-top: 1px;
}

nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

nav button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: none;
  border: 0;
  color: #CFC9BE;
  font-size: 13.5px;
  font-weight: 600;
  padding: 10px 12px;
  border-radius: 9px;
  cursor: pointer;
  text-align: left;
  font-family: var(--sans);
  transition: all .2s ease;
}

nav button:hover {
  background: #33312E;
  color: #fff;
}

nav button.on {
  background: var(--accent);
  color: #fff;
}

nav button .qt {
  font-size: 11px;
  background: #00000030;
  padding: 1px 8px;
  border-radius: 10px;
}

.side-foot {
  margin-top: auto;
  font-size: 11px;
  color: #8B867C;
  padding: 12px 10px;
  line-height: 1.5;
}

main {
  margin-left: 232px;
  flex: 1;
  min-width: 0;
  padding: 22px 28px 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#view {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding-bottom: 14px;
}

#view > .stats, #view > .painel, #view > .dica-drag, #view > .sites-grid {
  flex: 0 0 auto;
}

.mobile-nav-toggle {
  display: none;
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 110;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 8px 12px;
  cursor: pointer;
}

.overlay-mobile {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 90;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  flex: 0 0 auto;
}

.topbar h1 {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 600;
  margin: 0;
  letter-spacing: -.2px;
}

.topbar .upd {
  color: var(--muted);
  font-size: 12px;
}

.modo-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 700;
  font-family: var(--sans);
  transition: all .2s ease;
  margin-left: 4px;
}

.modo-badge.ok {
  background: var(--ok-soft);
  color: var(--fech);
  border: 1px solid var(--ok);
}

.modo-badge.erro {
  background: #FCE8E6;
  color: #B0483B;
  border: 1px solid #B0483B;
}

.modo-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

.modo-badge.ok .dot {
  background: var(--fech);
  box-shadow: 0 0 6px var(--ok);
}

.modo-badge.erro .dot {
  background: #B0483B;
  box-shadow: 0 0 6px #B0483B;
}

.busca {
  margin-left: auto;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 13.5px;
  width: 250px;
  color: var(--ink);
  font-family: var(--sans);
}

.busca:focus {
  outline: 2px solid var(--accent);
  border-color: var(--accent);
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.stat {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  overflow: hidden;
}

.stat .n {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat .l {
  color: var(--muted);
  font-size: 11px;
  margin-top: 4px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat.laranja .n { color: var(--accent); }
.stat.verde .n { color: var(--fech); }
.stat.ambar .n { color: var(--warn); }

.painel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 20px;
}

.painel h2 {
  font-family: var(--serif);
  font-size: 17px;
  margin: 0 0 14px;
  font-weight: 600;
}

.funil .linha {
  display: grid;
  grid-template-columns: 130px 1fr 40px;
  align-items: center;
  gap: 12px;
  margin: 9px 0;
  font-size: 12.5px;
}

.funil .barra {
  height: 22px;
  border-radius: 6px;
  background: var(--paper);
  overflow: hidden;
}

.funil .fill {
  height: 100%;
  border-radius: 6px;
  min-width: 2px;
}

.board {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  align-items: stretch;
  flex: 1;
  min-height: 0;
  padding-bottom: 4px;
}

.board::-webkit-scrollbar, .cards::-webkit-scrollbar {
  height: 9px;
  width: 9px;
}

.board::-webkit-scrollbar-thumb, .cards::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 8px;
}

.board::-webkit-scrollbar-thumb:hover, .cards::-webkit-scrollbar-thumb:hover {
  background: var(--cinza);
}

.col {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 8px 8px 12px;
  flex: 0 0 272px;
  width: 272px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.cards {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding-right: 6px;
}

.col > h3 {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .7px;
  margin: 2px 4px 12px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  flex: 0 0 auto;
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 3.5px solid var(--cor, var(--accent));
  border-radius: 11px;
  padding: 13px;
  margin-bottom: 10px;
  box-shadow: 0 1px 2px #0000000a;
}

.card .nm {
  font-weight: 700;
  font-size: 13.5px;
}

.card .mt {
  color: var(--muted);
  font-size: 12px;
  margin: 4px 0;
}

.card .motivo {
  color: var(--muted);
  font-size: 12px;
  font-style: italic;
  margin: 7px 0;
  border-left: 2px solid var(--line);
  padding-left: 8px;
  line-height: 1.45;
}

.acoes {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 9px;
}

.acoes a {
  font-size: 11.5px;
  font-weight: 700;
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 7px;
  background: var(--paper);
  color: var(--accent-2);
  border: 1px solid var(--line);
}

.acoes a:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 6px;
  margin-left: 6px;
  vertical-align: 1px;
}

.fup {
  background: var(--warn-soft);
  color: var(--warn);
}

.valor {
  color: var(--fech);
  font-weight: 800;
  font-size: 13px;
  margin-top: 6px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--muted);
  text-align: left;
  padding: 9px 10px;
  border-bottom: 2px solid var(--line);
  cursor: pointer;
  white-space: nowrap;
}

td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

tr:hover td {
  background: var(--surface);
}

.pill {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
  white-space: nowrap;
}

.sites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.site-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .15s, transform .15s;
}

.site-card:hover {
  box-shadow: 0 6px 18px #00000014;
  transform: translateY(-2px);
}

.site-card .prev {
  height: 190px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.site-card iframe {
  width: 200%;
  height: 380px;
  border: 0;
  transform: scale(.5);
  transform-origin: 0 0;
  pointer-events: none;
}

.site-card .info {
  padding: 14px 16px 12px;
}

.s-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.s-nm {
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.s-sub {
  color: var(--muted);
  font-size: 12px;
  margin: 3px 0 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.s-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.s-main a {
  text-align: center;
  padding: 9px 6px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
}

.s-main .prim {
  background: var(--accent);
  color: #fff;
}

.s-main .prim:hover {
  background: var(--accent-2);
}

.s-main .sec {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
}

.s-main .sec:hover {
  border-color: var(--accent);
  color: var(--accent-2);
}

.vazio {
  color: var(--muted);
  font-size: 12.5px;
  text-align: center;
  padding: 14px 4px;
}

#modal-bg {
  position: fixed;
  inset: 0;
  background: #00000055;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

#modal-bg.aberto {
  display: flex;
}

#modal {
  background: var(--white);
  border-radius: 16px;
  padding: 22px;
  width: 460px;
  max-width: 92vw;
  max-height: 88vh;
  overflow-y: auto;
}

#modal h2 {
  font-family: var(--serif);
  font-size: 18px;
  margin: 0 0 14px;
  color: var(--ink);
}

#modal label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--muted);
  margin: 10px 0 4px;
}

#modal input, #modal select, #modal textarea,
.painel input[type="text"], .painel input[type="number"], .painel input[type="tel"], .painel input[type="email"], .painel select, .painel textarea,
.field-input, .field-select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13.5px;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--surface);
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
  outline: none;
  box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.painel input:focus, .painel select:focus, .painel textarea:focus,
#modal input:focus, #modal select:focus, #modal textarea:focus,
.field-input:focus, .field-select:focus {
  border-color: var(--accent);
  background: #FFFFFF;
  box-shadow: 0 0 0 3.5px var(--accent-soft);
}

.painel input::placeholder, #modal input::placeholder {
  color: #B7B2A7;
  font-size: 13px;
}

/* Cards e Seções de Formulários */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.form-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  transition: transform .15s ease, box-shadow .15s ease;
  display: flex;
  flex-direction: column;
}

.form-card:hover {
  box-shadow: 0 4px 14px rgba(0,0,0,0.04);
}

.form-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--line);
}

.form-card-tag {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.field-group {
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
}

.field-group:last-child {
  margin-bottom: 0;
}

.field-group label, .form-row label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

@media(max-width: 720px) {
  .form-row { grid-template-columns: 1fr; gap: 12px; }
}

.btn-cta {
  border: 0;
  border-radius: 9px;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--sans);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all .2s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.btn-cta.primario {
  background: var(--accent);
  color: #fff;
}

.btn-cta.primario:hover {
  background: var(--accent-2);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(217, 119, 87, 0.25);
}

.btn-cta.secundario {
  background: var(--accent-soft);
  color: var(--accent-2);
  border: 1px solid var(--accent);
}

.btn-cta.secundario:hover {
  background: #EED8CF;
  transform: translateY(-1px);
}

#modal .mrow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 12px;
}

#modal .mbot {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 16px;
}

#modal .mbot button {
  border: 0;
  border-radius: 9px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--sans);
}

#modal .salvar {
  background: var(--accent);
  color: #fff;
}

#modal .cancelar {
  background: var(--paper);
  color: var(--ink);
}

#doc-bg {
  position: fixed;
  inset: 0;
  background: #000000AA;
  display: none;
  z-index: 300;
  flex-direction: column;
}

#doc-bg.aberto {
  display: flex;
}

.doc-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: var(--ink);
  color: #EDEAE3;
  flex: 0 0 auto;
}

.doc-bar b {
  font-family: var(--serif);
  font-size: 15px;
}

.doc-bar .sp {
  flex: 1;
}

.doc-bar button {
  border: 0;
  border-radius: 9px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--sans);
}

.doc-bar .imp {
  background: var(--accent);
  color: #fff;
}

.doc-bar .fech {
  background: #3A3835;
  color: #EDEAE3;
}

#doc-frame {
  flex: 1;
  border: 0;
  width: 100%;
  background: #E9E7E1;
}

.cmp-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.cmp-tabs button {
  border: 1px solid var(--line);
  background: var(--white);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  color: var(--muted);
  font-family: var(--sans);
}

.cmp-tabs button.on {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.cmp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  flex: 1 1 auto;
  min-height: 0;
}

.cmp-col {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  min-height: 0;
}

.cmp-col .cab {
  padding: 9px 14px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
}

.cmp-col iframe {
  flex: 1 1 auto;
  width: 100%;
  border: 0;
  min-height: 0;
  background: #fff;
}

.ct-pendente { background: var(--paper); color: var(--muted); }
.ct-enviado { background: var(--warn-soft); color: var(--warn); }
.ct-assinado { background: var(--ok-soft); color: var(--fech); }

.btn-ct {
  font-size: 11.5px;
  font-weight: 700;
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 6px;
  display: inline-block;
  margin-right: 4px;
}

.btn-ct.ver { background: var(--paper); color: var(--ink); border: 1px solid var(--line); }
.btn-ct.baixar { background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent); }
.btn-ct.ass { background: var(--ok-soft); color: var(--fech); border: 1px solid var(--ok); }

@media(max-width: 860px) {
  aside { display: none; }
  main { margin-left: 0; padding: 60px 16px 14px; }
  .mobile-nav-toggle { display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; font-size: 18px; }
  #sidebar-mobile.mobile-open { display: flex; z-index: 100; }
  .overlay-mobile.mobile-open { display: block; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .topbar { flex-direction: column; align-items: stretch; }
  .busca { width: 100%; margin-left: 0; }
  .board { min-height: 420px; -webkit-overflow-scrolling: touch; }
  .col { flex: 0 0 260px; width: 260px; }
}

@media(max-width: 520px) {
  .stats { grid-template-columns: 1fr; }
  .col { flex: 0 0 240px; width: 240px; }
}

@media(max-width: 900px) {
  .cmp-grid { grid-template-columns: 1fr; }
}

/* ===================== Kanban: topo + filtros por serviço ===================== */
.kanban-topo { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin:26px 0 12px; }
.kanban-topo h2 { margin:0; font-family:var(--serif); font-size:18px; }
.chips { display:flex; gap:6px; flex-wrap:wrap; }
.chip-filtro { border:1px solid var(--line); background:var(--white); color:var(--ink); border-radius:999px; padding:6px 12px; font-size:12.5px; font-weight:600; cursor:pointer; font-family:var(--sans); }
.chip-filtro span { color:var(--muted); font-weight:700; margin-left:4px; }
.chip-filtro.on { background:var(--ink); color:#fff; border-color:var(--ink); }
.chip-filtro.on span { color:#ffffffb3; }
.chip-filtro:focus-visible, .card a:focus-visible, button:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }

/* ===================== Notificações (toast) ===================== */
.toast-pilha { position:fixed; right:18px; bottom:18px; display:flex; flex-direction:column; gap:8px; z-index:100000; max-width:min(380px, calc(100vw - 36px)); }
.toast { background:var(--ink); color:#fff; padding:12px 14px; border-radius:10px; font-size:13px; line-height:1.45; box-shadow:0 8px 24px rgba(0,0,0,.18); cursor:pointer; border-left:4px solid var(--accent); animation:toast-in .18s ease-out; white-space:pre-line; }
.toast.ok { border-left-color:var(--ok); }
.toast.erro { border-left-color:#D9534F; }
.toast.saindo { opacity:0; transform:translateY(6px); transition:all .25s; }
@keyframes toast-in { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:none; } }

/* ===================== Modal de proposta ===================== */
.prop-meta { font-size:13px; line-height:1.7; background:var(--surface); border:1px solid var(--line); border-radius:10px; padding:10px 12px; margin-bottom:10px; word-break:break-word; }
.prop-aviso { background:var(--warn-soft); color:#8A5A12; border:1px solid #E9D3AD; border-radius:10px; padding:9px 12px; font-size:12.5px; margin-bottom:10px; }
.prop-preview { width:100%; height:min(52vh, 420px); border:1px solid var(--line); border-radius:10px; background:#fff; }
#modal button:disabled { opacity:.5; cursor:not-allowed; }

@media (max-width: 640px) {
  .kanban-topo { margin-top:18px; }
  .toast-pilha { right:10px; left:10px; bottom:10px; max-width:none; }
}

/* Indicadores em 2 colunas no celular (antes: 1 por linha ocupando a tela toda) */
@media (max-width: 640px) {
  .stats { display:grid !important; grid-template-columns:1fr 1fr !important; gap:10px !important; }
  .stats .stat:last-child { grid-column:1 / -1; }
  .stats .stat { padding:12px 14px; }
  .stats .stat .n { font-size:22px; }
}

/* =========================================================================
   CAMADA "CLEAN" (Out/2026) — mesmo tema claro/bege, menos ruído visual
   ========================================================================= */
:root {
  --line-soft: #ECE8DF;
  --ink-2: #4A4740;
  --radius: 12px;
}
body { font-size: 14px; -webkit-font-smoothing: antialiased; }

/* Barra lateral clara */
aside { background: var(--surface); color: var(--ink); border-right: 1px solid var(--line); padding: 20px 12px; }
.logo { border-bottom: 0; padding: 0 10px 18px; margin-bottom: 6px; }
.logo .burst { width: 30px; height: 30px; border-radius: 8px; font-family: var(--serif); font-size: 16px; font-weight: 700; }
.logo b { font-size: 16px; }
.logo span { color: var(--muted); }
nav { gap: 0; }
.nav-grupo { display: flex; flex-direction: column; gap: 1px; padding: 8px 0; border-top: 1px solid var(--line-soft); }
.nav-grupo:first-child { border-top: 0; padding-top: 0; }
nav button { color: var(--ink-2); font-weight: 500; font-size: 13.5px; padding: 8px 10px; border-radius: 8px; }
nav button:hover { background: #EFECE4; color: var(--ink); }
nav button.on { background: var(--white); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(31,30,29,.06), inset 0 0 0 1px var(--line); }
nav button.on .ico { color: var(--accent); }
nav button .qt { background: transparent; color: var(--muted); font-weight: 600; padding: 0; font-size: 12px; }
.nav-rot { display: flex; align-items: center; gap: 10px; }
.ico { width: 17px; height: 17px; flex: 0 0 17px; color: var(--muted); }
.side-foot { color: var(--muted); font-size: 12px; padding: 12px 10px; border-top: 1px solid var(--line-soft); }
.side-foot b { color: var(--accent); }

/* Topo */
main { padding: 24px 32px 0; }
.topbar { gap: 16px; margin-bottom: 20px; align-items: center; flex-wrap: nowrap; }
.topbar .titulo { min-width: 0; }
.topbar h1 { font-size: 24px; line-height: 1.2; }
.topbar .titulo p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.busca { margin-left: auto; width: 280px; padding: 8px 12px; border-radius: 9px; font-size: 13px; }
.busca:focus { outline: 0; box-shadow: 0 0 0 3px var(--accent-soft); border-color: var(--accent); }
.modo-badge { margin-left: 0; padding: 5px 10px; font-weight: 600; font-size: 12px; white-space: nowrap; }
.busca[style*="none"] + .modo-badge { margin-left: auto; }
.modo-badge.ok { background: var(--white); border: 1px solid var(--line); color: var(--ink-2); }
.modo-badge.ok .dot { background: var(--ok); box-shadow: none; }
.modo-badge.erro { background: var(--white); }
.modo-badge .sep { width: 1px; height: 12px; background: var(--line); margin: 0 4px; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--muted); cursor: pointer; }
.link-btn:hover { color: var(--accent); }

/* Indicadores */
.stats { gap: 12px; margin-bottom: 20px; }
.stat { border-color: var(--line-soft); border-radius: var(--radius); padding: 14px 16px; }
.stat .l { margin: 0 0 6px; font-size: 11.5px; font-weight: 500; text-transform: none; letter-spacing: 0; }
.stat .n { font-family: var(--sans); font-size: 24px; font-weight: 600; letter-spacing: -.3px; }
.stat.laranja .n { color: var(--accent); }
.stat.verde .n { color: var(--fech); }
.stat.ambar .n { color: var(--ink); }

/* Painéis */
.painel { border-color: var(--line-soft); border-radius: var(--radius); padding: 20px 22px; }
.painel h2 { font-size: 16px; margin-bottom: 14px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.h-sub { font-family: var(--sans); font-size: 12px; font-weight: 400; color: var(--muted); }
.funil .linha { grid-template-columns: 110px 1fr 32px; margin: 8px 0; font-size: 12.5px; color: var(--ink-2); }
.funil .barra { height: 8px; border-radius: 4px; }
.funil .fill { border-radius: 4px; }
.vazio { color: var(--muted); font-size: 13px; padding: 14px 0; text-align: center; }

/* Kanban */
.kanban-topo { margin: 28px 0 12px; }
.kanban-topo h2 { font-size: 16px; }
.chip-filtro { padding: 5px 11px; font-weight: 500; font-size: 12.5px; }
.board { gap: 12px; padding-bottom: 6px; }
.col { background: #F5F3EC; border: 0; border-radius: var(--radius); padding: 10px; }
.col > h3 { font-family: var(--sans); font-size: 12px; font-weight: 600; color: var(--ink-2); text-transform: none; letter-spacing: 0; padding: 2px 4px 10px; display: flex; justify-content: space-between; align-items: center; border: 0; }
.col > h3 .qt { background: transparent; color: var(--muted); font-weight: 600; }
.col > h3 > span:first-child::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--cor-col, var(--cinza)); margin-right: 8px; vertical-align: 1px; }
.cards { gap: 8px; }
.card { background: var(--white); border: 1px solid var(--line-soft); border-left: 0; border-radius: 10px; padding: 11px 12px; cursor: pointer; box-shadow: 0 1px 2px rgba(31,30,29,.04); transition: border-color .15s, box-shadow .15s; }
.card:hover { border-color: #D9D3C6; box-shadow: 0 3px 10px rgba(31,30,29,.07); }
.card:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.card .nm { font-size: 13.5px; font-weight: 600; line-height: 1.3; margin-bottom: 3px; }
.card .mt { font-size: 12px; color: var(--muted); }
.card .motivo { font-size: 12px; line-height: 1.45; color: var(--ink-2); background: none; border: 0; padding: 0; margin-top: 7px; font-style: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .valor { margin-top: 8px; font-size: 13px; font-weight: 600; color: var(--fech); }
.card .valor span { color: var(--muted); font-weight: 500; font-size: 11.5px; }
.card .acoes, .acoes { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 9px; }
.card .acoes a, .acoes a { background: none; border: 0; padding: 0; font-size: 12px; font-weight: 500; color: var(--muted); text-decoration: none; }
.card .acoes a:hover, .acoes a:hover { color: var(--ink); text-decoration: underline; }
.acoes a.cta { color: var(--accent); font-weight: 600; }

/* Selo de serviço */
.srv { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; color: var(--ink-2); }
.srv::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--cinza); }
.srv-guardiao::before { background: #4E8757; }
.srv-reativacao::before { background: #4F7BC4; }
.srv-sites::before { background: var(--accent); }
.tag.fup { background: var(--warn-soft); color: #8A5A12; border: 0; font-size: 10.5px; font-weight: 600; padding: 2px 7px; border-radius: 999px; }

/* Tabela */
table { font-size: 13px; }
thead th { font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: none; letter-spacing: 0; border-bottom: 1px solid var(--line); background: transparent; }
tbody td { border-bottom: 1px solid var(--line-soft); padding-top: 12px; padding-bottom: 12px; vertical-align: middle; }
tr.clicavel { cursor: pointer; }
tr.clicavel:hover td { background: var(--surface); }
.cli-nome { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cli-sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.pill { border-radius: 999px; font-weight: 600; }

/* Botões (todas as telas) */
.btn-cta, #modal .salvar, #modal .cancelar, #modal .perigo {
  border-radius: 9px; font-weight: 600; font-size: 13px; padding: 9px 16px; box-shadow: none; letter-spacing: 0; text-transform: none;
}
.btn-cta.primario, #modal .salvar { background: var(--ink); color: #fff; border: 1px solid var(--ink); }
.btn-cta.primario:hover, #modal .salvar:hover { background: #000; }
.btn-cta.secundario, #modal .cancelar { background: var(--white); color: var(--ink); border: 1px solid var(--line); }
.btn-cta.secundario:hover, #modal .cancelar:hover { border-color: #CFC8BA; background: var(--surface); }
#modal .perigo { background: none; border: 0; color: #B0483B; padding-left: 0; }
#modal .perigo:hover { text-decoration: underline; }

/* Formulários */
.field-group label, #modal label { font-size: 12px !important; font-weight: 600 !important; color: var(--ink-2) !important; text-transform: none !important; letter-spacing: 0 !important; }
.field-group input, .field-group select, .field-group textarea, #modal input, #modal select, #modal textarea {
  border: 1px solid var(--line); border-radius: 9px; background: var(--white); font-size: 13.5px; padding: 9px 11px; font-family: var(--sans); color: var(--ink);
}
.field-group input:focus, .field-group select:focus, #modal input:focus, #modal select:focus, #modal textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* Modal do lead */
#modal { border-radius: 16px; padding: 22px 24px; width: min(560px, 92vw); max-width: 92vw; }
.m-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.m-head h2 { margin: 2px 0 4px; font-family: var(--serif); font-size: 20px; line-height: 1.25; }
.m-eyebrow { font-size: 11.5px; font-weight: 600; color: var(--accent); }
.m-sub { font-size: 12.5px; color: var(--muted); }
.m-x { background: none; border: 0; font-size: 24px; line-height: 1; color: var(--muted); cursor: pointer; padding: 0 2px; align-self: flex-start; }
.m-x:hover { color: var(--ink); }
.m-motivo { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 10px; padding: 10px 12px; font-size: 12.5px; color: var(--ink-2); margin-bottom: 10px; line-height: 1.5; }
.m-motivo span { display: block; font-size: 11px; font-weight: 600; color: var(--muted); margin-bottom: 2px; }
.m-links { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; font-size: 12.5px; }
.m-links a { color: var(--accent); font-weight: 600; text-decoration: none; }
.m-links a:hover { text-decoration: underline; }
.mbot { display: flex; align-items: center; gap: 8px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line-soft); }

/* Toast */
.toast { background: var(--white); color: var(--ink); border: 1px solid var(--line); border-left: 3px solid var(--accent); box-shadow: 0 8px 24px rgba(31,30,29,.12); }

@media (max-width: 900px) {
  main { padding: 16px 16px 0; }
  .topbar { flex-wrap: wrap; padding-left: 52px; min-height: 40px; }
  .busca { order: 3; width: 100%; margin-left: 0; }
  .modo-badge { margin-left: auto; }
}
@media (max-width: 640px) {
  .topbar h1 { font-size: 20px; }
  .topbar .titulo p { display: none; }
  #modal { padding: 18px 16px; }
  .mrow { grid-template-columns: 1fr !important; }
}
i.st { display:inline-block; width:7px; height:7px; border-radius:50%; background:var(--cinza); margin-right:6px; vertical-align:1px; font-style:normal; }
i.st.on { background:var(--ok); }
td:nth-child(4) { white-space: nowrap; }
.pagin button { border:1px solid var(--line); background:var(--white); border-radius:7px; min-width:28px; height:28px; font-size:12px; cursor:pointer; color:var(--ink-2); }
.pagin button.on { background:var(--ink); color:#fff; border-color:var(--ink); }
.pagin button:disabled { opacity:.4; cursor:default; }
.sec-head { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; flex-wrap:wrap; margin-bottom:16px; }
.sec-head h2 { margin:0 0 4px; }
.sec-sub { font-size:12.5px; color:var(--muted); }
.sec-acoes { display:flex; gap:8px; flex-wrap:wrap; }
.estado { display:inline-flex; align-items:center; font-size:12.5px; font-weight:600; color:var(--ink-2); border:1px solid var(--line); border-radius:999px; padding:5px 11px; background:var(--white); }
.estado.alerta { color:#8A5A12; background:var(--warn-soft); border-color:#E9D3AD; }
/* cabeçalhos de seção antigos (inline) mais leves */
.painel > div[style*="border-bottom:1px solid var(--line)"] { border-bottom-color: var(--line-soft) !important; }
.painel h2[style] { font-size:16px !important; }
/* Botões/abas com verde fixo inline → mesmo padrão escuro do resto */
.btn-cta.primario[style*="#2F6F4E"], .btn-cta.primario[style*="var(--fech)"], .btn-cta.primario[style*="2F6F4E"] { background: var(--ink) !important; border-color: var(--ink) !important; color:#fff !important; }
.painel[style*="border-left:4px"], .painel[style*="border-left: 4px"] { border-left-width: 1px !important; }
@media (max-width: 900px) {
  .topbar .busca { margin-left: -52px; width: calc(100% + 52px); }
}
.opcoes-wa { display:flex; flex-direction:column; gap:10px; margin:4px 0 16px; }
.opcao { display:flex; gap:10px; align-items:flex-start; cursor:pointer; padding:10px 12px; border:1px solid var(--line-soft); border-radius:10px; background:var(--surface); }
.opcao input { margin-top:3px; accent-color: var(--accent); width:16px; height:16px; flex:0 0 16px; }
.opcao b { display:block; font-size:13px; font-weight:600; color:var(--ink); }
.opcao small { display:block; font-size:12px; color:var(--muted); margin-top:2px; }
.aviso-faixa { background:var(--warn-soft); border:1px solid #E9D3AD; color:#7A5212; border-radius:10px; padding:10px 14px; font-size:13px; margin-bottom:16px; }

/* Campo de senha com botão de mostrar/ocultar */
.campo-senha{position:relative;display:block;width:100%}
.campo-senha input{width:100%;padding-right:44px !important}
.olho-senha{position:absolute;right:6px;top:50%;transform:translateY(-50%);display:inline-flex;align-items:center;justify-content:center;
  width:32px;height:32px;padding:0;border:0;border-radius:7px;background:transparent;color:var(--muted,#6B675E);cursor:pointer}
.olho-senha:hover{background:rgba(0,0,0,.05);color:var(--ink,#1F1E1B)}
.olho-senha:focus-visible{outline:2px solid currentColor;outline-offset:1px}
input::-ms-reveal,input::-ms-clear{display:none}

/* Inteligência (Jev) */
.jev-barra{display:inline-block;vertical-align:middle;width:90px;height:7px;background:var(--line);border-radius:9px;overflow:hidden;margin-right:8px}
.jev-barra i{display:block;height:100%;border-radius:9px}
.jev-num{font-variant-numeric:tabular-nums;font-size:12.5px;color:var(--muted)}
.jev-chip{display:inline-flex;gap:6px;align-items:center;font-size:11.5px;color:var(--muted);background:var(--ok-soft);border-radius:99px;padding:2px 9px;margin:6px 0 12px}
.jev-chip.alerta{background:#FCE8E6;color:#B0483B}
.jev-link{color:var(--ink);text-decoration:none}.jev-link:hover{text-decoration:underline}
