/* Gravitas · Contatos com Prefeituras — identidade visual do site gravitas.net.br */
:root {
  --navy: #1E304B; --navy-2: #142339; --blue: #2E75B6; --orange: #E89C2A; --orange-2: #D08A1F;
  --bg: #F5F7FA; --bg-2: #FFFFFF; --text: #1B1F26; --muted: #5B6470; --grey: #888888; --line: #E3E8EF;
  --green: #2F9E6B; --red: #C0392B; --amber: #B58A00; --grey-2: #9AA3AE;
  --radius: 14px; --radius-lg: 18px; --radius-sm: 8px;
  --shadow: 0 12px 30px rgba(16,32,72,.08); --shadow-lg: 0 20px 50px rgba(16,32,72,.14);
  --maxw: 1180px; --transition: all .2s ease;
  --font-h: "Plus Jakarta Sans", "Inter", Arial, sans-serif; --font: "Inter", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.6; font-size: 15px; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--font-h); letter-spacing: -.01em; margin: 0; color: var(--navy); line-height: 1.2; }
h1 { font-size: clamp(24px, 3vw, 32px); font-weight: 800; }
h2 { font-size: 20px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 700; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.hide { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.nowrap { white-space: nowrap; }
.sr { position: absolute; left: -9999px; }

/* ---------- topo ---------- */
.topbar { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 40; box-shadow: 0 4px 20px rgba(16,32,72,.2); }
.topbar-in { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; display: flex; align-items: center; gap: 20px; height: 60px; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none !important; }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; background: var(--orange); display: grid; place-items: center; font-family: var(--font-h); font-weight: 800; color: var(--navy); font-size: 18px; }
.brand-name { font-family: var(--font-h); font-weight: 800; letter-spacing: .12em; font-size: 15px; line-height: 1.1; }
.brand-sub { font-size: 11px; color: #C6D0DE; letter-spacing: .02em; }
.nav { display: flex; gap: 4px; margin-left: 8px; }
.nav a { color: #C6D0DE; padding: 8px 12px; border-radius: 8px; font-weight: 500; font-size: 14px; }
.nav a:hover { color: #fff; text-decoration: none; background: rgba(255,255,255,.06); }
.nav a.on { color: #fff; background: rgba(255,255,255,.12); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.online { display: flex; align-items: center; gap: 6px; }
.online .av { box-shadow: 0 0 0 2px var(--navy); margin-left: -6px; }
.online .av:first-child { margin-left: 0; }
.online-label { font-size: 12px; color: #C6D0DE; margin-left: 4px; }
.me-btn { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.08); border: 0; color: #fff; padding: 4px 10px 4px 4px; border-radius: 999px; }
.me-btn:hover { background: rgba(255,255,255,.16); }
.menu { position: absolute; right: 20px; top: 56px; background: #fff; color: var(--text); border-radius: var(--radius); box-shadow: var(--shadow-lg); min-width: 220px; padding: 8px; z-index: 50; }
.menu button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 10px 12px; border-radius: 8px; }
.menu button:hover { background: var(--bg); }
.menu .menu-head { padding: 8px 12px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.demo-banner { background: #FFF4E0; color: #7A5200; border-bottom: 1px solid #F2D9A8; font-size: 13px; text-align: center; padding: 7px 16px; }
.demo-banner b { color: #5C3D00; }

/* ---------- layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 24px 20px 80px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head .lead { color: var(--muted); margin-top: 4px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.layout { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; }
.card { background: var(--bg-2); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; }
.card.pad-s { padding: 14px 16px; }
.section { margin-top: 28px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-head .count { color: var(--muted); font-size: 13px; }
.label { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--blue); }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--orange-2); }
.empty { color: var(--muted); padding: 24px; text-align: center; border: 1px dashed var(--line); border-radius: var(--radius); background: #fff; }

/* ---------- botões, campos ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid transparent; border-radius: 10px; padding: 9px 14px; font-weight: 600; font-size: 14px; background: #fff; border-color: var(--line); color: var(--navy); transition: var(--transition); }
.btn:hover { border-color: #C9D2DE; background: #FAFBFD; }
.btn-primary { background: var(--orange); color: var(--navy); border-color: var(--orange); }
.btn-primary:hover { background: var(--orange-2); border-color: var(--orange-2); }
.btn-navy { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn-navy:hover { background: var(--navy-2); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--blue); }
.btn-ghost:hover { background: rgba(46,117,182,.08); border-color: transparent; }
.btn-danger { color: var(--red); }
.btn-sm { padding: 6px 10px; font-size: 13px; border-radius: 8px; }
.btn[disabled] { opacity: .55; cursor: default; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.input, select.input, textarea.input { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; background: #fff; outline: none; transition: var(--transition); }
.input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(46,117,182,.14); }
textarea.input { min-height: 84px; resize: vertical; line-height: 1.5; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.form-grid .full { grid-column: 1 / -1; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.check input { width: 16px; height: 16px; accent-color: var(--blue); }

/* ---------- avatares, pills ---------- */
.av { width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-weight: 700; font-size: 11px; font-family: var(--font-h); flex: none; letter-spacing: .02em; }
.av.lg { width: 36px; height: 36px; font-size: 13px; }
.av.sm { width: 22px; height: 22px; font-size: 10px; }
.avs { display: inline-flex; align-items: center; }
.avs .av { box-shadow: 0 0 0 2px #fff; margin-left: -8px; }
.avs .av:first-child { margin-left: 0; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: #EEF2F7; color: var(--muted); white-space: nowrap; }
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pill.st { color: #fff; }
.chip { display: inline-flex; align-items: center; font-size: 12px; padding: 2px 8px; border-radius: 6px; background: #EEF2F7; color: var(--navy); font-weight: 500; }
.chip.party { background: #FFF1DD; color: #7A5200; }
.chip.city { background: #E3EEF8; color: var(--blue); }
.progress { height: 8px; background: #E8ECF2; border-radius: 999px; overflow: hidden; display: flex; }
.progress span { display: block; height: 100%; }

/* ---------- visão geral ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 22px; }
.stat { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; }
.stat .n { font-family: var(--font-h); font-size: 28px; font-weight: 800; color: var(--navy); line-height: 1.1; }
.stat .t { font-size: 12px; color: var(--muted); margin-top: 2px; }
.city-card { display: block; color: inherit; text-decoration: none !important; transition: var(--transition); }
.city-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.city-card h2 { font-size: 22px; }
.city-meta { color: var(--muted); font-size: 13px; margin-top: 4px; }
.city-prog { margin: 12px 0 8px; }
.city-legend { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.city-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; }
.city-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; gap: 8px; font-size: 13px; }
.mini-list { list-style: none; margin: 0; padding: 0; }
.mini-list li { padding: 10px 0; border-top: 1px solid var(--line); font-size: 13px; }
.mini-list li:first-child { border-top: 0; padding-top: 2px; }
.mini-list .when { color: var(--muted); font-size: 12px; }

/* ---------- cidade ---------- */
.back { font-size: 13px; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; margin-bottom: 8px; }
.city-side { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.city-side .card { padding: 14px 18px; }
.city-side .mini-list li { padding: 7px 0; }
.city-head { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.city-head .info { flex: 1; min-width: 260px; }
.city-head .facts { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 8px; font-size: 13px; color: var(--muted); }
.city-head .facts b { color: var(--text); font-weight: 600; }
.resumo { margin-top: 10px; font-size: 14px; color: var(--text); }
.resumo .edit { cursor: text; padding: 8px 10px; border-radius: 8px; border: 1px dashed transparent; }
.resumo .edit:hover { border-color: var(--line); background: #FAFBFD; }
.filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 20px 0 6px; }
.filters .input { width: auto; min-width: 150px; }
.filters .busca { min-width: 220px; flex: 1; }
.people { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.person { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; cursor: pointer; transition: var(--transition); border: 2px solid transparent; position: relative; display: flex; flex-direction: column; gap: 8px; }
.person:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.person.prio { border-color: #F4D9AE; }
.person .top { display: flex; gap: 12px; align-items: center; min-width: 0; }
.person .top > div { min-width: 0; }
.person .foto, .drawer .foto { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: none; background: #E8ECF2; }
.person .ini, .drawer .ini { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: #E8ECF2; color: var(--muted); font-family: var(--font-h); font-weight: 700; flex: none; }
.person .nm { font-weight: 700; color: var(--navy); font-family: var(--font-h); line-height: 1.2; }
.person .cg { font-size: 12px; overflow-wrap: anywhere; color: var(--muted); line-height: 1.35; margin-top: 2px; }
.person .bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
.person .last { font-size: 12px; color: var(--muted); }
.person .adj { border-top: 1px solid var(--line); padding-top: 8px; font-size: 12px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.person .adj a { color: var(--text); font-weight: 500; }
.person .adj .st-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.person .star { position: absolute; top: 10px; right: 12px; color: var(--orange); font-size: 14px; }
.canais { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.canal { background: #fff; border-radius: var(--radius-sm); box-shadow: var(--shadow); padding: 10px 14px; font-size: 13px; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 4px 12px; cursor: pointer; min-width: 0; }
.canal > * { min-width: 0; overflow-wrap: anywhere; }
.canal b { color: var(--navy); }
.canal .c { color: var(--muted); }

/* ---------- drawer ---------- */
.overlay { position: fixed; inset: 0; background: rgba(20,35,57,.45); z-index: 60; }
body.has-drawer { overflow: hidden; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100%); background: var(--bg); z-index: 61; overflow-y: auto; box-shadow: var(--shadow-lg); }
.drawer-head { background: #fff; padding: 18px 22px; display: flex; gap: 14px; align-items: center; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 2; }
.drawer-head > div { min-width: 0; flex: 1; }
.drawer-head h2 { font-size: 19px; overflow-wrap: anywhere; }
.drawer-head .close { margin-left: auto; background: none; border: 0; font-size: 22px; color: var(--muted); padding: 4px 8px; border-radius: 8px; }
.drawer-head .close:hover { background: var(--bg); }
.drawer-body { padding: 18px 22px 40px; display: flex; flex-direction: column; gap: 16px; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 6px 12px; font-size: 14px; }
.kv .k { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .02em; padding-top: 2px; }
.hist { list-style: none; margin: 0; padding: 0; }
.hist li { padding: 10px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 32px 1fr; gap: 10px; font-size: 14px; }
.hist li:first-child { border-top: 0; }
.hist .ico { width: 32px; height: 32px; border-radius: 10px; background: #EEF2F7; display: grid; place-items: center; font-size: 15px; }
.hist .meta { font-size: 12px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.hist .txt { margin-top: 2px; white-space: pre-wrap; }
.hist .next { margin-top: 4px; font-size: 13px; color: var(--blue); }
.hist .del { background: none; border: 0; color: var(--muted); font-size: 12px; padding: 0; }
.hist .del:hover { color: var(--red); }
.saved { font-size: 12px; color: var(--green); }
.who { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.who .w { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }

/* ---------- agenda ---------- */
.day { margin-top: 18px; }
.day h3 { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.day h3.today { color: var(--orange-2); }
.evt { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 16px; display: grid; grid-template-columns: 70px 1fr auto; gap: 12px; align-items: start; margin-bottom: 10px; border-left: 4px solid var(--blue); }
.evt.realizado { border-left-color: var(--green); opacity: .85; }
.evt.cancelado { border-left-color: var(--grey-2); opacity: .6; }
.evt.cancelado .t { text-decoration: line-through; }
.evt .time { font-family: var(--font-h); font-weight: 800; color: var(--navy); font-size: 18px; line-height: 1.1; }
.evt .time small { display: block; font-size: 11px; color: var(--muted); font-weight: 500; }
.evt .t { font-weight: 700; color: var(--navy); }
.evt .d { font-size: 13px; color: var(--muted); margin-top: 2px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.evt .with { margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; }
.evt .obs { font-size: 13px; margin-top: 6px; }
.evt .ops { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }

/* ---------- atividade ---------- */
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 16px; display: grid; grid-template-columns: 36px 1fr; gap: 12px; margin-bottom: 10px; }
.feed .h { font-size: 13px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.feed .b { margin-top: 3px; }
.feed .b b { color: var(--navy); }

/* ---------- modal ---------- */
.modal-wrap { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 16px; background: rgba(20,35,57,.5); }
.modal { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: min(640px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; }
.modal-head { padding: 18px 22px 10px; display: flex; align-items: center; justify-content: space-between; }
.modal-body { padding: 6px 22px 10px; display: flex; flex-direction: column; gap: 14px; }
.modal-foot { padding: 12px 22px 20px; display: flex; justify-content: flex-end; gap: 8px; }
.err { color: var(--red); font-size: 13px; }
.pick-list { max-height: 200px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; padding: 6px; display: flex; flex-direction: column; gap: 2px; }
.pick-list label { display: flex; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 8px; font-size: 14px; cursor: pointer; }
.pick-list label:hover { background: var(--bg); }
.pick-list label .sub { color: var(--muted); font-size: 12px; }

/* ---------- login ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%); padding: 20px; }
.login { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: min(420px, 100%); padding: 32px 30px; }
.login .brand { color: var(--navy); margin-bottom: 22px; }
.login .brand-sub { color: var(--muted); }
.login h1 { font-size: 22px; margin-bottom: 4px; }
.login .lead { color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.login form { display: flex; flex-direction: column; gap: 12px; }
.login .demo-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.login .demo-pick button { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); background: #fff; border-radius: 10px; font-weight: 600; color: var(--navy); }
.login .demo-pick button:hover { border-color: var(--blue); background: #F6F9FD; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow-lg); font-size: 14px; z-index: 90; }
.toast.err { background: var(--red); }

/* ---------- responsivo ---------- */
@media (max-width: 1000px) {
  .people { grid-template-columns: repeat(3, 1fr); }
  .layout { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .topbar-in { height: auto; padding: 10px 14px; flex-wrap: wrap; gap: 10px; }
  .nav { order: 3; width: 100%; margin: 0; justify-content: space-between; }
  .nav a { padding: 8px 6px; font-size: 13px; flex: 1; text-align: center; }
  .online-label { display: none; }
  .wrap { padding: 16px 14px 70px; }
  .people { grid-template-columns: 1fr 1fr; gap: 10px; }
  .person { padding: 12px; }
  .person .foto, .person .ini { width: 44px; height: 44px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .canais { grid-template-columns: 1fr; }
  .city-side { grid-template-columns: 1fr; }
  .canal { grid-template-columns: 1fr; }
  .canal .nowrap { white-space: normal; }
  .form-grid { grid-template-columns: 1fr; }
  .evt { grid-template-columns: 56px 1fr; }
  .evt .ops { grid-column: 1 / -1; flex-direction: row; justify-content: flex-start; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv .k { margin-top: 6px; }
  .filters .input { min-width: 0; flex: 1; }
  .filters .busca { min-width: 100%; }
  .menu { right: 10px; }
}
@media (max-width: 420px) {
  .people { grid-template-columns: 1fr; }
}
