/* ===== Identidade Basilar (design_system_basilar/DESIGN.md) =====
   Navy + azul institucional, cantos retos, sem sombras, bordas de 1px,
   Neue Montreal com rótulos em caixa alta. */
@font-face { font-family: 'Neue Montreal'; src: url('assets/fonts/NeueMontreal-Regular.ttf') format('truetype'); font-weight: 300 400; font-display: swap; }
@font-face { font-family: 'Neue Montreal'; src: url('assets/fonts/NeueMontreal-Medium.ttf') format('truetype'); font-weight: 500 700; font-display: swap; }

:root {
  --navy: #001234;
  --navy-deep: #000B1E;
  --blue: #0A5699;
  --blue-deep: #084579;
  --blue-soft: #E7EEF5;
  --accent: #0A3A52;
  --ink: #1A1A1A;
  --heading: #2B2727;
  --text: #333333;
  --ink-2: #4A5568;
  --muted: #5B5B5B;
  --gray: #8A9AAB;
  --placeholder: #B6B6B6;
  --line: rgba(0, 0, 0, .10);
  --line-2: #D9DCDD;
  --border: #C0C0C0;
  --surface: #FFFFFF;
  --canvas: #F5F6F7;
  --gray-bg: #E8E8E8;
  --green: #1F7A50;
  --danger: #A8261C;
  --danger-soft: #FBECEA;
  --radius: 2px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --caps: .06em;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; }
/* O fundo do html aparece nas faixas que o iPhone deixa fora da página (ex.: abaixo do menu inferior) */
html { background: var(--surface); }
body {
  font-family: 'Neue Montreal', 'Helvetica Neue', Arial, sans-serif;
  color: var(--text);
  background: var(--surface);
  letter-spacing: .02em;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
button, input, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; text-decoration: none; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }
::selection { background: var(--blue-soft); color: var(--navy); }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-thumb { background: #D5D9DD; border: 3px solid var(--surface); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.boot { position: fixed; inset: 0; display: grid; place-items: center; background: var(--surface); }
.spinner {
  width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--blue);
  animation: spin .8s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Componentes ===== */
.icons { display: flex; justify-content: center; margin-bottom: 28px; }
.icons--left { justify-content: flex-start; }
.icons span { width: 56px; height: 56px; display: grid; place-items: center; color: #fff; background: var(--navy); }
.icons span:nth-child(2) { background: var(--blue); }
.icons span:nth-child(3) { background: var(--canvas); color: var(--navy); border: 1px solid var(--line-2); }
.icons svg { width: 24px; height: 24px; }

.cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 14px;
  height: 48px; padding: 0 32px; border-radius: var(--radius);
  background: var(--blue); color: #fff; font-weight: 500; font-size: 13px;
  text-transform: uppercase; letter-spacing: .1em;
  transition: background .2s;
}
.cta:hover { background: var(--navy); }
.cta:active { background: var(--navy-deep); transform: translateY(1px); }
.ghost:active, .status-opt:active, .tpl-tab:active, .chip:active { transform: translateY(1px); }
.cta .arrow { width: 16px; height: 16px; }
.cta[disabled] { opacity: .45; pointer-events: none; }
.cta--block { width: 100%; }
.ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 48px; padding: 0 28px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface); color: var(--ink-2);
  font-size: 13px; font-weight: 500; text-transform: uppercase; letter-spacing: .08em;
  transition: border-color .2s, color .2s, background .2s;
}
.ghost:hover { border-color: var(--navy); color: var(--navy); }
.ghost.is-done { border-color: var(--green); color: var(--green); }
.ghost--sm { height: 40px; padding: 0 18px; font-size: 12px; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; color: var(--ink-2); transition: background .2s, color .2s; }
.icon-btn:hover { background: var(--canvas); color: var(--navy); }
.topbar .icon-btn { color: rgba(255, 255, 255, .85); }
.topbar .icon-btn:hover { background: rgba(255, 255, 255, .1); color: #fff; }
#pushBtn { color: #fff; background: var(--blue); }
.link { color: var(--ink-2); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--border); }
.link:hover { color: var(--navy); }

.field { display: grid; gap: 4px; margin-bottom: 18px; }
.field span { font-size: 11px; color: var(--ink-2); text-transform: uppercase; letter-spacing: .1em; }
.field input, .field textarea, .field select {
  border: 0; border-bottom: 1px solid var(--border); outline: 0; background: transparent; border-radius: 0;
  padding: 10px 0; width: 100%; font-size: 16px; color: var(--ink); transition: border-color .2s;
}
.field input::placeholder, .field textarea::placeholder { color: var(--placeholder); text-transform: uppercase; font-size: 13px; letter-spacing: .06em; }
.field input:focus, .field textarea:focus, .field select:focus { border-bottom-color: var(--blue); }
.field textarea { min-height: 150px; resize: vertical; line-height: 1.55; border: 1px solid var(--border); padding: 12px 14px; background: var(--surface); }
.field textarea:focus { border-color: var(--blue); }

