/* Painel da Nina: tema escuro e laranja. Computador (menu lateral) e celular (menu embaixo).
   Fonte Sora (licença SIL OFL, arquivo em static/fonts): títulos e números. Texto corrido: fonte do sistema. */
@font-face {
  font-family: "Sora";
  src: url("fonts/sora-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #08080a; --card: #121215; --card-2: #18181c; --raise: #1e1e23;
  --ink: #f4f4f5; --muted: #a1a1aa; --faint: #71717a; --line: #24242a; --line-2: #2e2e35;
  --accent: #ff6a1a; --accent-strong: #ff8a4a; --accent-ink: #140a04; --glow: rgba(255, 106, 26, .28);
  --soft: #24140a; --soft-ink: #ffb48a; --soft-line: #4a2a14;
  --ok: #3ccf91; --ok-bg: #0f241a; --bad: #f2683c; --off: #71717a;
  --warn: #f5a36b; --warn-bg: #2a1a10;
  --raise-2: #26262c; --line-3: #3a3a42; --input-bg: #0d0d10; --tint: 255 255 255; --shadow: #000;
  --glass-top: rgba(8, 8, 10, .72); --glass-side: rgba(12, 12, 15, .86); --glass-bottom: rgba(18, 18, 22, .9);
  --glass-sheet: rgba(22, 22, 27, .97); --kcol-bottom: rgba(18, 18, 21, .6); --chat-bg: rgba(0, 0, 0, .26);
  --msg-humano: #33333a; --av-a: #2a2a31; --av-b: #1b1b20; --av-warm: #3a2414; --ok-ink: #a7f0cd; --ok-line: #1d4a35;
  --logo-a: #3a2010; --logo-b: #1a0f08;
  --radius: 14px; --side: 232px;
  --display: "Sora", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --text: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }  /* botões com display próprio continuam escondidos */
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font: 15.5px/1.55 var(--text); color: var(--ink);
  background:
    radial-gradient(1100px 520px at 88% -12%, rgba(255, 106, 26, .11), transparent 62%),
    radial-gradient(760px 420px at -8% 112%, rgba(255, 106, 26, .06), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
/* Grão bem leve por cima de tudo (dá textura ao preto). */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .035;
  background-image: 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%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
a { color: var(--accent-strong); text-underline-offset: 3px; }
h1, h2, h3, .brand, .kpi strong, .stat strong, .appt-time strong, .lead-stats strong, .rchart-n { font-family: var(--display); }
h1 { font-size: 1.85rem; margin: .25rem 0 1rem; font-weight: 700; letter-spacing: -.03em; line-height: 1.15; }
h2 { font-size: 1.02rem; margin: 0 0 .85rem; font-weight: 650; letter-spacing: -.01em; }
h3 { font-size: 1rem; }
.ico { width: 20px; height: 20px; flex: none; }
::selection { background: rgba(255, 106, 26, .35); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- estrutura ---------- */
.side { position: fixed; inset: 0 auto 0 0; width: var(--side); z-index: 5; display: flex; flex-direction: column; gap: 6px;
        padding: 20px 14px; background: var(--glass-side); backdrop-filter: blur(16px); border-right: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; font-size: 1.08rem; letter-spacing: -.02em; padding: 4px 10px 22px; }
.brand .ico { width: 26px; height: 26px; color: var(--accent); filter: drop-shadow(0 0 10px var(--glow)); }
.brand small { font-family: var(--text); font-weight: 500; font-size: .7rem; color: var(--faint); letter-spacing: .08em; text-transform: uppercase; margin-left: auto; }
.menu { display: flex; flex-direction: column; gap: 2px; }
.menu-label { font-size: .66rem; text-transform: uppercase; letter-spacing: .12em; color: var(--faint); font-weight: 600; padding: 14px 12px 6px; }
.menu a { position: relative; display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px; color: var(--muted);
          text-decoration: none; font-weight: 500; font-size: .94rem; transition: background .18s, color .18s; white-space: nowrap; }
.menu a:hover { color: var(--ink); background: rgb(var(--tint) / .045); }
.menu a.on { color: var(--ink); background: linear-gradient(90deg, rgba(255, 106, 26, .2), rgba(255, 106, 26, .03)); }
.menu a.on::before { content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 3px; background: var(--accent); box-shadow: 0 0 14px var(--glow); }
.menu a.on .ico { color: var(--accent); }
.side-out { margin-top: auto; }
.side-out button { width: 100%; justify-content: flex-start; color: var(--muted); }
.shell { position: relative; z-index: 1; margin-left: var(--side); min-height: 100vh; }
.top { position: sticky; top: 0; z-index: 4; display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center;
       padding: 12px 28px; background: var(--glass-top); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.top-title { display: none; align-items: center; gap: 8px; font-family: var(--display); font-weight: 700; letter-spacing: -.02em; }
.top-title .ico { color: var(--accent); }
.status { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-left: auto; }
.status-sum { display: none !important; }
.top-out { display: none; }
main { position: relative; max-width: 1200px; margin: 0 auto; padding: 26px 28px 48px; }
.bottom { display: none; }
.banner { position: relative; z-index: 2; background: var(--warn-bg); color: var(--warn); padding: 10px 28px; font-weight: 500; border-bottom: 1px solid var(--soft-line); }

/* ---------- componentes ---------- */
.card { position: relative; background: linear-gradient(180deg, var(--card-2), var(--card)); border: 1px solid var(--line);
        border-radius: var(--radius); padding: 20px 22px; margin-bottom: 16px; box-shadow: 0 1px 0 rgb(var(--tint) / .035) inset, 0 18px 40px -30px #000; }
.card > h2:first-child { display: flex; align-items: center; gap: 10px; }
.card > h2:first-child::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: var(--accent); box-shadow: 0 0 10px var(--glow); flex: none; }
.card > h2 + .hint { margin-top: -6px; margin-bottom: 14px; }
.narrow { max-width: 380px; margin: 10vh auto; }
label { display: block; margin-bottom: 14px; font-size: .84rem; font-weight: 500; color: var(--muted); }
label.check { display: inline-flex; gap: 8px; align-items: center; margin-right: 14px; color: var(--ink); font-size: .9rem; }
input, textarea, select { width: 100%; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--input-bg);
  color: var(--ink); font: inherit; font-size: .95rem; margin-top: 6px; transition: border-color .15s, box-shadow .15s, background .15s; }
input:hover, textarea:hover, select:hover { border-color: var(--line-3); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); background: var(--input-bg); box-shadow: 0 0 0 3px rgba(255, 106, 26, .2); }
input::placeholder, textarea::placeholder { color: var(--faint); }
textarea { line-height: 1.5; }
input[type=checkbox] { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
input[type=file] { max-width: 100%; min-width: 0; padding: 6px; color: var(--muted); font-size: .88rem; cursor: pointer; }
input[type=file]::file-selector-button { font: inherit; font-weight: 600; color: var(--ink); background: var(--raise); border: 1px solid var(--line-2);
  border-radius: 8px; padding: 7px 14px; margin-right: 12px; cursor: pointer; transition: background .15s, border-color .15s; }
input[type=file]::file-selector-button:hover { background: var(--raise-2); border-color: var(--accent); }
input.short { width: 7rem; }
button { font: inherit; cursor: pointer; border-radius: 10px; padding: 9px 16px; border: 1px solid transparent; display: inline-flex;
         align-items: center; gap: 7px; font-weight: 600; font-size: .92rem; transition: background .15s, border-color .15s, transform .12s, box-shadow .15s; }
button:active { transform: translateY(1px); }
button .ico { width: 18px; height: 18px; }
.btn { color: var(--accent-ink); background: linear-gradient(180deg, #ff7d36, #ff6a1a); box-shadow: 0 8px 22px -10px var(--glow), 0 1px 0 rgba(255, 255, 255, .25) inset; }
.btn:hover { background: linear-gradient(180deg, #ff9050, #ff7027); box-shadow: 0 10px 26px -10px rgba(255, 106, 26, .5), 0 1px 0 rgba(255, 255, 255, .25) inset; }
.btn-ghost { background: rgb(var(--tint) / .03); border-color: var(--line-2); color: var(--ink); }
.btn-ghost:hover { background: rgb(var(--tint) / .07); }
.btn-warn { background: rgba(255, 106, 26, .1); border: 1px solid var(--soft-line); color: var(--soft-ink); }
.btn-warn:hover { background: rgba(255, 106, 26, .18); }
.icon-only { padding: 8px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.row input, .row select { width: auto; flex: 1 1 140px; margin-top: 0; }
.row label { margin-bottom: 0; }
.inline { display: inline; }
.grid2, .grid3, .grid4 { display: grid; gap: 4px 16px; }
@media (min-width: 700px) {
  .grid2 { grid-template-columns: 1fr 1fr; } .grid3 { grid-template-columns: repeat(3, 1fr); }
  .grid4 { grid-template-columns: repeat(4, 1fr); }
}
fieldset { border: 1px solid var(--line); border-radius: 12px; margin: 0 0 14px; padding: 12px 14px; }
legend { font-size: .8rem; color: var(--muted); padding: 0 6px; }
table { width: 100%; border-collapse: collapse; font-size: .93rem; display: block; overflow-x: auto; }
th { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); font-weight: 600; }
th, td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:hover td { background: rgb(var(--tint) / .015); }
tr.attention td { background: var(--warn-bg); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line-2);
        font-size: .76rem; font-weight: 500; color: var(--muted); background: rgb(var(--tint) / .025); }
.pill.warn, .warn { color: var(--warn); border-color: var(--soft-line); }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--off); }
.pill.ok .dot { background: var(--ok); box-shadow: 0 0 8px rgba(60, 207, 145, .7); }
.pill.bad .dot { background: var(--bad); box-shadow: 0 0 8px rgba(242, 104, 60, .7); animation: pulse 1.8s ease-in-out infinite; }
.pill-val { color: var(--faint); }
.tag { display: inline-block; font-size: .72rem; padding: 2px 8px; border-radius: 999px; background: var(--warn-bg); color: var(--warn); font-weight: 600; }
.hint { color: var(--muted); font-size: .85rem; }
.strong { font-weight: 700; }
.flash { padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; background: var(--ok-bg); color: var(--ok-ink); border: 1px solid var(--ok-line);
         animation: rise .35s var(--ease) both; }
.flash.erro { background: var(--warn-bg); color: var(--warn); border-color: var(--soft-line); }
details { border-top: 1px solid var(--line); padding: 11px 0; } summary { cursor: pointer; font-weight: 600; }
summary:hover { color: var(--accent-strong); }
pre { white-space: pre-wrap; font-size: .8rem; color: var(--muted); }
.qa { border-top: 1px solid var(--line); padding-top: 8px; }
.av { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, var(--av-warm), var(--soft)); color: var(--soft-ink);
      display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .82rem; flex: none;
      box-shadow: 0 0 0 1px rgba(255, 138, 74, .18) inset; }

/* ---------- resumo do dia ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: linear-gradient(180deg, var(--card-2), var(--card)); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat span { display: block; font-size: .78rem; color: var(--muted); }
.stat strong { font-size: 1.7rem; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat.hot strong { color: var(--accent); }

/* ---------- atendimentos (lista + conversa) ---------- */
.inbox { display: grid; grid-template-columns: 330px minmax(0, 1fr); background: linear-gradient(180deg, var(--card-2), var(--card));
         border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; min-height: 60vh; }
.inbox-list { border-right: 1px solid var(--line); overflow-y: auto; overflow-x: hidden; max-height: 75vh; min-width: 0; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.filters { display: flex; gap: 6px; padding: 12px; border-bottom: 1px solid var(--line); }
.filters a { padding: 5px 13px; border-radius: 999px; text-decoration: none; color: var(--muted); border: 1px solid var(--line-2); font-size: .84rem; font-weight: 500; transition: color .15s, border-color .15s; }
.filters a:hover { color: var(--ink); }
.filters a.on { background: var(--soft); color: var(--soft-ink); border-color: var(--soft-line); font-weight: 600; }
.conv { position: relative; display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: background .15s; }
.conv:hover { background: rgb(var(--tint) / .03); }
.conv.on { background: linear-gradient(90deg, rgba(255, 106, 26, .14), transparent); }
.conv.on::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.conv-body { min-width: 0; flex: 1; }
.conv-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; min-width: 0; }
.conv-name { font-weight: 600; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-when { font-size: .72rem; color: var(--faint); white-space: nowrap; flex: none; font-variant-numeric: tabular-nums; }
.conv-last { display: block; font-size: .85rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inbox-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--muted); padding: 48px 24px; text-align: center; }
.inbox-empty .ico { width: 52px; height: 52px; padding: 12px; border-radius: 16px; color: var(--accent); background: var(--soft); box-shadow: 0 0 0 1px var(--soft-line) inset, 0 0 30px -6px var(--glow); }
.inbox-empty strong { color: var(--ink); font-family: var(--display); font-size: 1.02rem; }
.thread { display: flex; flex-direction: column; min-width: 0; }
.thread-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.thread-head h1 { font-size: 1.1rem; margin: 0; }
.thread-head .actions { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.back { display: none; }
.thread .chat { flex: 1; margin: 0; padding: 18px; max-height: 55vh; background: var(--chat-bg); border: 0; border-radius: 0; }
.reply { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); align-items: flex-end; }
.reply textarea { margin: 0; resize: vertical; min-height: 44px; }

/* ---------- balões de conversa (Atendimentos e Testar) ---------- */
.chat { display: flex; flex-direction: column; gap: 8px; min-height: 160px; max-height: 60vh; overflow-y: auto; margin: 14px 0;
        padding: 14px; border-radius: 12px; background: var(--chat-bg); border: 1px solid var(--line); scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.chat:empty { align-items: center; justify-content: center; }
.chat:empty::before { content: "Comece uma conversa: escreva como um cliente escreveria no WhatsApp."; color: var(--faint); font-size: .9rem; text-align: center; padding: 0 20px; }
.msg { max-width: 78%; padding: 9px 13px; border-radius: 16px; white-space: pre-wrap; line-height: 1.45; animation: rise .25s var(--ease) both;
       background: linear-gradient(180deg, #ff7d36, #ff6a1a); color: var(--accent-ink); align-self: flex-end; border-bottom-right-radius: 4px; }
.msg.cliente { align-self: flex-start; background: var(--raise); color: var(--ink); border: 1px solid var(--line-2);
               border-bottom-right-radius: 16px; border-bottom-left-radius: 4px; }
.msg.humano { background: var(--msg-humano); color: var(--ink); }
.msg.sistema { align-self: center; background: transparent; color: var(--muted); font-style: italic; font-size: .85rem; }
.msg .who { display: block; font-size: .72rem; opacity: .8; margin-bottom: 2px; font-weight: 600; }
.msg .when { display: block; font-size: .68rem; opacity: .75; text-align: right; margin-top: 2px; }

/* ---------- agendamentos (Visitas) ---------- */
.appt-filters { flex-wrap: wrap; padding: 0; border: 0; margin-bottom: 22px; }
.appt-section { margin-bottom: 28px; }
.appt-section > h2 { font-family: var(--text); font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--faint); margin-bottom: 12px; }
.appt-day { margin-bottom: 18px; }
.appt-day h3 { margin: 0 0 10px; font-size: 1.05rem; font-weight: 650; letter-spacing: -.01em; }
.appt-day h3 .hint { font-family: var(--text); font-weight: 400; margin-left: 4px; }
.appts { list-style: none; margin: 0; padding: 0; background: linear-gradient(180deg, var(--card-2), var(--card)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.appt { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line); transition: background .15s; }
.appt:hover { background: rgb(var(--tint) / .02); }
.appt:last-child { border-bottom: 0; }
.appt.alert { background: var(--warn-bg); }
.appt.off .appt-time strong, .appt.off .appt-title { text-decoration: line-through; color: var(--muted); }
.appt.off .av { opacity: .55; }
.appt-time { flex: none; width: 70px; padding-right: 12px; border-right: 1px solid var(--line); }
.appt-time strong { display: block; font-size: 1.15rem; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.appt-time span { font-size: .72rem; color: var(--faint); white-space: nowrap; }
.appt-main { flex: 1; min-width: 0; }
.appt-title { font-weight: 600; }
.appt-title span { font-weight: 400; color: var(--muted); }
.appt-sub { font-size: .82rem; color: var(--muted); overflow-wrap: anywhere; }
.appt-side { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .74rem; font-weight: 600; white-space: nowrap; background: var(--soft); color: var(--soft-ink); }
.badge.confirmado { background: var(--ok-bg); color: var(--ok); box-shadow: 0 0 0 1px var(--ok-line) inset; }
.badge.incerto, .badge.falhou { background: var(--warn-bg); color: var(--warn); box-shadow: 0 0 0 1px var(--soft-line) inset; }
.badge.cancelado { background: transparent; color: var(--muted); box-shadow: 0 0 0 1px var(--line-2) inset; }

/* ---------- cabeçalho da página ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.page-sub { margin: 6px 0 0; color: var(--muted); font-size: .9rem; }

/* ---------- números do topo (KPIs) ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 10px; margin-bottom: 20px; }
.kpi { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 15px; border-radius: var(--radius);
       background: linear-gradient(180deg, var(--card-2), var(--card)); border: 1px solid var(--line); transition: border-color .2s, transform .2s var(--ease); }
.kpi:hover { border-color: var(--line-2); transform: translateY(-1px); }
.kpi-label { font-size: .66rem; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); font-weight: 600; line-height: 1.3; min-height: 2.6em; }
.kpi strong { font-size: 1.85rem; font-weight: 700; letter-spacing: -.04em; font-variant-numeric: tabular-nums; line-height: 1; margin-top: auto; }
.kpi strong.kpi-small { font-size: 1.35rem; }
.kpi-foot { font-size: .78rem; color: var(--muted); }
.kpi.hot { border-color: var(--soft-line); background: linear-gradient(160deg, rgba(255, 106, 26, .16), var(--card) 65%); }
.kpi.hot::before { content: ""; position: absolute; inset: 0 0 auto; height: 2px; background: linear-gradient(90deg, var(--accent), transparent); }
.kpi.hot strong { color: var(--accent); text-shadow: 0 0 24px var(--glow); }
.kpi-bar { height: 4px; border-radius: 4px; background: rgb(var(--tint) / .06); overflow: hidden; }
.kpi-bar i { display: block; height: 100%; background: linear-gradient(90deg, #ff9a5a, var(--accent)); border-radius: 4px; transform-origin: left; animation: grow .8s var(--ease) .2s both; }
.kpi-bar i.w0 { width: 0%; } .kpi-bar i.w10 { width: 10%; } .kpi-bar i.w20 { width: 20%; } .kpi-bar i.w30 { width: 30%; }
.kpi-bar i.w40 { width: 40%; } .kpi-bar i.w50 { width: 50%; } .kpi-bar i.w60 { width: 60%; } .kpi-bar i.w70 { width: 70%; }
.kpi-bar i.w80 { width: 80%; } .kpi-bar i.w90 { width: 90%; } .kpi-bar i.w100 { width: 100%; }

/* ---------- funil ---------- */
.funil-filtros { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.funil-filtros input, .funil-filtros select { width: auto; flex: 1 1 180px; margin: 0; }
.funil-filtros .search { position: relative; flex: 2 1 260px; display: flex; }
.funil-filtros .search .ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--faint); }
.funil-filtros .search input { padding-left: 38px; flex: 1; }
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(272px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 14px; align-items: start;
          scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.kcol { --stage: #71717a; display: flex; flex-direction: column; min-height: 120px; border-radius: var(--radius); border: 1px solid var(--line);
        background: linear-gradient(180deg, color-mix(in srgb, var(--stage) 7%, var(--card)), var(--kcol-bottom) 120px); backdrop-filter: blur(6px); }
.kcol.drop { border-color: var(--accent); background: var(--soft); box-shadow: 0 0 0 3px rgba(255, 106, 26, .15); }
.stage-novo { --stage: #a1a1aa; } .stage-em_atendimento { --stage: #60a5fa; } .stage-qualificado { --stage: #a78bfa; }
.stage-visita_agendada { --stage: #ff6a1a; } .stage-documentos { --stage: #fbbf24; } .stage-pre_aprovado { --stage: #34d399; }
.stage-visita_realizada { --stage: #22d3ee; } .stage-negociacao { --stage: #f472b6; } .stage-venda_fechada { --stage: #22c55e; }
.stage-perdido { --stage: #ef4444; } .stage-nao_compareceu { --stage: #f59e0b; }
.kcol-head { display: flex; align-items: center; gap: 8px; padding: 12px 12px 10px; font-weight: 600; font-size: .86rem; border-bottom: 1px solid var(--line); }
.kdot { width: 8px; height: 8px; border-radius: 50%; background: var(--stage); box-shadow: 0 0 10px var(--stage); flex: none; }
.kcol-title { flex: 1; }
.kcount { font-size: .72rem; padding: 1px 8px; border-radius: 999px; background: rgb(var(--tint) / .06); color: var(--muted); font-variant-numeric: tabular-nums; }
.kcol-body { display: flex; flex-direction: column; gap: 8px; padding: 8px; }
.kempty { margin: 6px 4px; font-size: .78rem; color: var(--faint); text-align: center; padding: 16px 0; border: 1px dashed var(--line-2); border-radius: 10px; }
.kcard { position: relative; background: var(--card-2); border: 1px solid var(--line); border-radius: 12px; padding: 11px; cursor: grab;
         transition: transform .18s var(--ease), border-color .18s, box-shadow .18s; }
.kcard::before { content: ""; position: absolute; left: -1px; top: 12px; bottom: 12px; width: 2px; border-radius: 2px; background: var(--stage); opacity: .8; }
.kcard:hover { transform: translateY(-2px); border-color: var(--line-2); box-shadow: 0 14px 28px -16px rgba(0, 0, 0, .9); }
.kcard.dragging { opacity: .5; }
.kcard.temp-quente { border-color: var(--soft-line); box-shadow: 0 0 0 1px rgba(255, 106, 26, .1), 0 12px 30px -20px var(--glow); }
.kcard.temp-quente .av { box-shadow: 0 0 0 2px var(--accent); }
.kcard .av { background: linear-gradient(135deg, var(--av-a), var(--av-b)); color: var(--ink); }
.kcard-link { color: inherit; text-decoration: none; display: block; }
.kcard-top { display: flex; gap: 9px; align-items: center; }
.kcard-top .av { width: 32px; height: 32px; font-size: .72rem; }
.kcard-name { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.kcard-name strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .92rem; }
.kcard-name span { font-size: .7rem; color: var(--faint); font-variant-numeric: tabular-nums; }
.ktemp { display: inline-flex; align-items: center; gap: 3px; font-size: .64rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700;
         padding: 2px 8px; border-radius: 999px; background: var(--soft); color: var(--soft-ink); }
.ktemp .ico { width: 12px; height: 12px; }
.ktemp.quente { background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 14px -2px var(--glow); }
.ktemp.morno { background: rgba(251, 191, 36, .14); color: #fbbf24; }
.ktemp.frio { background: rgba(96, 165, 250, .14); color: #93c5fd; }
.kcard-facts { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.kcard-facts li { font-size: .72rem; padding: 2px 7px; border-radius: 6px; background: rgb(var(--tint) / .06); color: var(--ink); }
.kcard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 10px; margin: 10px 0 0; padding-top: 10px; border-top: 1px solid var(--line); }
.kcard-grid dt { font-size: .6rem; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); }
.kcard-grid dd { margin: 0; font-size: .8rem; font-weight: 600; }
.kcard-visit, .kcard-alert { display: flex; align-items: center; gap: 6px; }
.kcard-visit { margin-top: 9px; padding: 6px 8px; border-radius: 8px; font-size: .78rem; font-weight: 600; background: var(--soft); color: var(--soft-ink); box-shadow: 0 0 0 1px var(--soft-line) inset; }
.kcard-alert { margin-top: 6px; font-size: .74rem; color: var(--warn); }
.kcard-visit .ico, .kcard-alert .ico { width: 14px; height: 14px; flex: none; }
.kcard-origin { margin-top: 8px; font-size: .68rem; color: var(--faint); }
.kmove { border: 0; padding: 6px 0 0; }
.kmove summary { font-size: .74rem; font-weight: 600; color: var(--muted); }
.move-form { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.move-form input, .move-form select { margin: 0; }
.move-form .if-venda, .move-form .if-perdido { display: none; flex-direction: column; gap: 6px; }
.move-form.venda .if-venda, .move-form.perdido .if-perdido { display: flex; }
.kanban-hint { margin-top: 4px; }
#tester > .row + .row, #tester > .chat + form, #tester > form + .row, #tester > .row + form { margin-top: 10px; }

/* ---------- ficha do lead ---------- */
.lead-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.lead-head h1 { margin: 0; }
.lead-head .av { width: 48px; height: 48px; font-size: 1rem; }
.lead-tags { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.lead-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.lead-chat-head { justify-content: space-between; }
.lead-chat-head h2 { margin: 0; }
.objecoes { margin: 6px 0 10px; padding-left: 18px; }
.facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 7px 14px; margin: 0; font-size: .9rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--line); display: grid; gap: 12px; }
.timeline li { position: relative; display: flex; flex-direction: column; font-size: .88rem; }
.timeline li::before { content: ""; position: absolute; left: -20px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--bg), 0 0 10px var(--glow); }
.timeline span { color: var(--faint); font-size: .76rem; }
.back-link { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); text-decoration: none; font-size: .88rem; margin-bottom: 12px; }
.back-link:hover { color: var(--ink); }
.back-link .ico { width: 16px; height: 16px; }
.lead-hero { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px); padding: 22px; margin-bottom: 16px;
  background: radial-gradient(600px 220px at 0% 0%, rgba(255, 106, 26, .16), transparent 70%), linear-gradient(180deg, var(--card-2), var(--card)); }
.lead-hero-main { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.lead-hero h1 { margin: 0; }
.lead-hero .av { width: 56px; height: 56px; font-size: 1.1rem; }
.lead-hero.temp-quente .av { box-shadow: 0 0 0 2px var(--accent), 0 0 22px var(--glow); }
.lead-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.lead-stats > div { background: rgb(var(--tint) / .03); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.lead-stats span { display: block; font-size: .64rem; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); }
.lead-stats strong { display: block; font-size: .95rem; margin-top: 3px; overflow-wrap: anywhere; }

/* ---------- documentos ---------- */
.checklist { list-style: none; margin: 8px 0 12px; padding: 0; display: grid; gap: 4px; font-size: .9rem; }
.checklist li { color: var(--muted); }
.checklist li.ok { color: var(--ok); font-weight: 600; }
.doc-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.doc-row a { font-weight: 600; overflow-wrap: anywhere; }

/* ---------- relatórios ---------- */
.report-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-link { display: inline-flex; align-items: center; padding: 9px 16px; border-radius: 10px; text-decoration: none; font-weight: 600; font-size: .92rem;
            border: 1px solid var(--line-2); color: var(--ink); background: rgb(var(--tint) / .03); white-space: nowrap; }
.btn-link:hover { background: rgb(var(--tint) / .07); }
.report-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; }
.rfunil { display: grid; gap: 3px; }
.rfunil-row { display: grid; grid-template-columns: 130px minmax(0, 1fr) 40px 60px; align-items: center; gap: 10px; font-size: .88rem; }
.rfunil-bar { height: 22px; background: rgb(var(--tint) / .05); border-radius: 6px; overflow: hidden; }
.rfunil-bar i { display: block; height: 100%; background: linear-gradient(90deg, #ff9a5a, var(--accent)); border-radius: 6px; transform-origin: left; animation: grow .9s var(--ease) both; }
.rfunil-row strong { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--display); }
.rfunil-conv { margin-left: 140px; font-size: .72rem; color: var(--faint); }
.rchart { display: flex; align-items: flex-end; gap: 8px; height: 190px; padding-top: 10px; border-bottom: 1px solid var(--line); }
.rchart-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; min-width: 0; }
.rchart-bar { width: 70%; max-width: 46px; background: linear-gradient(180deg, #ff9a5a, var(--accent)); border-radius: 6px 6px 2px 2px; transform-origin: bottom; animation: growy .8s var(--ease) both; box-shadow: 0 0 18px -6px var(--glow); }
.rchart-n { font-size: .8rem; font-weight: 700; }
.rchart-x { font-size: .7rem; color: var(--faint); }
.rchart-empty { height: 190px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center;
                color: var(--muted); border: 1px dashed var(--line-2); border-radius: 12px; font-size: .9rem; }
.rchart-empty .ico { color: var(--accent); width: 28px; height: 28px; }
.rtable td.up { color: var(--ok); font-weight: 600; }
.rtable td.down { color: var(--bad); font-weight: 600; }
.rfunil-bar i.w0 { width: 2%; } .rchart-bar.h0 { height: 3%; }
.rfunil-bar i.w10 { width: 10%; } .rchart-bar.h10 { height: 10%; }
.rfunil-bar i.w20 { width: 20%; } .rchart-bar.h20 { height: 20%; }
.rfunil-bar i.w30 { width: 30%; } .rchart-bar.h30 { height: 30%; }
.rfunil-bar i.w40 { width: 40%; } .rchart-bar.h40 { height: 40%; }
.rfunil-bar i.w50 { width: 50%; } .rchart-bar.h50 { height: 50%; }
.rfunil-bar i.w60 { width: 60%; } .rchart-bar.h60 { height: 60%; }
.rfunil-bar i.w70 { width: 70%; } .rchart-bar.h70 { height: 70%; }
.rfunil-bar i.w80 { width: 80%; } .rchart-bar.h80 { height: 80%; }
.rfunil-bar i.w90 { width: 90%; } .rchart-bar.h90 { height: 90%; }
.rfunil-bar i.w100 { width: 100%; } .rchart-bar.h100 { height: 100%; }

@media print {
  body::before { display: none; }
  .side, .top, .bottom, .no-print, .banner, .flash { display: none !important; }
  .shell { margin: 0 !important; }
  main { padding: 0 !important; max-width: none; }
  body { background: #fff !important; color: #111 !important; --ink: #111; --muted: #555; --faint: #777; --card: #fff; --card-2: #fff; --line: #ddd; }
  .card, .kpi { box-shadow: none !important; break-inside: avoid; background: #fff !important; border-color: #ddd !important; }
  .report-grid { grid-template-columns: 1fr 1fr; }
  * { animation: none !important; }
}

/* ---------- login ---------- */
body.public { min-height: 100vh; display: flex; align-items: center; justify-content: center;
              background: radial-gradient(circle at 18% 8%, rgba(255, 106, 26, .2) 0, transparent 42%), radial-gradient(circle at 92% 96%, rgba(255, 106, 26, .08) 0, transparent 40%), var(--bg); }
body.public main { width: 100%; max-width: 420px; padding: 20px; }
.login { padding: 34px 30px 28px; border-radius: 22px; box-shadow: 0 30px 80px -30px #000, 0 0 0 1px rgb(var(--tint) / .02) inset; animation: rise .5s var(--ease) both; }
.login-brand { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; margin-bottom: 24px; }
.login-brand .logo { width: 64px; height: 64px; border-radius: 20px; display: flex; align-items: center; justify-content: center; color: var(--accent);
                     background: radial-gradient(circle at 30% 20%, var(--logo-a), var(--logo-b)); box-shadow: 0 0 0 1px var(--soft-line) inset, 0 12px 40px -12px var(--glow); }
.login-brand .logo .ico { width: 34px; height: 34px; filter: drop-shadow(0 0 10px var(--glow)); }
.login-brand h1 { margin: 0; font-size: 1.5rem; }
.login-brand p { margin: 0; color: var(--muted); font-size: .9rem; }
.login .btn { width: 100%; justify-content: center; padding: 12px; margin-top: 6px; }
.login-foot { text-align: center; margin-top: 16px; }

/* ---------- movimento ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
/* Entrada das telas: só desliza (nunca esconde o conteúdo, mesmo se a animação não rodar). */
@keyframes lift { from { transform: translateY(10px); } to { transform: none; } }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes growy { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes pulse { 50% { opacity: .45; } }
.app main > * { animation: lift .5s var(--ease) both; }
.app main > *:nth-child(2) { animation-delay: .05s; } .app main > *:nth-child(3) { animation-delay: .1s; }
.app main > *:nth-child(4) { animation-delay: .15s; } .app main > *:nth-child(n+5) { animation-delay: .2s; }
.kpis .kpi { animation: lift .5s var(--ease) both; }
.kpis .kpi:nth-child(2) { animation-delay: .04s; } .kpis .kpi:nth-child(3) { animation-delay: .08s; } .kpis .kpi:nth-child(4) { animation-delay: .12s; }
.kpis .kpi:nth-child(5) { animation-delay: .16s; } .kpis .kpi:nth-child(6) { animation-delay: .2s; } .kpis .kpi:nth-child(7) { animation-delay: .24s; }
.kcol .kcard { animation: lift .45s var(--ease) both; animation-delay: .15s; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- menu "Mais" do celular (só existe no menu de baixo) ---------- */
.more { position: relative; border: 0; padding: 0; flex: 1; min-width: 0; }
.more > summary { list-style: none; }
.more > summary::-webkit-details-marker { display: none; }

/* ---------- celular ---------- */
@media (max-width: 860px) {
  body { font-size: 15px; }
  .side { display: none; }
  .shell { margin-left: 0; }
  .top { padding: 10px 14px; flex-wrap: nowrap; gap: 8px; }
  .top-title { display: flex; flex: none; font-size: 1.02rem; }
  .top-out { display: inline; }
  .status { gap: 6px; flex-wrap: nowrap; min-width: 0; }
  .status .pill { display: none; }
  .status .status-sum { display: inline-flex !important; flex: none; }
  .status button { padding: 7px; }
  .status .btn-ghost span, .status .btn-warn span { display: none; }
  main > h1:first-child { display: none; }  /* o título já aparece no topo */
  main { padding: 16px 14px 104px; }
  h1 { font-size: 1.5rem; }
  .card { padding: 16px; }
  .bottom { display: flex; position: fixed; inset: auto 10px calc(10px + env(safe-area-inset-bottom)) 10px; z-index: 6; justify-content: space-around;
            padding: 6px; border-radius: 20px; background: var(--glass-bottom); backdrop-filter: blur(18px); border: 1px solid var(--line-2);
            box-shadow: 0 20px 40px -12px var(--shadow); }
  .bottom a, .more > summary { display: flex; flex-direction: column; align-items: center; gap: 3px; text-decoration: none; color: var(--muted);
              font-size: .66rem; font-weight: 500; padding: 7px 2px 6px; border-radius: 14px; flex: 1; min-width: 0; cursor: pointer; }
  .bottom a span, .more > summary span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .bottom a.on, .more.on > summary { color: var(--accent); font-weight: 700; background: rgba(255, 106, 26, .1); }
  .bottom .ico { width: 22px; height: 22px; }
  .more[open] > summary { color: var(--ink); background: rgb(var(--tint) / .06); }
  .more-sheet { position: absolute; right: 0; bottom: calc(100% + 12px); width: min(260px, calc(100vw - 20px)); display: grid; gap: 2px; padding: 8px;
                border-radius: 18px; background: var(--glass-sheet); backdrop-filter: blur(18px); border: 1px solid var(--line-2);
                box-shadow: 0 24px 50px -10px var(--shadow); animation: rise .2s var(--ease) both; }
  .more-sheet a { flex-direction: row; justify-content: flex-start; gap: 12px; font-size: .92rem; padding: 11px 12px; color: var(--ink); }
  .more-sheet a .ico { color: var(--muted); }
  .more-sheet a.on .ico { color: var(--accent); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .appt { flex-wrap: wrap; gap: 10px; padding: 12px; }
  .appt .av { display: none; }
  .appt-time { width: 62px; }
  .appt-main { flex-basis: calc(100% - 76px); }
  .appt-side { width: 100%; justify-content: flex-start; padding-left: 74px; }
  .lead-grid { grid-template-columns: minmax(0, 1fr); }
  .report-grid { grid-template-columns: minmax(0, 1fr); }
  .report-actions { width: 100%; }
  .report-actions > * { flex: 1; justify-content: center; }
  .rfunil-row { grid-template-columns: 100px minmax(0, 1fr) 32px; }
  .rfunil-row .hint { display: none; }
  .rfunil-conv { margin-left: 110px; }
  /* Números em faixa deslizante: o funil aparece logo, sem rolar sete cartões. */
  .kpis { display: grid; grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 40%; overflow-x: auto; scroll-snap-type: x mandatory;
          margin: 0 -14px 18px; padding: 0 14px 4px; scroll-padding-inline: 14px; scrollbar-width: none; }
  .kpis::-webkit-scrollbar { display: none; }
  .kpi { scroll-snap-align: start; padding: 12px 13px; }
  .kpi strong { font-size: 1.5rem; }
  .lead-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lead-tags { margin-left: 0; }
  .kanban { grid-auto-columns: minmax(80vw, 1fr); scroll-snap-type: x mandatory; }
  .kcol { scroll-snap-align: start; }
  .inbox { grid-template-columns: 1fr; min-height: 0; }
  .inbox-list { border-right: 0; max-height: none; }
  .inbox.has-thread .inbox-list { display: none; }
  .inbox:not(.has-thread) .thread { display: none; }
  .back { display: inline-flex; color: var(--ink); }
  .thread .chat { max-height: 58vh; }
  .msg { max-width: 88%; }
  .banner { padding: 10px 14px; }
}

/* ---------- tema claro (botão sol/lua no topo; a escolha fica neste navegador) ---------- */
:root[data-theme="light"] {
  --bg: #f6f5f3; --card: #ffffff; --card-2: #fdfcfb; --raise: #f3f1ee; --raise-2: #ebe8e4;
  --ink: #1c1917; --muted: #57534e; --faint: #78716c; --line: #e7e5e4; --line-2: #d6d3d1; --line-3: #a8a29e;
  --accent: #ea580c; --accent-strong: #c2410c; --accent-ink: #ffffff; --glow: rgba(234, 88, 12, .22);
  --soft: #fff1e6; --soft-ink: #9a3412; --soft-line: #fdcfa8;
  --ok: #15803d; --ok-bg: #e9f7ef; --ok-ink: #166534; --ok-line: #b7e4c7; --bad: #dc2626; --off: #a8a29e;
  --warn: #b45309; --warn-bg: #fff4e5;
  --input-bg: #ffffff; --tint: 0 0 0; --shadow: rgba(28, 25, 23, .22);
  --glass-top: rgba(246, 245, 243, .82); --glass-side: rgba(255, 255, 255, .88); --glass-bottom: rgba(255, 255, 255, .94);
  --glass-sheet: rgba(255, 255, 255, .98); --kcol-bottom: rgba(255, 255, 255, .7); --chat-bg: #f3f1ee;
  --msg-humano: #e7e5e4; --av-a: #f1efec; --av-b: #e7e5e4; --av-warm: #ffe4d1;
  --logo-a: #fff1e6; --logo-b: #ffe4d1;
  color-scheme: light;
}
:root[data-theme="light"] body::before { opacity: .02; }
:root[data-theme="light"] .card, :root[data-theme="light"] .kpi, :root[data-theme="light"] .appts, :root[data-theme="light"] .inbox {
  box-shadow: 0 1px 2px rgba(28, 25, 23, .04), 0 10px 30px -24px rgba(28, 25, 23, .25); }
:root[data-theme="light"] .ktemp.morno { background: #fef3c7; color: #a16207; }
:root[data-theme="light"] .ktemp.frio { background: #dbeafe; color: #1d4ed8; }
:root[data-theme="light"] .msg.cliente { background: #fff; }
:root[data-theme="light"] .kcard:hover { box-shadow: 0 14px 28px -18px rgba(28, 25, 23, .35); }

/* Botão de tema: mostra a lua no escuro e o sol no claro. */
.theme-btn .ico:has(.ico-sun) { display: none; }
:root[data-theme="light"] .theme-btn .ico:has(.ico-sun) { display: block; }
:root[data-theme="light"] .theme-btn .ico:has(.ico-moon) { display: none; }

/* ---------- menu lateral recolhido (só ícones) ---------- */
.side, .shell { transition: width .25s var(--ease), margin-left .25s var(--ease); }
/* Botão de recolher fica no topo, ao lado do nome: sempre visível, mesmo em tela baixa. */
.brand-row { display: flex; align-items: center; gap: 4px; padding-bottom: 14px; flex: none; }
.brand-row .brand { flex: 1; min-width: 0; padding-bottom: 4px; }
.side-toggle { flex: none; padding: 7px; color: var(--muted); border: 1px solid transparent; background: transparent; }
.side-toggle:hover { color: var(--ink); background: rgb(var(--tint) / .06); border-color: var(--line-2); }
.side-toggle .ico { transition: transform .25s var(--ease); }
/* Tela baixa: a lista do menu rola sozinha e o Sair continua visível. */
.menu { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; margin: 0 -14px; padding: 0 14px; }
:root[data-side="mini"] .menu { margin: 0 -10px; padding: 0 10px; }
.side-out { flex: none; padding-top: 8px; }
@media (max-height: 700px) {
  .menu a { padding: 7px 12px; }
  .menu-label { padding: 8px 12px 4px; }
  .brand-row { padding-bottom: 6px; }
}
:root[data-side="mini"] { --side: 76px; }
:root[data-side="mini"] .side { padding: 20px 10px; }
:root[data-side="mini"] .brand-row { flex-direction: column; gap: 10px; }
:root[data-side="mini"] .brand { justify-content: center; padding: 4px 0 0; }
:root[data-side="mini"] .brand span, :root[data-side="mini"] .brand small, :root[data-side="mini"] .menu a span,
:root[data-side="mini"] .side-out span { display: none; }
:root[data-side="mini"] .menu-label { font-size: 0; padding: 10px 0 4px; margin: 0 14px; border-top: 1px solid var(--line); }
:root[data-side="mini"] .menu-label:first-child { border-top: 0; }
:root[data-side="mini"] .menu a, :root[data-side="mini"] .side-out button { justify-content: center; padding: 10px 0; }
:root[data-side="mini"] .menu a.on::before { left: -10px; }
:root[data-side="mini"] .side-toggle .ico { transform: rotate(180deg); }
