/* Painel Automação IG — design system (ui-ux-pro-max: AI-Native UI, roxo + ciano, Plus Jakarta Sans) */
:root {
  --bg: #f6f2ff;
  --bg-2: #ece6ff;
  --fg: #1e1b4b;
  --muted-fg: #5b5878;
  --card: rgba(255, 255, 255, .78);
  --card-solid: #fff;
  --border: #ddd6fe;
  --primary: #7c3aed;
  --primary-2: #a78bfa;
  --on-primary: #fff;
  --accent: #0891b2;
  --ok: #059669;
  --warn: #d97706;
  --danger: #dc2626;
  --ring: rgba(124, 58, 237, .45);
  --shadow: 0 1px 2px rgba(30, 27, 75, .06), 0 12px 32px -12px rgba(76, 29, 149, .22);
  --shadow-lg: 0 2px 4px rgba(30, 27, 75, .06), 0 30px 60px -20px rgba(76, 29, 149, .35);
  --radius: 18px;
  --radius-sm: 12px;
  --grad: linear-gradient(135deg, #7c3aed 0%, #a855f7 45%, #0891b2 100%);
  --ease: cubic-bezier(.22, 1, .36, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f0b24;
    --bg-2: #181238;
    --fg: #ede9fe;
    --muted-fg: #a5a0c8;
    --card: rgba(30, 24, 66, .72);
    --card-solid: #1c1640;
    --border: #3b2f7a;
    --primary: #8b5cf6;
    --primary-2: #c4b5fd;
    --accent: #22d3ee;
    --ok: #34d399;
    --warn: #fbbf24;
    --danger: #f87171;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px -12px rgba(0, 0, 0, .6);
    --shadow-lg: 0 30px 60px -20px rgba(0, 0, 0, .75);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f0b24; --bg-2: #181238; --fg: #ede9fe; --muted-fg: #a5a0c8; --card: rgba(30, 24, 66, .72);
  --card-solid: #1c1640; --border: #3b2f7a; --primary: #8b5cf6; --primary-2: #c4b5fd; --accent: #22d3ee;
  --ok: #34d399; --warn: #fbbf24; --danger: #f87171;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px -12px rgba(0, 0, 0, .6);
  --shadow-lg: 0 30px 60px -20px rgba(0, 0, 0, .75); color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; color: var(--fg); background: var(--bg);
  font: 15px/1.55 "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  background-image:
    radial-gradient(60rem 40rem at 85% -10%, rgba(124, 58, 237, .18), transparent 60%),
    radial-gradient(50rem 36rem at -10% 110%, rgba(8, 145, 178, .15), transparent 60%);
  background-attachment: fixed;
}
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -.02em; }
h1 { font-size: 1.7rem; font-weight: 800; }
h2 { font-size: 1.15rem; font-weight: 700; }
h3 { font-size: 1rem; font-weight: 700; }
p { margin: 0; }
a { color: var(--primary); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; border-radius: 8px; }
.muted { color: var(--muted-fg); }
.small { font-size: .85rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.icon { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon.sm { width: 16px; height: 16px; }
.icon.lg { width: 28px; height: 28px; }

/* ===== Estrutura ===== */
.app { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; padding: 20px 14px; display: flex; flex-direction: column; gap: 18px;
  background: var(--card); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-right: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px; font-weight: 800; font-size: 1.05rem; letter-spacing: -.02em; }
.brand-mark { width: 38px; height: 38px; border-radius: 12px; background: var(--grad); display: grid; place-items: center; color: #fff; box-shadow: 0 8px 20px -6px rgba(124, 58, 237, .6); }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 14px; text-decoration: none;
  color: var(--muted-fg); font-weight: 600; transition: background .2s var(--ease), color .2s, transform .2s var(--ease);
}
.nav a:hover { background: rgba(124, 58, 237, .09); color: var(--fg); transform: translateX(2px); }
.nav a.on { background: var(--grad); color: #fff; box-shadow: 0 10px 22px -10px rgba(124, 58, 237, .7); }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.main { padding: 28px clamp(16px, 3vw, 40px) 80px; max-width: 1280px; width: 100%; }
.topbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 24px; }
.topbar .grow { flex: 1; min-width: 200px; }
.view-enter { animation: rise .45s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* seletor de perfil */
.acct { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 16px; border: 1px solid var(--border); background: var(--card-solid); cursor: pointer; width: 100%; text-align: left; }
.acct:hover { border-color: var(--primary-2); }
.avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: var(--bg-2); flex: none; border: 2px solid #fff; box-shadow: 0 0 0 2px var(--primary-2); }
.acct-list { display: none; flex-direction: column; gap: 6px; margin-top: 6px; }
.acct-list.open { display: flex; }

/* ===== Componentes ===== */
.card {
  background: var(--card); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px;
}
.card.lift { transition: transform .35s var(--ease), box-shadow .35s var(--ease); transform-style: preserve-3d; }
.card.lift:hover { box-shadow: var(--shadow-lg); }
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid.posts { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 14px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border-radius: 14px; border: 1px solid var(--border); background: var(--card-solid); font-weight: 700; cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s, background .2s, border-color .2s;
}
.btn:hover { transform: translateY(-2px); border-color: var(--primary-2); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0) scale(.98); }
.btn.primary { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 10px 24px -10px rgba(124, 58, 237, .8); }
.btn.danger { color: var(--danger); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: .88rem; border-radius: 11px; }
.btn[disabled] { opacity: .55; pointer-events: none; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { font-weight: 700; font-size: .88rem; }
.hint { font-size: .82rem; color: var(--muted-fg); }
.input, textarea.input, select.input {
  width: 100%; min-height: 44px; padding: 10px 14px; border-radius: 13px; border: 1.5px solid var(--border);
  background: var(--card-solid); color: var(--fg); font: inherit; transition: border-color .2s, box-shadow .2s;
}
textarea.input { min-height: 96px; resize: vertical; }
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--ring); }

.switch { position: relative; width: 48px; height: 28px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: #c4bfe0; transition: background .25s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); transition: transform .3s var(--ease); }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 3px solid var(--ring); outline-offset: 2px; }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 99px; font-size: .8rem; font-weight: 700; background: var(--bg-2); color: var(--primary); }
.chip.ok { background: rgba(5, 150, 105, .14); color: var(--ok); }
.chip.off { background: rgba(120, 113, 160, .16); color: var(--muted-fg); }
.chip.err { background: rgba(220, 38, 38, .12); color: var(--danger); }
.chip.cyan { background: rgba(8, 145, 178, .13); color: var(--accent); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px; border: 1.5px solid var(--border); border-radius: 13px; background: var(--card-solid); }
.tags:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px var(--ring); }
.tags input { border: 0; outline: 0; background: transparent; flex: 1; min-width: 120px; font: inherit; color: inherit; padding: 4px; }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 5px 6px 5px 12px; border-radius: 99px; background: var(--grad); color: #fff; font-weight: 700; font-size: .88rem; }
.tag button { border: 0; background: rgba(255, 255, 255, .25); color: #fff; width: 20px; height: 20px; border-radius: 50%; cursor: pointer; line-height: 1; }

.seg { display: inline-flex; padding: 4px; border-radius: 14px; background: var(--bg-2); gap: 4px; }
.seg button { border: 0; background: transparent; min-height: 36px; padding: 0 14px; border-radius: 11px; font-weight: 700; cursor: pointer; color: var(--muted-fg); transition: all .2s var(--ease); }
.seg button.on { background: var(--card-solid); color: var(--primary); box-shadow: var(--shadow); }

.kpi { display: flex; flex-direction: column; gap: 4px; }
.kpi b { font-size: 2rem; font-weight: 800; letter-spacing: -.03em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.kpi span { color: var(--muted-fg); font-size: .85rem; font-weight: 600; }

.empty { text-align: center; padding: 48px 20px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.empty .art { width: 84px; height: 84px; border-radius: 26px; display: grid; place-items: center; background: var(--grad); color: #fff; box-shadow: 0 18px 36px -14px rgba(124, 58, 237, .7); }

.skeleton { border-radius: 14px; background: linear-gradient(90deg, var(--bg-2) 25%, rgba(255, 255, 255, .5) 50%, var(--bg-2) 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; min-height: 80px; }
@keyframes shimmer { to { background-position: -200% 0; } }

table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted-fg); padding: 8px 12px; }
.tbl td { padding: 12px; border-top: 1px solid var(--border); vertical-align: middle; }

/* posts */
.post { position: relative; border-radius: 16px; overflow: hidden; border: 2px solid transparent; background: var(--card-solid); cursor: pointer; box-shadow: var(--shadow); text-align: left; padding: 0; transition: transform .3s var(--ease), border-color .2s; }
.post:hover { transform: translateY(-4px) rotateX(2deg); }
.post.sel { border-color: var(--primary); box-shadow: 0 0 0 4px var(--ring), var(--shadow-lg); }
.post img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: var(--bg-2); }
.post .meta { padding: 10px 12px; font-size: .82rem; display: flex; gap: 8px; justify-content: space-between; color: var(--muted-fg); }
.post .check { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: #fff; display: none; place-items: center; }
.post.sel .check { display: grid; }

/* modal + toast */
.overlay { position: fixed; inset: 0; background: rgba(15, 11, 36, .55); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 16px; z-index: 50; animation: fade .2s both; }
.modal { width: min(560px, 100%); max-height: 90vh; overflow: auto; background: var(--card-solid); border-radius: 22px; padding: 24px; box-shadow: var(--shadow-lg); animation: rise .35s var(--ease) both; }
@keyframes fade { from { opacity: 0; } }
.toasts { position: fixed; bottom: 18px; right: 18px; display: flex; flex-direction: column; gap: 10px; z-index: 60; }
.toast { padding: 13px 18px; border-radius: 14px; background: var(--fg); color: var(--bg); font-weight: 600; box-shadow: var(--shadow-lg); animation: rise .3s var(--ease) both; max-width: 340px; }
.toast.err { background: var(--danger); color: #fff; }
.toast.ok { background: var(--ok); color: #fff; }

/* celular (pré-visualização) */
.phone { width: 300px; max-width: 100%; margin-inline: auto; border-radius: 40px; padding: 12px; background: #15112e; box-shadow: var(--shadow-lg), inset 0 0 0 2px #3b2f7a; }
.phone-screen { border-radius: 30px; background: #fff; color: #111; min-height: 420px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.bubble { align-self: flex-start; max-width: 85%; padding: 9px 13px; border-radius: 18px; background: #efeefa; white-space: pre-wrap; word-break: break-word; font-size: .9rem; }
.bubble.btn-ln { background: #fff; border: 1px solid #ddd; text-align: center; color: #0a66ff; font-weight: 700; align-self: stretch; max-width: 100%; }
.bubble img { width: 100%; border-radius: 12px; display: block; margin-bottom: 6px; }

/* login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; position: relative; overflow: hidden; }
.login-card { width: min(420px, 100%); position: relative; z-index: 2; text-align: center; }
#hero3d { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; pointer-events: none; opacity: .9; }

@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; inset: auto 0 0 0; top: auto; height: auto; flex-direction: row; padding: 8px; z-index: 40; border-right: 0; border-top: 1px solid var(--border); }
  .side .brand, .side-foot, .side .acct-wrap { display: none; }
  .nav { flex-direction: row; width: 100%; justify-content: space-around; }
  .nav a { flex-direction: column; gap: 2px; font-size: .72rem; padding: 8px 10px; }
  .main { padding-bottom: 110px; }
  .mobile-acct { display: block; }
}
@media (min-width: 861px) { .mobile-acct { display: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  #hero3d { display: none; }
}

/* ===== Tema por perfil: educacional = azul, clínico = rosa ===== */
:root[data-account="educacional"] { --primary: #2563eb; --primary-2: #93c5fd; --accent: #0891b2; --border: #cfdcf7; --bg: #f1f6ff; --bg-2: #e2ecff; --ring: rgba(37, 99, 235, .45); --grad: linear-gradient(135deg, #2563eb 0%, #3b82f6 50%, #06b6d4 100%); }
:root[data-account="clinico"] { --primary: #db2777; --primary-2: #f9a8d4; --accent: #e11d48; --border: #fbcfe8; --bg: #fff1f7; --bg-2: #ffe0ee; --ring: rgba(219, 39, 119, .4); --grad: linear-gradient(135deg, #db2777 0%, #ec4899 50%, #fb7185 100%); }
:root[data-account="clinico"] body, :root[data-account="clinico"] body { background-image: radial-gradient(60rem 40rem at 85% -10%, rgba(236, 72, 153, .2), transparent 60%), radial-gradient(50rem 36rem at -10% 110%, rgba(251, 113, 133, .16), transparent 60%); }
:root[data-account="educacional"] body { background-image: radial-gradient(60rem 40rem at 85% -10%, rgba(37, 99, 235, .16), transparent 60%), radial-gradient(50rem 36rem at -10% 110%, rgba(6, 182, 212, .15), transparent 60%); }
:root[data-account="clinico"] .brand-mark, :root[data-account="clinico"] .nav a.on, :root[data-account="clinico"] .btn.primary { box-shadow: 0 10px 22px -10px rgba(219, 39, 119, .7); }
@media (prefers-color-scheme: dark) {
  :root[data-account="clinico"]:not([data-theme="light"]) { --bg: #1f0b18; --bg-2: #2d1024; --border: #6b2150; --primary: #f472b6; --primary-2: #f9a8d4; --card: rgba(48, 16, 36, .72); --card-solid: #2a1020; }
  :root[data-account="educacional"]:not([data-theme="light"]) { --bg: #0b1226; --bg-2: #101a38; --border: #26407a; --primary: #60a5fa; --card: rgba(16, 26, 56, .72); --card-solid: #12204a; }
}
:root[data-account][data-theme="dark"] { --card-solid: #1c1640; }
:root[data-account="clinico"][data-theme="dark"] { --bg: #1f0b18; --bg-2: #2d1024; --border: #6b2150; --primary: #f472b6; --card: rgba(48, 16, 36, .72); --card-solid: #2a1020; }
:root[data-account="educacional"][data-theme="dark"] { --bg: #0b1226; --bg-2: #101a38; --border: #26407a; --primary: #60a5fa; --card: rgba(16, 26, 56, .72); --card-solid: #12204a; }
body { transition: background-color .5s var(--ease); }

/* ===== Celular / tablet (<=860px) ===== */
.mtop, .nav-more { display: none; }
.sheet, .sheet-bg { display: none; }
@media (max-width: 860px) {
  :root { --navh: 68px; }
  html, body { overflow-x: hidden; }
  body { padding-bottom: 0; }
  .app { display: block; }
  .mtop {
    display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 35; padding: 8px 14px; padding-top: calc(8px + env(safe-area-inset-top));
    background: var(--card-solid); border-bottom: 1px solid var(--border); min-height: 56px;
  }
  .mtop .brand-mark { width: 34px; height: 34px; }
  .mtop-acct { display: flex; align-items: center; gap: 10px; min-height: 44px; min-width: 0; max-width: 100%; padding: 4px 12px 4px 4px; border-radius: 99px; border: 1px solid var(--border); background: var(--bg); cursor: pointer; font-weight: 700; }
  .mtop-acct b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
  .mtop-acct .avatar { width: 34px; height: 34px; }
  .side {
    position: fixed; inset: auto 0 0 0; top: auto; height: auto; flex-direction: row; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); z-index: 40;
    border-right: 0; border-top: 1px solid var(--border); background: var(--card-solid); gap: 0;
  }
  .side .brand, .side-foot, .side .acct-wrap, .nav a.nav-sec { display: none; }
  .nav { flex-direction: row; width: 100%; justify-content: space-around; gap: 2px; }
  .nav a, .nav-more {
    flex: 1 1 0; min-width: 0; min-height: 56px; flex-direction: column; justify-content: center; gap: 2px; font-size: .72rem; padding: 6px 2px;
    display: flex; align-items: center; text-align: center; border-radius: 14px; border: 0; background: transparent; color: var(--muted-fg); font-weight: 600; cursor: pointer;
  }
  .nav a:hover { transform: none; }
  .nav a span, .nav-more span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .nav-more.on { background: var(--grad); color: #fff; }
  .main { padding: 18px 16px calc(var(--navh) + 40px + env(safe-area-inset-bottom)); }
  h1 { font-size: 1.4rem; }
  .topbar { margin-bottom: 16px; gap: 10px; }
  .topbar .grow { min-width: 0; flex-basis: 100%; }
  .card { padding: 16px; }
  .grid.cols-2, .grid.cols-3 { grid-template-columns: 1fr; }
  .grid.posts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  #pause-bar { top: 56px !important; }

  /* alvos de toque e inputs sem zoom do iOS */
  .btn.sm { min-height: 44px; padding: 0 14px; }
  .seg button { min-height: 44px; }
  .seg { max-width: 100%; overflow-x: auto; }
  .input, textarea.input, select.input, .tags input, input, select, textarea { font-size: 16px; }
  .input, textarea, select, input { scroll-margin: 90px 0 calc(var(--navh) + 140px); }
  .tag button { width: 28px; height: 28px; }
  .ed-sug button, .fl-chips button { min-height: 40px; }
  .tbl td, .tbl th { padding: 10px 8px; }

  /* modais: tela cheia */
  .overlay { padding: 0; place-items: stretch; align-items: end; z-index: 80; }
  .modal { width: 100%; max-height: none; height: 100%; border-radius: 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); }

  .toasts { left: 12px; right: 12px; bottom: calc(var(--navh) + 12px + env(safe-area-inset-bottom)); z-index: 90; }
  .toast { max-width: none; }

  /* folha "Mais" */
  .sheet-bg { display: block; position: fixed; inset: 0; z-index: 70; background: rgba(15, 11, 36, .55); }
  .sheet-bg[hidden], .sheet[hidden] { display: none; }
  .sheet {
    display: flex; flex-direction: column; position: fixed; inset: auto 0 0 0; z-index: 71; max-height: 88vh; background: var(--card-solid); border-radius: 24px 24px 0 0;
    box-shadow: var(--shadow-lg); animation: rise .3s var(--ease) both; padding-bottom: env(safe-area-inset-bottom);
  }
  .sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 6px 20px; }
  .sheet-x { width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--bg-2); color: var(--fg); display: grid; place-items: center; cursor: pointer; }
  .sheet-body { overflow-y: auto; padding: 4px 16px 20px; display: flex; flex-direction: column; gap: 18px; overscroll-behavior: contain; }
  .sheet-sec { display: flex; flex-direction: column; gap: 8px; }
  .sheet-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .sheet-link { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 76px; border-radius: 16px; background: var(--bg-2); color: var(--fg); text-decoration: none; font-weight: 700; font-size: .85rem; }
  .sheet .acct.cur { border-color: var(--primary); box-shadow: 0 0 0 3px var(--ring); }
  .sheet .acct { min-height: 56px; }
  .sheet-pause { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 8px 4px; cursor: pointer; }
  .sheet-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  body.sheet-open { overflow: hidden; }
}
@media (max-width: 400px) {
  .main { padding-left: 12px; padding-right: 12px; }
  .grid.posts { gap: 10px; }
}
@media (max-width: 860px) {
  .overlay .modal, .overlay .md-modal { width: 100% !important; max-width: none !important; height: 100% !important; max-height: none !important; border-radius: 0 !important; overflow: auto; }
  .overlay .modal.confirm { height: auto !important; border-radius: 22px 22px 0 0 !important; padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
  .overlay .modal.confirm .row { flex-direction: column-reverse; align-items: stretch; }
  .overlay .modal[style*="flex-direction:column"] > div { padding-left: 16px !important; padding-right: 16px !important; }
  .overlay .modal[style*="flex-direction:column"] > .row { padding-bottom: calc(14px + env(safe-area-inset-bottom)) !important; }
  .overlay .modal[style*="flex-direction:column"] > .row .row { flex: 1 1 100%; }
  .overlay .modal[style*="flex-direction:column"] > .row .row .btn { flex: 1; }
  .overlay [data-x], .overlay [data-fechar] { min-width: 48px; min-height: 48px; }
  .md-modal { padding: 16px; }
  .sr-modal .sr-num { width: 90px; }
}
@media (max-width: 860px) {
  .nav a, .nav-more { font-size: .65rem; letter-spacing: -.01em; }
  .in-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  a.small, .main a.small { display: inline-flex; align-items: center; min-height: 44px; }
  .seg { display: flex; width: 100%; overflow-x: auto; scrollbar-width: none; }
  .seg button { flex: 1 0 auto; white-space: nowrap; }
  .ed-form .seg, .modal .seg { overflow: visible; }
  .ed-form .seg button, .modal .seg button { flex: 1 1 0; white-space: normal; line-height: 1.2; padding: 6px 8px; min-width: 0; }
  .ct-pill { min-height: 44px !important; }
}
@media (max-width: 860px) {
  .row > .field[style*="min-width"] { flex: 1 1 100% !important; min-width: 0 !important; }
}
.mtop-pause[hidden] { display: none !important; }