/* ===== Login ===== */
.login { min-height: 100%; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.login__brand {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 48px;
  padding: 56px; color: #fff; overflow: hidden;
  background: var(--grain), linear-gradient(to top, rgba(0, 0, 0, .55), rgba(0, 0, 0, 0) 60%), var(--navy);
}
.login__brand::after {
  content: ''; position: absolute; right: -140px; bottom: -140px; width: 460px; height: 460px;
  border: 1px solid rgba(255, 255, 255, .08); border-radius: 50%;
}
.login__brandlogo { width: 260px; max-width: 100%; }
.login__kicker { margin: 0 0 18px; font-size: 13px; text-transform: uppercase; letter-spacing: .14em; color: rgba(255, 255, 255, .6); }
.login__title { font-size: 50px; line-height: 1.04; font-weight: 400; margin: 0; text-transform: uppercase; letter-spacing: .02em; }
.login__title strong { font-weight: 400; color: #7FB3E0; }
.login__features { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; max-width: 420px; position: relative; z-index: 1; }
.login__features li { display: grid; gap: 4px; padding: 18px 0; border-top: 1px solid rgba(255, 255, 255, .14); }
.login__features b { font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .12em; color: #fff; }
.login__features span { font-size: 15px; font-weight: 300; color: rgba(255, 255, 255, .65); }
.login__mark { position: absolute; right: -90px; bottom: -70px; width: 420px; opacity: .06; pointer-events: none; }
.kicker { margin: 0 0 14px; font-size: 12px; text-transform: uppercase; letter-spacing: .14em; color: var(--blue); }
.login__card { width: 100%; max-width: 440px; margin: auto; padding: 48px 32px; }
.login__logo { display: none; width: 220px; margin-bottom: 40px; }
.login__heading { margin: 0 0 28px; font-size: 30px; font-weight: 400; text-transform: uppercase; color: var(--heading); padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.login__form .cta { margin-top: 12px; }
.login__error { color: var(--danger); background: var(--danger-soft); padding: 10px 14px; font-size: 14px; margin: 0; }
.login .link { margin-top: 22px; }
.login__demo { margin: 28px 0 0; padding: 14px 16px; background: var(--canvas); border: 1px solid var(--line-2); font-size: 13px; line-height: 1.5; color: var(--ink-2); }

/* ===== Topo ===== */
.shell { height: 100%; display: flex; flex-direction: column; }
.topbar {
  position: relative; height: 76px; flex: none; display: flex; align-items: center; gap: 44px;
  padding: 0 32px; background: var(--navy); color: #fff;
}
.topbar__logo { height: 34px; }
.nav { display: flex; gap: 6px; height: 100%; }
.nav__item {
  position: relative; height: 100%; padding: 0 14px; font-size: 13px; font-weight: 500; text-transform: uppercase; letter-spacing: .06em;
  color: rgba(255, 255, 255, .7); display: inline-flex; align-items: center; gap: 8px; transition: color .2s;
}
.nav__item::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: 0; height: 3px; background: transparent; transition: background .2s; }
.nav__item:hover { color: #fff; }
.nav__item.is-active { color: #fff; }
.nav__item.is-active::after { background: var(--blue); }
.nav__badge {
  min-width: 20px; height: 20px; padding: 0 6px; background: var(--blue); color: #fff;
  font-size: 11px; font-weight: 500; letter-spacing: 0; display: inline-grid; place-items: center;
}
.topbar__right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.sync {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16);
  font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: rgba(255, 255, 255, .85); white-space: nowrap;
}
.sync__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gray); position: relative; }
.sync.is-ok .sync__dot { background: #3FBF7F; }
.sync.is-ok .sync__dot::after {
  content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid #3FBF7F;
  opacity: 0; animation: ping 2.4s var(--ease) infinite;
}
.sync.is-error .sync__dot { background: #F07167; }
.sync.is-error { color: #FFD3CF; border-color: rgba(240, 113, 103, .5); }
@keyframes ping { 0% { transform: scale(.6); opacity: .7; } 100% { transform: scale(1.6); opacity: 0; } }
.menu {
  position: absolute; right: 24px; top: 76px; z-index: 30; width: 320px; color: var(--text);
  background: var(--surface); border: 1px solid var(--line-2); padding: 22px;
  animation: fade .2s var(--ease);
}
.menu__email { font-size: 13px; color: var(--muted); margin: -4px 0 18px; word-break: break-all; }
.menu__demo { display: grid; gap: 8px; padding: 16px 0; margin-bottom: 16px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.menu__label { margin: 0 0 2px; font-size: 11px; color: var(--ink-2); text-transform: uppercase; letter-spacing: .1em; }
.menu > .ghost { width: 100%; }

/* ===== Estrutura ===== */
.layout { flex: 1; min-height: 0; display: grid; grid-template-columns: 380px 1fr; }

/* ===== Lista ===== */
.sidebar { border-right: 1px solid var(--line-2); display: flex; flex-direction: column; min-height: 0; background: var(--canvas); }
.sidebar__head { padding: 32px 24px 20px; display: grid; gap: 20px; }
.sidebar__title {
  margin: 0; font-size: 22px; font-weight: 400; text-transform: uppercase; color: var(--heading);
  display: flex; align-items: baseline; gap: 10px;
}
.sidebar__title span { font-size: 22px; color: var(--blue); }
.test-tools { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
/* Filtros da lista: uma linha só, em abas leves, rolando de lado se precisar */
.sidebar .segment {
  flex-wrap: nowrap; gap: 22px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line-2);
  -webkit-mask-image: linear-gradient(to right, #000 85%, transparent); mask-image: linear-gradient(to right, #000 85%, transparent);
}
.sidebar .segment::-webkit-scrollbar { display: none; }
.sidebar .segment button { flex: none; padding: 0 0 12px; border: 0; background: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.sidebar .segment button:hover { color: var(--navy); }
.sidebar .segment button.is-active { background: none; color: var(--navy); border-bottom-color: var(--blue); }
.segment { display: flex; flex-wrap: wrap; gap: 6px; }
.segment button {
  padding: 8px 12px; font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .06em;
  border: 1px solid var(--border); background: var(--surface); color: var(--ink-2); transition: all .2s;
}
.segment button:hover { border-color: var(--navy); color: var(--navy); }
.segment button.is-active { background: var(--blue); border-color: var(--blue); color: #fff; }
.segment button .n { opacity: .6; margin-left: 6px; }
.search { display: flex; align-items: center; gap: 10px; padding: 0 14px; height: 44px; background: var(--surface); border: 1px solid var(--line-2); color: var(--gray); }
.search:focus-within { border-color: var(--blue); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 15px; }
.search input::placeholder { color: var(--placeholder); text-transform: uppercase; font-size: 12px; letter-spacing: .06em; }

.lead-list { list-style: none; margin: 0; padding: 0 0 24px; overflow-y: auto; flex: 1; border-top: 1px solid var(--line-2); }
.lead {
  position: relative; display: grid; grid-template-columns: 42px 1fr auto; gap: 16px; align-items: center;
  padding: 20px 24px; cursor: pointer; border-bottom: 1px solid var(--line-2); background: var(--surface); transition: background .2s;
}
.lead:hover { background: #FAFBFC; }
.lead.is-selected { background: var(--blue-soft); }
.lead.is-selected::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--blue); }
.lead.is-fresh { animation: arrive .9s var(--ease); }
@keyframes arrive {
  0% { transform: translateY(-10px); opacity: 0; background: var(--blue-soft); }
  60% { transform: none; opacity: 1; }
}
.avatar { width: 42px; height: 42px; display: grid; place-items: center; font-weight: 500; font-size: 14px; letter-spacing: .04em; background: var(--canvas); color: var(--ink-2); border: 1px solid var(--line-2); }
.lead.is-novo .avatar { background: var(--navy); border-color: var(--navy); color: #fff; }
.lead__text { min-width: 0; }
.lead__name { font-weight: 500; font-size: 15px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lead__meta { font-size: 13px; color: var(--muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lead__side { display: grid; justify-items: end; gap: 6px; }
.lead__time { font-size: 12px; color: var(--gray); }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 400; padding: 4px 9px; text-transform: uppercase; letter-spacing: .08em; white-space: nowrap; }
.status--novo { background: var(--navy); color: #fff; }
.status--atendimento { border: 1px solid var(--blue); color: var(--blue); padding: 3px 8px; }
.status--contatado { background: var(--canvas); color: var(--ink-2); border: 1px solid var(--line-2); padding: 3px 8px; }
.status--contatado svg { width: 11px; height: 11px; stroke-width: 2.5; }
.list-empty { padding: 40px 16px; text-align: center; color: var(--muted); font-size: 14px; line-height: 1.5; }

/* ===== Centro ===== */
.center { overflow-y: auto; min-height: 0; position: relative; }
.center__inner { max-width: 780px; margin: 0 auto; padding: 48px 50px 72px; animation: fade .35s var(--ease); }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.back { display: none; align-items: center; gap: 4px; font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); margin: -8px 0 18px -6px; padding: 6px; }

.empty { min-height: 100%; display: grid; place-items: center; text-align: center; padding: 48px 24px; background: var(--grain), var(--surface); }
.empty h1 { font-size: 44px; line-height: 1.05; margin: 0; font-weight: 400; text-transform: uppercase; letter-spacing: .02em; color: var(--navy); }
.empty p { font-size: 18px; font-weight: 300; color: var(--ink-2); margin: 16px 0 0; }
.empty__mark { display: block; width: 88px; margin: 0 auto 32px; opacity: .9; animation: rise .6s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: .9; transform: none; } }

.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: #fff; background: var(--navy); padding: 6px 14px; }
.eyebrow svg { width: 14px; height: 14px; }
.headline { font-size: 50px; line-height: 1.04; margin: 20px 0 0; font-weight: 400; letter-spacing: .02em; color: var(--ink); overflow-wrap: anywhere; }
.headline strong { font-weight: 400; color: var(--blue); }
.subline { font-size: 18px; font-weight: 300; color: var(--ink-2); margin: 14px 0 0; line-height: 1.5; }

.contact { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.chip {
  display: inline-flex; align-items: center; gap: 10px; height: 46px; padding: 0 18px;
  border: 1px solid var(--border); background: var(--surface); font-size: 15px; color: var(--ink); max-width: 100%; transition: border-color .2s;
}
.chip:hover { border-color: var(--navy); }
.chip svg { color: var(--blue); }
.chip--icon { width: 46px; padding: 0; justify-content: center; }
.chip__text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip .copy-ico { color: var(--gray); width: 16px; height: 16px; }
.chip.is-done { border-color: var(--green); }
.chip.is-done .copy-ico { color: var(--green); }

.lead__momento { font-size: 12px; font-weight: 500; color: var(--blue); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Acompanhamento: status e momento lado a lado, cada um com seu rótulo */
.track { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; margin-top: 36px; padding: 28px; background: var(--canvas); border: 1px solid var(--line-2); }
.track__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.track__label { font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .12em; color: var(--heading); }
.track__hint { font-size: 12px; color: var(--muted); }
.track__opts { display: flex; flex-wrap: wrap; gap: 8px; }
.status-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 18px; }
.status-row .label { font-size: 11px; color: var(--ink-2); text-transform: uppercase; letter-spacing: .1em; margin-right: 8px; }
.status-opt {
  padding: 9px 14px; border: 1px solid var(--border); background: var(--surface); font-size: 12px; font-weight: 500;
  text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); transition: all .2s;
}
.status-opt:hover { border-color: var(--navy); color: var(--navy); }
.status-opt.is-active { border-color: var(--blue); background: var(--blue); color: #fff; }

.section { margin-top: 56px; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 22px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.section__title { font-size: 15px; margin: 0; font-weight: 500; text-transform: uppercase; letter-spacing: .08em; color: var(--heading); }
.section__hint { font-size: 14px; font-weight: 300; color: var(--ink-2); }
.momento__head .section__title { font-size: 13px; }

.tpl-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.tpl-tab {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border: 1px solid var(--border); background: var(--surface);
  font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); transition: all .2s;
}
.tpl-tab:hover { border-color: var(--navy); color: var(--navy); }
.tpl-tab.is-active { border-color: var(--navy); background: var(--navy); color: #fff; }
.tpl-tab .tag { font-size: 10px; font-weight: 400; padding: 2px 7px; background: var(--blue); color: #fff; letter-spacing: .08em; }
.message { background: var(--canvas); border: 1px solid var(--line-2); transition: border-color .2s; }
.message:focus-within { border-color: var(--blue); }
.message textarea { display: block; width: 100%; min-height: 190px; resize: none; overflow: hidden; border: 0; outline: 0; background: transparent; padding: 22px 24px; font-size: 16px; line-height: 1.6; color: var(--ink); }
.message__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

.answers { display: grid; gap: 0; border-top: 1px solid var(--line-2); }
.answer { display: grid; grid-template-columns: 20px 1fr; gap: 4px 10px; align-items: start; padding: 16px 4px; border-bottom: 1px solid var(--line-2); }
.answer .chev { color: var(--blue); width: 15px; height: 15px; margin-top: 1px; stroke-width: 2; }
.answer__q { font-size: 11px; color: var(--ink-2); text-transform: uppercase; letter-spacing: .08em; }
.answer__a { grid-column: 2; font-size: 18px; color: var(--ink); overflow-wrap: anywhere; }
.answers--empty { color: var(--muted); font-size: 15px; font-weight: 300; }
.meta-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line-2); border: 1px solid var(--line-2); margin: 0; }
.meta-grid div { background: var(--surface); padding: 14px 18px; }
.meta-grid dt { font-size: 11px; color: var(--ink-2); text-transform: uppercase; letter-spacing: .08em; }
.meta-grid dd { margin: 5px 0 0; font-size: 14px; color: var(--ink); word-break: break-word; }

.dock { display: none; }

.danger-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 32px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--gray); transition: color .2s; }
.danger-link:hover { color: var(--danger); }
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; background: rgba(0, 11, 30, .6); animation: fade .2s var(--ease); }
.modal__card { width: 100%; max-width: 460px; padding: 32px; background: var(--surface); border-top: 3px solid var(--navy); overflow-wrap: anywhere; }
.modal__card .section__title { font-size: 18px; }
.modal__card p { margin: 14px 0 26px; color: var(--ink-2); line-height: 1.5; }
.modal__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.cta--danger { background: var(--danger); }
.cta--danger:hover { background: #861E16; }
.cta--danger[disabled] { opacity: .6; }

/* Editor */
.editor-intro { margin-bottom: 40px; }
.editor-intro .headline { font-size: 44px; text-transform: uppercase; }
.tpl-card { border: 1px solid var(--border); padding: 26px; margin-bottom: 18px; background: var(--surface); transition: border-color .2s; }
.tpl-card:focus-within { border-color: var(--blue); }
.tpl-card__head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.tpl-num { width: 36px; height: 36px; background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 500; flex: none; }
.tpl-card:nth-of-type(2) .tpl-num { background: var(--blue); }
.tpl-card:nth-of-type(3) .tpl-num { background: var(--canvas); color: var(--navy); border: 1px solid var(--line-2); }
.tpl-name { flex: 1; min-width: 0; font-size: 20px; font-weight: 400; text-transform: uppercase; color: var(--heading); border: 0; outline: 0; padding: 4px 0; background: transparent; }
.vars { display: flex; flex-wrap: wrap; gap: 6px; }
.var { font-size: 12px; padding: 5px 10px; border: 1px dashed var(--border); color: var(--ink-2); }
.var:hover { border-color: var(--blue); color: var(--blue); }
.editor-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.is-readonly .field input, .is-readonly .field textarea, .is-readonly .tpl-name { cursor: default; }
.is-readonly .field input:focus { border-bottom-color: var(--border); }
.is-readonly .field textarea:focus { border-color: var(--border); }

/* Avisos */
.toasts { position: fixed; left: 24px; bottom: 24px; display: grid; gap: 8px; z-index: 50; }
.toast {
  display: flex; align-items: center; gap: 14px; width: 340px; padding: 14px 18px 14px 14px;
  background: var(--navy); color: #fff; border-left: 3px solid var(--blue); cursor: pointer; animation: toastIn .45s var(--ease);
}
.toast > div { min-width: 0; }
.toast.is-out { animation: toastOut .3s var(--ease) forwards; }
.toast__ico { width: 40px; height: 40px; background: var(--blue); display: grid; place-items: center; flex: none; }
.toast__title { font-weight: 500; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
.toast__body { font-size: 14px; opacity: .75; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toast--plain { width: auto; max-width: 440px; padding: 13px 18px; line-height: 1.45; font-size: 14px; }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px); } }

/* ===== Agenda ===== */
body.view-agenda .layout { grid-template-columns: minmax(0, 1fr); }
body.view-agenda .sidebar { display: none; }
.center__inner.agenda { max-width: 1560px; padding: 36px 50px 64px; animation: none; }
.agenda__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 32px; margin-bottom: 26px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.agenda__head .headline { margin: 0; font-size: 44px; text-transform: uppercase; }
.agenda__stats { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 10px 0 0; color: var(--ink-2); font-size: 15px; font-weight: 300; }
.agenda__stats b { color: var(--blue); font-weight: 500; }
.agenda__stats b.is-late { color: var(--danger); }
.agenda__stats i { width: 4px; height: 4px; background: var(--border); margin: 0 4px; }
.agenda__tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.agenda__filter { gap: 0; }
.agenda__filter button + button { border-left: 0; }
.agenda__nav { display: flex; align-items: center; gap: 4px; }
.cta--sm { height: 42px; padding: 0 20px; font-size: 12px; gap: 8px; }
.agenda__grid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 32px; align-items: start; }

.cal { min-width: 0; }
.cal__week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); padding-bottom: 10px; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); }
.cal__week span { padding-left: 10px; }
.cal__days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--line-2); border: 1px solid var(--line-2); }
.cal__day {
  position: relative; min-height: 116px; padding: 8px; background: var(--surface);
  display: flex; flex-direction: column; align-items: stretch; gap: 6px; text-align: left; min-width: 0;
  outline: 1px solid transparent; outline-offset: -1px; transition: background .2s, outline-color .2s;
}
.cal__day:hover { background: #FAFBFC; }
.cal__day.is-out { background: var(--canvas); }
.cal__day.is-out .cal__num { color: var(--placeholder); }
.cal__day.is-selected { outline: 2px solid var(--blue); outline-offset: -2px; z-index: 1; }
.cal__num { display: inline-grid; place-items: center; width: 28px; height: 28px; font-size: 14px; color: var(--ink); }
.cal__day.is-today .cal__num { background: var(--navy); color: #fff; }
.cal__events { display: grid; gap: 3px; min-width: 0; }
.cal__chip { display: block; padding: 3px 7px; font-size: 12px; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal__chip b { font-weight: 500; }
.cal__chip--visita { background: var(--navy); color: #fff; }
.cal__chip--ligacao { background: var(--blue); color: #fff; }
.cal__chip--reuniao { background: var(--blue-soft); color: var(--blue-deep); }
.cal__chip--retorno { background: var(--gray-bg); color: var(--ink); }
.cal__chip.is-done { opacity: .45; text-decoration: line-through; }
.cal__more { font-size: 12px; color: var(--muted); padding-left: 7px; }
.cal__dots { display: none; gap: 3px; justify-content: center; }
.cal__dots i, .cal__legend i { width: 8px; height: 8px; display: inline-block; flex: none; }
.cal__dot--visita { background: var(--navy); }
.cal__dot--ligacao { background: var(--blue); }
.cal__dot--reuniao { background: #9DBEDC; }
.cal__dot--retorno { background: var(--border); }
.cal__legend { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 14px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); }
.cal__legend span { display: inline-flex; align-items: center; gap: 8px; }

.agenda__day { min-width: 0; position: sticky; top: 0; }
.agenda__weekday { margin: 0; color: var(--blue); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; }
.agenda__date { margin: 4px 0 20px; font-size: 30px; font-weight: 400; text-transform: uppercase; color: var(--heading); line-height: 1.1; }
.agenda__sub { margin: 32px 0 12px; font-size: 13px; font-weight: 500; text-transform: uppercase; letter-spacing: .08em; color: var(--heading); }
.ag-list { display: grid; gap: 8px; }
.ag-card { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; padding: 18px; border: 1px solid var(--border); background: var(--surface); }
.ag-card--visita { border-left: 3px solid var(--navy); }
.ag-card--ligacao { border-left: 3px solid var(--blue); }
.ag-card.is-done { opacity: .6; }
.ag-card__time { font-size: 18px; color: var(--blue); padding-top: 1px; }
.ag-card__top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ag-card h3 { margin: 8px 0 2px; font-size: 18px; font-weight: 400; color: var(--ink); overflow-wrap: anywhere; }
.ag-card__meta { margin: 0; font-size: 13px; color: var(--muted); }
.ag-card__notes { margin: 10px 0 0; padding-top: 10px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-2); line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.ag-card__actions { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 12px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.ag-card__actions button, .ag-card__actions a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--border); padding: 3px 0; }
.ag-card__actions button:hover, .ag-card__actions a:hover { color: var(--navy); }
.ag-card__actions .is-danger:hover { color: var(--danger); }
.ag-tag { display: inline-block; padding: 3px 9px; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; flex: none; }
.ag-tag--visita { background: var(--navy); color: #fff; }
.ag-tag--ligacao { background: var(--blue); color: #fff; }
.ag-tag--reuniao { background: var(--blue-soft); color: var(--blue-deep); }
.ag-tag--retorno { background: var(--gray-bg); color: var(--ink); }
.ag-state { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.ag-state--late { color: var(--danger); }
.ag-empty { padding: 32px 20px; background: var(--canvas); border: 1px solid var(--line-2); text-align: center; color: var(--ink-2); }
.ag-empty p { margin: 0 0 14px; font-weight: 300; }
.ag-mini { display: grid; gap: 0; border-top: 1px solid var(--line-2); }
.ag-mini__item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 4px; border-bottom: 1px solid var(--line-2); text-align: left; font-size: 14px; transition: background .2s; }
.ag-mini__item:hover { background: var(--canvas); }
.ag-mini__item.is-done { opacity: .55; }
.ag-mini__item > span:nth-child(2) { flex: 1; min-width: 0; display: grid; }
.ag-mini__item b { font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-mini__item small { color: var(--muted); font-size: 12px; margin-top: 2px; }
.ag-mini__item .chev { color: var(--blue); width: 15px; height: 15px; stroke-width: 2; }
.section__head .ghost--sm { flex: none; }

.modal__card--form { max-width: 540px; max-height: calc(100dvh - 40px); overflow: hidden auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; }
.modal__card--form input, .modal__card--form select { min-width: 0; max-width: 100%; }
.modal__card--form .section__title { margin-bottom: 18px; }
.modal__card--form .modal__actions { margin-top: 10px; }
.tipo-opts { display: flex; flex-wrap: wrap; gap: 0; margin-bottom: 20px; }
.tipo-opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.tipo-opt span {
  display: block; padding: 10px 16px; border: 1px solid var(--border); margin-left: -1px; font-size: 12px; font-weight: 500;
  text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); cursor: pointer; transition: all .2s;
}
.tipo-opt:first-child span { margin-left: 0; }
.tipo-opt input:checked + span { position: relative; background: var(--blue); border-color: var(--blue); color: #fff; }
.tipo-opt input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234A5568' stroke-width='1.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 2px center; background-size: 18px; padding-right: 28px; }
.modal__card--form .field textarea { min-height: 84px; font-size: 15px; }
.field-row { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; }

/* ===== Relatórios ===== */
body.report-only .sidebar, body.report-only #pushBtn { display: none !important; }
.center__inner.report { max-width: 1560px; padding: 36px 50px 72px; animation: none; }
.report__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 32px; margin-bottom: 28px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.report__head .headline { margin: 0; font-size: 44px; text-transform: uppercase; }
.report__head .subline { margin-top: 8px; font-size: 16px; }
.report__filters { display: grid; justify-items: end; gap: 8px; }
.report__seg { gap: 0; }
.report__seg button + button { border-left: 0; }
.report__empty { margin-top: 12px; }
.report__note { margin-top: 18px; font-size: 13px; color: var(--muted); }

.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line-2); border: 1px solid var(--line-2); margin-bottom: 32px; }
.kpi { display: flex; flex-direction: column; gap: 10px; padding: 30px 32px; background: var(--surface); min-width: 0; }
.kpi--hero { background: var(--navy); color: #fff; }
.kpi__label { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); }
.kpi--hero .kpi__label { color: rgba(255, 255, 255, .7); }
.kpi__value { font-size: 36px; white-space: nowrap; font-weight: 400; letter-spacing: .02em; line-height: 1; color: var(--blue); }
.kpi--hero .kpi__value { color: #fff; }
.kpi__sub { font-size: 12px; color: var(--muted); }
.kpi__delta { font-size: 12px; color: rgba(255, 255, 255, .8); }

.report__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; align-items: start; }
.rcard { padding: 28px 32px 32px; border: 1px solid var(--line-2); background: var(--surface); min-width: 0; }
.rcard--wide { grid-column: 1 / -1; background: var(--canvas); }
.rcard__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 14px; margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.rcard__head .section__title { font-size: 13px; }
.rcard__q { font-size: 13px !important; line-height: 1.35; }

.hbars { display: grid; gap: 12px; }
.hbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; }
.hbar__label { font-size: 14px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar__value { font-size: 14px; font-weight: 500; color: var(--ink); text-align: right; }
.hbar__value small { font-weight: 400; color: var(--muted); margin-left: 6px; }
.hbar__track { grid-column: 1 / -1; height: 6px; background: var(--gray-bg); overflow: hidden; }
.hbar__fill { display: block; height: 100%; width: 0; background: var(--blue); transition: width .5s var(--ease); }

.vbars { display: flex; align-items: stretch; gap: 3px; height: 190px; }
.vbars--hours { height: 150px; gap: 2px; }
.vbar { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.vbar__col { flex: 1; display: flex; align-items: flex-end; transition: background .2s; }
.vbar:hover .vbar__col { background: rgba(10, 86, 153, .06); }
.vbar__fill { display: block; width: 100%; height: 0; min-height: 0; background: var(--blue); transition: height .5s var(--ease); }
.vbar:hover .vbar__fill { background: var(--navy); }
.vbar__x { height: 14px; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: visible; }

.rtable { display: grid; font-size: 14px; }
.rtable__row { display: grid; grid-template-columns: minmax(0, 1.8fr) repeat(4, minmax(0, .7fr)); gap: 8px; padding: 11px 0; border-bottom: 1px solid var(--line); align-items: center; color: var(--ink); }
.rtable__row > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rtable__row > span:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.rtable__row--head { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); padding-top: 0; }
.rtable__row:last-child { border-bottom: 0; }

@media (max-width: 1280px) {
  .report__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ===== Computador: detalhe e editor na horizontal ===== */
@media (min-width: 1280px) {
  .center__inner.detail, .center__inner.editor { max-width: 1340px; padding: 44px 56px 72px; }
  .detail {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 0 72px; align-items: start;
  }
  .detail__head {
    grid-column: 1 / -1; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px 56px; flex-wrap: wrap;
  }
  .detail__title { min-width: 0; }
  .detail__actions .contact { margin-top: 0; justify-content: flex-end; }
  .track { grid-column: 1 / -1; grid-template-columns: auto minmax(0, 1fr); gap: 0; padding: 26px 0; }
  .track__group { padding: 0 32px; }
  .track__group + .track__group { border-left: 1px solid var(--line-2); }
  .detail__main { grid-column: 2; grid-row: 3; position: sticky; top: 0; margin-top: 0; padding-top: 56px; }
  .detail__side { grid-column: 1; grid-row: 3; }
  .detail__side > .section:first-child { margin-top: 56px; }
  .detail__side .answer__a { font-size: 17px; }

  .editor-intro .headline { margin: 0; }
  .editor-intro .subline { max-width: 720px; }
  .tpl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: start; }
  .tpl-grid .tpl-card { margin-bottom: 0; display: flex; flex-direction: column; }
  .tpl-grid .field textarea { min-height: 260px; }
  .editor-actions { margin-top: 24px; }
}

/* ===== Tablet ===== */
@media (max-width: 1280px) {
  .agenda__grid { grid-template-columns: minmax(0, 1fr); }
  .agenda__day { position: static; }
}
@media (max-width: 1180px) {
  .topbar { gap: 24px; padding: 0 20px; }
  .layout { grid-template-columns: 330px 1fr; }
  .center__inner { padding: 36px 32px 56px; }
  .headline { font-size: 40px; }
}
@media (max-width: 960px) {
  .login { grid-template-columns: minmax(0, 1fr); }
  .login__brand { display: none; }
  .login__logo { display: block; }
}

/* ===== Celular ===== */
@media (max-width: 860px) {
  /* iPhone: o topo fica abaixo da barra de status e o rodapé encosta no fim da tela */
  html:has(#appView:not([hidden])) { background: var(--navy); }
  html:has(#appView:not([hidden])):has(body.show-detail:not(.view-agenda):not(.view-editor)) { background: var(--surface); }
  .shell { height: 100dvh; }
  .topbar { height: calc(60px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 8px 0 16px; gap: 12px; }
  .topbar__logo { height: 26px; }
  .nav {
    order: 3; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; height: auto; gap: 0;
    padding: 0 0 env(safe-area-inset-bottom); background: var(--navy); border-top: 1px solid rgba(255, 255, 255, .1);
  }
  .nav__item { flex: 1; justify-content: center; height: 58px; padding: 0 4px; font-size: 11px; }
  .nav__item::after { top: 0; bottom: auto; left: 24%; right: 24%; }
  .nav__item { flex-direction: column; gap: 5px; font-size: 10px; letter-spacing: .08em; position: relative; }
  .nav__ico { display: block; width: 22px; height: 22px; }
  .nav__item .nav__badge { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 17px; height: 17px; font-size: 10px; padding: 0 4px; }
  .me { width: 34px; height: 34px; }
  .sync { padding: 7px 10px; font-size: 11px; }
  .menu { right: 0; left: 0; top: calc(60px + env(safe-area-inset-top)); width: auto; border-left: 0; border-right: 0; }

  .layout { display: block; position: relative; overflow: hidden; }
  .sidebar { position: absolute; inset: 0; border: 0; }
  .sidebar__head { padding: 20px 16px 12px; }
  .lead { padding: 14px 16px; }
  .lead-list { padding: 0 0 90px; }
  .center {
    position: absolute; inset: 0; background: var(--surface); z-index: 10;
    transform: translateX(100%); transition: transform .3s var(--ease); visibility: hidden;
  }
  body.show-detail .center { transform: none; visibility: visible; }
  body.show-detail .nav { display: none; }
  body.view-editor .nav, body.view-agenda .nav { display: flex; }
  body.view-agenda .layout { display: block; }
  .center__inner.agenda { padding: 20px 16px 100px; }
  .agenda__head { margin-bottom: 16px; padding-bottom: 16px; }
  .agenda__head .headline { font-size: 30px; }
  .agenda__tools { width: 100%; justify-content: space-between; }
  .agenda__tools .cta--sm { width: 100%; order: 3; }
  .cal__week { padding-bottom: 6px; text-align: center; font-size: 10px; }
  .cal__week span { padding-left: 0; }
  .cal__day { min-height: 54px; padding: 4px 2px 6px; align-items: center; gap: 2px; }
  .cal__events { display: none; }
  .cal__dots { display: flex; min-height: 8px; }
  .cal__num { width: 26px; height: 26px; font-size: 13px; }
  .agenda__day { margin-top: 10px; }
  .center__inner.report { padding: 20px 16px 100px; }
  .report__head { margin-bottom: 16px; padding-bottom: 16px; }
  .report__head .headline { font-size: 30px; }
  .report__filters { justify-items: start; width: 100%; }
  .report__seg { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; }
  .report__seg button { flex: none; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi--hero { grid-column: 1 / -1; }
  .kpi__value { font-size: 34px; }
  .report__grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .rcard { padding: 18px 16px; }
  .vbars { height: 150px; gap: 2px; }
  body.report-only .nav { display: none; }
  .agenda__date { font-size: 24px; }
  .modal__card { padding: 24px 20px; }

  .center__inner { padding: 22px 16px 120px; }
  .back { display: inline-flex; }
  body.view-editor .back { display: none; }
  .headline { font-size: 34px; }
  .editor-intro .headline { font-size: 30px; }
  .subline { font-size: 16px; }
  .empty h1 { font-size: 32px; }
  .icons span { width: 48px; height: 48px; }
  .icons svg { width: 20px; height: 20px; }
  .contact { margin-top: 22px; }
  .track { margin-top: 28px; padding: 22px 18px; gap: 24px; }
  .sidebar__head { padding: 24px 16px 16px; gap: 16px; }
  .section { margin-top: 40px; }
  .section__hint { display: none; }
  .message textarea { font-size: 16px; padding: 16px 18px; }
  .message__actions .cta { display: none; }
  .message__actions .ghost { width: 100%; }
  .meta-grid { grid-template-columns: 1fr; }
  .dock {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 15;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: var(--surface); border-top: 1px solid var(--line-2);
  }
  .dock .cta { height: 52px; }
  .dock .cta svg { width: 20px; height: 20px; }
  .toasts { left: 12px; right: 12px; bottom: calc(72px + env(safe-area-inset-bottom)); }
  .toast { width: 100%; }
  .login__card { padding: calc(40px + env(safe-area-inset-top)) 20px calc(40px + env(safe-area-inset-bottom)); }
}
@media (max-width: 520px) {
  .sync span:last-child { display: none; }
  .sync { padding: 9px; }
}

/* ===== Acabamento ===== */
.nav__ico { display: none; }
.me {
  width: 36px; height: 36px; display: grid; place-items: center; margin-left: 4px;
  background: var(--blue); color: #fff; font-size: 12px; font-weight: 500; letter-spacing: .06em;
  transition: background .2s, box-shadow .2s;
}
.me:hover { background: #0B63B0; }
.me[aria-expanded="true"], .me:focus-visible { box-shadow: 0 0 0 2px var(--navy), 0 0 0 3px rgba(255, 255, 255, .5); }
.login__brand > * { position: relative; z-index: 1; }
.login__brand > .login__mark { position: absolute; z-index: 0; }
.lead { transition: background .2s, box-shadow .2s; }
.lead:hover { box-shadow: inset 3px 0 0 var(--line-2); }
.lead.is-selected:hover { box-shadow: none; }
.detail__title .eyebrow { margin-bottom: 4px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}@media (max-width: 860px) {
  .nav__ico { display: block; }
  .me { width: 34px; height: 34px; }
}

/* =====================================================================
   Refinamento visual (linha shadcn/ui adaptada à identidade Basilar)
   Superfícies em camadas, bordas suaves, cantos de 3px (DS: 0–3px),
   foco em anel, abas em trilho, badges suaves e popovers com sombra leve.
   ===================================================================== */
:root {
  --r: 3px;
  --r-lg: 4px;
  --bd: #E2E5E9;          /* borda padrão, mais suave */
  --bd-strong: #CDD2D8;   /* borda de controles */
  --bg-app: #F6F7F9;      /* fundo da área de trabalho */
  --ring: 0 0 0 3px rgba(10, 86, 153, .18);
  --pop: 0 10px 30px -12px rgba(0, 18, 52, .25), 0 2px 6px -2px rgba(0, 18, 52, .08);
}

/* Foco acessível em anel (no lugar do contorno) */
:focus-visible { outline: 0; box-shadow: var(--ring); }

/* ----- Botões ----- */
.cta, .ghost { height: 42px; border-radius: var(--r); font-size: 12px; letter-spacing: .1em; }
.cta { padding: 0 24px; gap: 10px; transition: background .2s, transform .1s; }
.cta:hover { background: var(--blue-deep); }
.ghost { padding: 0 20px; border-color: var(--bd-strong); color: var(--heading); }
.ghost:hover { border-color: var(--bd-strong); background: var(--canvas); color: var(--navy); }
.ghost--sm, .cta--sm { height: 36px; padding: 0 14px; font-size: 11px; }
.ghost svg, .cta svg { width: 16px; height: 16px; }

/* ----- Campos (rótulo em caixa normal, campo com borda e anel no foco) ----- */
.field { gap: 8px; margin-bottom: 18px; }
.field span { font-size: 13px; font-weight: 500; text-transform: none; letter-spacing: .02em; color: var(--heading); }
.field input, .field select {
  height: 42px; padding: 0 12px; border: 1px solid var(--bd-strong); border-radius: var(--r); background: var(--surface);
  font-size: 15px; transition: border-color .2s, box-shadow .2s;
}
.field textarea { border: 1px solid var(--bd-strong); border-radius: var(--r); padding: 12px; font-size: 15px; transition: border-color .2s, box-shadow .2s; }
.field input::placeholder, .field textarea::placeholder { text-transform: none; font-size: 15px; letter-spacing: .02em; color: var(--placeholder); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); box-shadow: var(--ring); }
.field select { background-position: right 10px center; padding-right: 34px; }

/* ----- Login ----- */
.login__heading { font-size: 26px; border-bottom: 0; padding-bottom: 0; margin-bottom: 8px; }
.login__sub { margin: 0 0 28px; color: var(--ink-2); font-size: 15px; font-weight: 300; }
.login__error { border-radius: var(--r); }
.login__demo { border-radius: var(--r-lg); border-color: var(--bd); }
.login .link { text-transform: none; font-size: 13px; letter-spacing: .02em; }

/* ----- Topo ----- */
.topbar { height: 64px; gap: 40px; }
.topbar__logo { height: 30px; }
.nav { gap: 2px; }
.nav__item { padding: 0 14px; font-size: 12px; letter-spacing: .08em; }
.nav__item::after { height: 2px; left: 14px; right: 14px; }
.nav__badge { border-radius: var(--r); }
.sync { border-radius: var(--r); padding: 6px 12px; font-size: 11px; }
.me { border-radius: var(--r); }
.menu { top: 64px; border-radius: var(--r-lg); border-color: var(--bd); box-shadow: var(--pop); padding: 20px; }

/* ----- Área de trabalho: fundo em camada, conteúdo em cartões ----- */
.center { background: var(--bg-app); }
.sidebar { background: var(--surface); border-right-color: var(--bd); }
.sidebar__head { border-bottom: 0; }
.search { height: 40px; border-radius: var(--r); border-color: var(--bd-strong); background: var(--surface); }
.search:focus-within { border-color: var(--blue); box-shadow: var(--ring); }
.search input::placeholder { text-transform: none; font-size: 14px; letter-spacing: .02em; }
.test-tools .cta, .test-tools .ghost { height: 36px; }

/* Lista: separadores finos recuados, seleção suave */
.lead-list { border-top: 1px solid var(--bd); padding: 6px 8px 24px; }
.lead { border-bottom: 0; border-radius: var(--r-lg); padding: 14px 14px; margin-bottom: 2px; }
.lead:hover { background: var(--canvas); box-shadow: none; }
.lead.is-selected { background: var(--blue-soft); }
.lead.is-selected::before { top: 10px; bottom: 10px; width: 3px; border-radius: 0 2px 2px 0; }
.avatar { border-radius: var(--r); border-color: var(--bd); width: 40px; height: 40px; font-size: 13px; }
.lead__name { font-size: 15px; }
.lead__meta { font-size: 13px; color: var(--ink-2); }

/* Badges suaves */
.status { border-radius: var(--r); padding: 3px 8px; font-size: 10px; font-weight: 500; letter-spacing: .08em; }
.status--novo { background: var(--navy); }
.status--atendimento { border: 0; padding: 3px 8px; background: var(--blue-soft); color: var(--blue); }
.status--contatado { border: 0; padding: 3px 8px; background: #EEF0F2; color: var(--ink-2); }
.eyebrow { border-radius: var(--r); padding: 5px 10px; font-size: 10px; }
.ag-tag, .tpl-tab .tag, .cal__chip { border-radius: var(--r); }

/* Seleções (status, momento, modelos, tipo de agenda) */
.status-opt, .tpl-tab, .tipo-opt span {
  height: 34px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: var(--r);
  border-color: var(--bd-strong); font-size: 11px; letter-spacing: .08em; color: var(--heading);
}
.status-opt:hover, .tpl-tab:hover { background: var(--canvas); border-color: var(--bd-strong); color: var(--navy); }
.tpl-tab.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }
.tipo-opts { gap: 6px; }
.tipo-opt span { margin-left: 0; }

/* Abas em trilho (filtros dos relatórios e da agenda) */
.report__seg, .agenda__filter { background: #ECEEF1; padding: 3px; border-radius: var(--r-lg); gap: 2px; flex-wrap: nowrap; }
.report__seg button, .agenda__filter button {
  border: 0 !important; background: transparent; height: 30px; padding: 0 12px; border-radius: var(--r); color: var(--ink-2); white-space: nowrap;
}
.report__seg button:hover, .agenda__filter button:hover { color: var(--navy); background: transparent; }
.report__seg button.is-active, .agenda__filter button.is-active { background: var(--surface); color: var(--navy); box-shadow: 0 1px 2px rgba(0, 18, 52, .08); }

/* Cartões */
.track, .detail__main, .detail__side > .section, .tpl-card, .rcard, .kpis, .ag-card, .ag-empty, .message, .cal__days, .meta-grid {
  border-radius: var(--r-lg);
}
.track { background: var(--surface); border-color: var(--bd); }
.detail__main, .detail__side > .section { background: var(--surface); border: 1px solid var(--bd); padding: 24px; }
.section__head { border-bottom-color: var(--bd); }
.section__title { font-size: 12px; letter-spacing: .12em; }
.answers { border-top: 0; }
.answer { border-bottom-color: var(--bd); padding: 14px 0; }
.answer:last-child { border-bottom: 0; padding-bottom: 0; }
.meta-grid { overflow: hidden; border-color: var(--bd); background: var(--bd); }
.message { background: var(--canvas); border-color: var(--bd); }
.message:focus-within { border-color: var(--blue); box-shadow: var(--ring); }
.chip { height: 40px; border-radius: var(--r); border-color: var(--bd-strong); background: var(--surface); font-size: 14px; }
.chip--icon { width: 40px; }
.tpl-card { border-color: var(--bd); }
.tpl-card:focus-within { border-color: var(--bd-strong); }
.tpl-num { border-radius: var(--r); width: 30px; height: 30px; font-size: 13px; }
.var { border-radius: var(--r); }
.kpis { overflow: hidden; border-color: var(--bd); background: var(--bd); }
.rcard { border-color: var(--bd); }
.rcard--wide { background: var(--surface); }
.hbar__track, .hbar__fill { border-radius: 2px; }
.vbar__fill { border-radius: 2px 2px 0 0; }
.ag-card { border-color: var(--bd); }
.ag-empty { border-color: var(--bd); background: var(--surface); }
.cal__days { overflow: hidden; border-color: var(--bd); background: var(--bd); }
.ag-mini { border-top-color: var(--bd); }
.ag-mini__item { border-bottom-color: var(--bd); border-radius: 0; }

/* Popovers: modal e avisos */
.modal { background: rgba(0, 11, 30, .45); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }
.modal__card { border-top: 0; border: 1px solid var(--bd); border-radius: var(--r-lg); box-shadow: var(--pop); }
.toast {
  background: var(--surface); color: var(--ink); border: 1px solid var(--bd); border-left: 0; border-radius: var(--r-lg);
  box-shadow: var(--pop); padding: 12px 16px 12px 12px;
}
.toast__ico { border-radius: var(--r); width: 36px; height: 36px; color: #fff; }
.toast__title { color: var(--navy); font-size: 12px; }
.toast__body { color: var(--ink-2); opacity: 1; }
.toast--plain { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ----- Celular ----- */
@media (max-width: 860px) {
  .topbar { height: calc(60px + env(safe-area-inset-top)); }
  .menu { top: calc(60px + env(safe-area-inset-top)); border-radius: 0; }
  .center { background: var(--bg-app); }
  .lead-list { padding: 6px 6px 96px; }
  .lead { padding: 12px 10px; }
  .detail__main, .detail__side > .section { padding: 18px 16px; }
  .track { padding: 20px 16px; }
  .toast--plain, .toast { width: 100%; }
}
@media (min-width: 1280px) {
  .detail { gap: 0 32px; }
  .detail__main { padding-top: 24px; margin-top: 28px; }
  .detail__side > .section:first-child { margin-top: 28px; }
  .detail__side > .section { margin-top: 20px; }
  .track { margin-top: 32px; }
}
@media (max-width: 1279px) {
  .detail__main, .detail__side > .section { margin-top: 20px; }
}
.danger-link { margin-top: 20px; }

/* =====================================================================
   Tema "Salix" com a identidade Basilar
   Fundo claro com linhas-guia, menu em pílula, cartões arredondados com
   sombra leve, títulos em caixa normal, botão principal marinho com brilho
   e animações suaves de entrada. Cores e fontes da Basilar mantidas.
   ===================================================================== */
:root {
  --r: 10px;
  --r-lg: 16px;
  --r-xl: 22px;
  --pill: 999px;
  --bd: #E6E8EC;
  --bd-strong: #D5D9DF;
  --bg-app: #F7F8FA;
  --spring: cubic-bezier(.34, 1.4, .64, 1);
  --smooth: cubic-bezier(.22, 1, .36, 1);
  --card-shadow: 0 1px 2px rgba(0, 18, 52, .04), 0 4px 16px -6px rgba(0, 18, 52, .08);
  --card-hover: 0 2px 4px rgba(0, 18, 52, .05), 0 12px 28px -10px rgba(0, 18, 52, .16);
  --glow: 0 8px 22px -6px rgba(10, 86, 153, .55), 0 0 0 1px rgba(0, 18, 52, .9);
  --glow-hover: 0 14px 30px -8px rgba(10, 86, 153, .7), 0 0 0 1px rgba(0, 18, 52, .9);
  --guides: linear-gradient(to right, rgba(0, 18, 52, .045) 1px, transparent 1px);
}

/* Caixa normal em tudo: leitura mais fácil e tom mais amigável */
.cta, .ghost, .nav__item, .section__title, .segment button, .status-opt, .tpl-tab, .tipo-opt span, .eyebrow, .status,
.ag-tag, .field span, .track__label, .kpi__label, .rtable__row--head, .cal__week, .cal__legend, .agenda__weekday,
.agenda__date, .agenda__sub, .headline, .sidebar__title, .login__heading, .login__title, .login__kicker, .kicker,
.empty h1, .tpl-name, .toast__title, .back, .danger-link, .link, .sync, .answer__q, .meta-grid dt, .menu__label,
.ag-state, .ag-card__actions, .tpl-tab .tag, .login__features b, .editor-intro .headline, .agenda__head .headline,
.report__head .headline, .nav__badge {
  text-transform: none;
  letter-spacing: .02em;
}

/* ----- Botões: principal marinho em pílula, com brilho ----- */
.cta {
  height: 44px; padding: 0 22px; border-radius: var(--pill); gap: 10px;
  background: var(--navy); color: #fff; font-size: 14px; font-weight: 500;
  box-shadow: var(--glow);
  transition: transform .25s var(--spring), box-shadow .25s var(--smooth), background .2s;
}
.cta:hover { background: #02204F; transform: translateY(-1px); box-shadow: var(--glow-hover); }
.cta:active { transform: translateY(0) scale(.98); background: var(--navy-deep); }
.cta .arrow {
  width: 24px; height: 24px; padding: 5px; margin-right: -10px; border-radius: 50%;
  background: rgba(255, 255, 255, .14); stroke-width: 2; transition: transform .25s var(--spring);
}
.cta:hover .arrow { transform: translateX(3px); }
.cta--sm { height: 38px; padding: 0 16px; font-size: 13px; }
.cta--danger { background: var(--danger); box-shadow: 0 8px 20px -8px rgba(168, 38, 28, .6); }
.ghost {
  height: 44px; padding: 0 18px; border-radius: var(--pill); font-size: 14px; font-weight: 500;
  background: var(--surface); border: 1px solid var(--bd-strong); color: var(--heading);
  transition: transform .25s var(--spring), border-color .2s, background .2s, box-shadow .25s;
}
.ghost:hover { background: var(--surface); border-color: #B9C0CA; transform: translateY(-1px); box-shadow: var(--card-shadow); }
.ghost:active { transform: scale(.98); }
.ghost--sm { height: 36px; padding: 0 14px; font-size: 13px; }

/* ----- Campos ----- */
.field input, .field select, .field textarea, .search { border-radius: var(--r); }
.field span { font-size: 13px; }

/* ----- Topo claro com navegação em pílula ----- */
.topbar {
  background: rgba(255, 255, 255, .86); color: var(--heading); border-bottom: 1px solid var(--bd);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  height: 68px; gap: 32px; z-index: 25;
}
.topbar__logo { height: 32px; }
.nav { height: auto; gap: 4px; padding: 4px; background: var(--canvas); border: 1px solid var(--bd); border-radius: var(--pill); }
.nav__item {
  height: 36px; padding: 0 16px; border-radius: var(--pill); font-size: 14px; color: var(--ink-2);
  transition: background .25s var(--smooth), color .2s, box-shadow .25s;
}
.nav__item::after { display: none; }
.nav__item:hover { color: var(--navy); }
.nav__item.is-active { background: var(--surface); color: var(--navy); box-shadow: 0 1px 2px rgba(0, 18, 52, .08), 0 0 0 1px var(--bd); }
.nav__badge { border-radius: var(--pill); background: var(--blue); min-width: 20px; height: 20px; }
.sync { background: var(--surface); border: 1px solid var(--bd); color: var(--ink-2); border-radius: var(--pill); font-size: 12px; padding: 7px 12px; }
.sync.is-ok .sync__dot { background: #1FA866; }
.sync.is-ok .sync__dot::after { border-color: #1FA866; }
.topbar .icon-btn { color: var(--ink-2); border-radius: 50%; }
.topbar .icon-btn:hover { background: var(--canvas); color: var(--navy); }
.me { border-radius: 50%; width: 36px; height: 36px; background: var(--navy); }
.me:hover { background: var(--blue); }
.menu { top: 74px; right: 20px; border-radius: var(--r-lg); padding: 20px; transform-origin: top right; animation: pop .28s var(--spring); }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.97); } to { opacity: 1; transform: none; } }

/* ----- Área de trabalho com linhas-guia ----- */
.center { background: var(--guides) 0 0 / 120px 100% repeat-x, var(--bg-app); }
.empty { background: transparent; }
.empty h1 { font-size: 40px; color: var(--navy); }
.headline { letter-spacing: .01em; }
.sidebar { background: var(--surface); }
.sidebar__title { font-size: 22px; font-weight: 500; }
.sidebar__title span {
  font-size: 13px; font-weight: 500; color: var(--blue); background: var(--blue-soft); border-radius: var(--pill);
  padding: 2px 10px; align-self: center;
}
.sidebar .segment button { font-size: 13px; }

/* Lista de leads: itens arredondados com leve deslocamento ao passar o mouse */
.lead { border-radius: 14px; padding: 14px 12px; transition: background .25s var(--smooth), transform .25s var(--spring); }
.lead:hover { background: var(--canvas); transform: translateX(2px); }
.lead.is-selected { background: var(--blue-soft); transform: none; }
.lead.is-selected::before { display: none; }
.avatar { border-radius: 50%; border: 0; background: #EEF1F5; color: var(--ink-2); font-weight: 500; }
.lead.is-novo .avatar { background: var(--navy); box-shadow: 0 0 0 3px rgba(10, 86, 153, .15); }
.lead.is-fresh { animation: arrive .7s var(--spring); }
@keyframes arrive { from { opacity: 0; transform: translateY(-14px) scale(.98); background: var(--blue-soft); } }

/* Selos em pílula com ponto de cor */
.status { border-radius: var(--pill); padding: 3px 10px 3px 8px; font-size: 12px; font-weight: 500; gap: 6px; }
.status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status--contatado::before { display: none; }
.status--novo { background: var(--navy); color: #fff; }
.status--atendimento { background: var(--blue-soft); color: var(--blue); }
.status--contatado { background: #EEF1F5; color: var(--ink-2); }
.eyebrow { border-radius: var(--pill); padding: 6px 12px; font-size: 12px; background: var(--surface); color: var(--navy); border: 1px solid var(--bd); box-shadow: 0 1px 2px rgba(0, 18, 52, .05); }
.eyebrow svg { color: var(--blue); }
.kicker {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: var(--pill);
  background: var(--surface); border: 1px solid var(--bd); color: var(--navy); font-size: 12px;
}
.ag-tag, .tpl-tab .tag { border-radius: var(--pill); padding: 2px 9px; font-size: 11px; }
.cal__chip { border-radius: 6px; }

/* Opções (status, momento, modelos): chips em pílula */
.status-opt, .tpl-tab, .tipo-opt span {
  height: 36px; border-radius: var(--pill); padding: 0 16px; font-size: 13px; border: 1px solid var(--bd-strong);
  background: var(--surface); color: var(--heading); transition: all .25s var(--smooth);
}
.status-opt:hover, .tpl-tab:hover { border-color: #B9C0CA; background: var(--surface); transform: translateY(-1px); }
.status-opt.is-active, .tipo-opt input:checked + span { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 6px 16px -8px rgba(10, 86, 153, .8); }
.tpl-tab.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }

/* Abas em trilho */
.report__seg, .agenda__filter, .sidebar .segment { border-radius: var(--pill); }
.report__seg, .agenda__filter { background: #EDEFF3; padding: 4px; }
.report__seg button, .agenda__filter button { border-radius: var(--pill); height: 32px; padding: 0 14px; font-size: 13px; transition: all .25s var(--smooth); }
.sidebar .segment { border-radius: 0; }

/* Cartões arredondados com sombra leve */
.track, .detail__main, .detail__side > .section, .tpl-card, .rcard, .ag-card, .ag-empty, .modal__card, .kpi, .cal {
  border-radius: var(--r-lg);
}
.track, .detail__main, .detail__side > .section, .tpl-card, .rcard, .ag-card, .ag-empty {
  background: var(--surface); border: 1px solid var(--bd); box-shadow: var(--card-shadow);
  transition: box-shadow .3s var(--smooth), transform .3s var(--smooth);
}
.rcard:hover, .tpl-card:hover, .ag-card:hover { box-shadow: var(--card-hover); }
.section__head { border-bottom: 0; padding-bottom: 0; margin-bottom: 18px; }
.section__title { font-size: 16px; font-weight: 500; color: var(--heading); }
.track__label { font-size: 13px; color: var(--ink-2); }
.message { border-radius: 14px; }
.chip { border-radius: var(--pill); height: 40px; padding: 0 16px; transition: all .25s var(--smooth); }
.chip:hover { transform: translateY(-1px); box-shadow: var(--card-shadow); }
.chip--icon { padding: 0; }
.meta-grid { border-radius: 12px; }
.answer { border-bottom-style: dashed; }
.tpl-num { border-radius: 50%; }

/* KPIs como cartões separados */
.kpis { background: transparent; border: 0; gap: 14px; overflow: visible; }
.kpi { border: 1px solid var(--bd); background: var(--surface); box-shadow: var(--card-shadow); padding: 24px 26px; }
.kpi--hero { background: linear-gradient(140deg, var(--navy) 0%, #062a63 100%); border-color: var(--navy); box-shadow: var(--glow); }
.kpi__label { font-size: 13px; }
.kpi__value { font-size: 40px; }
.hbar__track { height: 8px; border-radius: var(--pill); background: #EEF1F5; }
.hbar__fill { border-radius: var(--pill); background: linear-gradient(90deg, var(--blue), #3D85C6); transition: width .9s var(--smooth); }
.vbar__fill { border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, #3D85C6, var(--blue)); transition: height .9s var(--smooth); }
.vbar:hover .vbar__fill { background: var(--navy); }
.vbar:hover .vbar__col { background: transparent; }

/* Agenda */
.cal__days { border-radius: var(--r-lg); box-shadow: var(--card-shadow); }
.cal__day { transition: background .2s; }
.cal__day.is-today .cal__num { border-radius: 50%; }
.cal__day.is-selected { outline-width: 2px; outline-color: var(--blue); border-radius: 0; }
.cal__dots i, .cal__legend i { border-radius: 50%; }
.ag-mini__item { border-radius: 12px; border-bottom: 0; padding: 12px; transition: background .2s, transform .25s var(--spring); }
.ag-mini__item:hover { background: var(--surface); transform: translateX(2px); }
.ag-mini { border-top: 0; gap: 4px; }

/* Popovers */
.modal { animation: fade .25s var(--smooth); }
.modal__card { animation: modalIn .35s var(--spring); padding: 28px; }
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
.toast { border-radius: 14px; animation: toastIn .5s var(--spring); }
.toast__ico { border-radius: 50%; }
.toast__title { font-size: 14px; }
.toast--plain { border-radius: var(--pill); padding: 11px 18px; }

/* Login: painel da marca como um cartão arredondado */
.login { background: var(--guides) 0 0 / 120px 100% repeat-x, var(--bg-app); }
.login__brand { margin: 16px; border-radius: var(--r-xl); }
.login__title { text-transform: none; font-size: 52px; line-height: 1.05; }
.login__kicker { display: inline-block; padding: 5px 12px; border: 1px solid rgba(255, 255, 255, .2); border-radius: var(--pill); font-size: 12px; }
.login__features b { font-size: 14px; }
.login__card {
  background: var(--surface); border: 1px solid var(--bd); border-radius: var(--r-xl); box-shadow: var(--card-hover);
  padding: 40px 36px; animation: rise2 .6s var(--smooth) both;
}
.login__heading { font-size: 28px; font-weight: 500; }
.login__demo { border-radius: 12px; }
.login__form .cta { width: 100%; }

/* ----- Entrada suave do conteúdo (em cascata) ----- */
@keyframes rise2 { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.center__inner { animation: none; }
.center__inner > *, .detail__side > .section, .kpis > .kpi, .report__grid > .rcard, .tpl-grid > .tpl-card {
  animation: rise2 .55s var(--smooth) both;
}
.center__inner > *:nth-child(2), .kpis > .kpi:nth-child(2), .report__grid > .rcard:nth-child(2), .tpl-grid > .tpl-card:nth-child(2), .detail__side > .section:nth-child(2) { animation-delay: .05s; }
.center__inner > *:nth-child(3), .kpis > .kpi:nth-child(3), .report__grid > .rcard:nth-child(3), .tpl-grid > .tpl-card:nth-child(3), .detail__side > .section:nth-child(3) { animation-delay: .1s; }
.center__inner > *:nth-child(4), .kpis > .kpi:nth-child(4), .report__grid > .rcard:nth-child(4), .detail__side > .section:nth-child(4) { animation-delay: .15s; }
.kpis > .kpi:nth-child(5), .report__grid > .rcard:nth-child(5) { animation-delay: .2s; }
.kpis > .kpi:nth-child(6), .report__grid > .rcard:nth-child(n+6) { animation-delay: .25s; }
/* Re-renderizações sem mudar de tela não repetem a animação */
.no-anim .center__inner > *, .no-anim .detail__side > .section, .no-anim .kpis > .kpi, .no-anim .report__grid > .rcard, .no-anim .tpl-grid > .tpl-card { animation: none; }

/* ----- Celular ----- */
@media (max-width: 860px) {
  .topbar { height: calc(60px + env(safe-area-inset-top)); gap: 12px; }
  .topbar__logo { height: 26px; }
  html:has(#appView:not([hidden])), html:has(#appView:not([hidden])):has(body.show-detail:not(.view-agenda):not(.view-editor)) { background: var(--bg-app); }
  /* Menu inferior flutuante em pílula */
  .nav {
    left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); padding: 5px;
    background: rgba(255, 255, 255, .92); border: 1px solid var(--bd); border-radius: 22px;
    box-shadow: 0 12px 32px -10px rgba(0, 18, 52, .3); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  }
  .nav__item { height: 52px; border-radius: 17px; font-size: 11px; gap: 3px; color: var(--ink-2); }
  .nav__item.is-active { background: var(--navy); color: #fff; box-shadow: 0 6px 16px -6px rgba(0, 18, 52, .6); }
  .nav__item .nav__badge { top: 4px; }
  .menu { top: calc(66px + env(safe-area-inset-top)); left: 12px; right: 12px; border-radius: var(--r-lg); }
  .lead-list { padding: 6px 6px 110px; }
  .center__inner { padding-bottom: 130px; }
  .dock { background: rgba(255, 255, 255, .92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top-color: var(--bd); }
  .dock .cta { height: 52px; }
  .toasts { bottom: calc(92px + env(safe-area-inset-bottom)); }
  .login__card { border: 0; box-shadow: none; border-radius: 0; background: transparent; }
  .login { background: var(--surface); }
  .kpi__value { font-size: 32px; }
  .empty h1 { font-size: 30px; }
}
@media (max-width: 1180px) {
  .nav__item { padding: 0 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
}
.cta--head { height: 40px; padding: 0 18px; }
.cta--head svg { width: 18px; height: 18px; }
@media (max-width: 860px) { .cta--head { display: none; } }
/* No celular o topo é sólido: o efeito de vidro prenderia o menu inferior (position: fixed) dentro do cabeçalho */
@media (max-width: 860px) {
  .topbar { background: var(--surface); backdrop-filter: none; -webkit-backdrop-filter: none; }
}
