/* Atende Morador — interface
   Paleta: azul-petróleo (marca), concreto frio (fundo), latão (acento das plaquetas). */

@font-face {
  font-family: "Manrope";
  src: url("manrope.woff2") format("woff2-variations"), url("manrope.woff2") format("woff2");
  font-weight: 300 800;
  font-display: swap;
}

:root {
  --brand: #0E4A55;
  --brand-ink: color-mix(in oklab, var(--brand) 82%, black);
  --brand-soft: color-mix(in oklab, var(--brand) 9%, white);
  --brand-line: color-mix(in oklab, var(--brand) 22%, white);
  --brass: #C08A2B;
  --brass-hi: #E2BC6A;
  --brass-lo: #8E6419;
  --bg: #EEF1EF;
  --surface: #FFFFFF;
  --surface-2: #F6F8F7;
  --ink: #17262B;
  --muted: #5B6B70;
  --line: #DCE3E0;
  --line-2: #C9D3CF;
  --ok: #1F7A50;
  --ok-soft: #E2F3EA;
  --bad: #B3261E;
  --bad-soft: #FBE7E5;
  --st-aberto: #2F62C9;
  --st-em_analise: #6B4FD8;
  --st-em_andamento: #B26A00;
  --st-aguardando_morador: #C2410C;
  --st-resolvido: #1F7A50;
  --st-fechado: #6B7A7F;
  --r-s: 8px;
  --r: 14px;
  --r-l: 22px;
  --shadow: 0 1px 2px rgb(14 40 46 / .06), 0 4px 14px rgb(14 40 46 / .05);
  --shadow-up: 0 10px 30px rgb(14 40 46 / .14);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --tabbar-h: 0px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand-soft: color-mix(in oklab, var(--brand) 26%, #101a1d);
    --brand-line: color-mix(in oklab, var(--brand) 55%, #101a1d);
    --bg: #0E1619;
    --surface: #152024;
    --surface-2: #1A272B;
    --ink: #E5EDEB;
    --muted: #93A4A8;
    --line: #243338;
    --line-2: #30434A;
    --ok-soft: #12302A;
    --bad-soft: #3A1715;
    --st-aberto: #7BA3F5;
    --st-em_analise: #A99BF5;
    --st-em_andamento: #E5A54B;
    --st-aguardando_morador: #F2905F;
    --st-resolvido: #5CC08F;
    --st-fechado: #8F9EA3;
    --shadow: 0 1px 2px rgb(0 0 0 / .3);
    --shadow-up: 0 10px 30px rgb(0 0 0 / .45);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.5 "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "tnum" 0;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) a { color: color-mix(in oklab, var(--brand) 35%, white); } }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .4em; letter-spacing: -.015em; }
h1 { font-size: clamp(1.55rem, 1.2rem + 1.4vw, 2rem); font-weight: 800; }
h2 { font-size: 1.15rem; font-weight: 750; }
p { margin: 0 0 .8em; }
small { font-size: .82rem; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; }
:focus-visible { outline: 3px solid color-mix(in oklab, var(--brand) 55%, var(--brass)); outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.sr, .hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--surface); padding: 8px 14px; border-radius: 8px; z-index: 99; }
.skip:focus { left: 8px; }
.inline { display: inline; }
.nowrap { white-space: nowrap; }

/* ---------- Ícones (traço único, animados ao interagir) ---------- */
.ico {
  width: 1.25em; height: 1.25em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  vertical-align: -.22em; overflow: visible;
  transition: transform .35s var(--spring);
}
.ico-lg { width: 2.25rem; height: 2.25rem; stroke-width: 1.6; }
.ico-xl { width: 4.5rem; height: 4.5rem; stroke-width: 1.4; }
.ico-dots circle { fill: currentColor; stroke: none; }
.ico .i-2 { stroke-dasharray: 1; stroke-dashoffset: 0; }

@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes ring { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(14deg); } 30% { transform: rotate(-12deg); } 45% { transform: rotate(9deg); } 60% { transform: rotate(-6deg); } 75% { transform: rotate(3deg); } }
@keyframes fly { 0% { transform: translate(0, 0); } 45% { transform: translate(7px, -7px); opacity: 0; } 46% { transform: translate(-7px, 7px); opacity: 0; } 100% { transform: translate(0, 0); opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes hop { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-4px) scale(1.06); } 70% { transform: translateY(1px); } }
@keyframes drip { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(2px) scaleY(1.06); } }
@keyframes flash { 0%, 100% { opacity: 1; } 40% { opacity: .35; } }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-10deg); } 75% { transform: rotate(10deg); } }
@keyframes blink { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(.1); } }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--c, var(--brand)) 45%, transparent); } 70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

:is(a, button, label, summary):hover > .ico .i-2,
:is(a, button, label, summary):focus-visible > .ico .i-2 { animation: draw .55s var(--ease); }
:is(a, button, summary):hover > .ico-bell, .nudge-wait .ico-bell, .is-unread-tab .ico-bell { animation: ring .9s ease; transform-origin: 50% 15%; }
.nudge-wait .ico-bell { animation-iteration-count: 2; animation-delay: .4s; }
:is(a, button):hover > .ico-send, button[type=submit]:active .ico-send { animation: fly .6s var(--ease); }
:is(a, button, summary):hover > .ico-plus { transform: rotate(90deg); }
:is(a, button):hover > .ico-refresh, .is-loading .ico-refresh { animation: spin .8s var(--ease); }
:is(a, button):hover > .ico-gear { animation: spin 1.6s linear; }
:is(a, button, label):hover > .ico-clip { animation: wiggle .5s ease; transform-origin: 50% 50%; }
:is(a, button):hover > .ico-logout { transform: translateX(3px); }
:is(a, button):hover > .ico-back { transform: translateX(-3px); }
:is(a, button):hover > .ico-chev { transform: translateX(3px); }
:is(a, button):hover > .ico-download { transform: translateY(2px); }
.pw-toggle:hover .ico-eye { animation: blink .35s ease; transform-origin: 50% 50%; }
.toast .ico-check path, .success-burst .ico .i-2, .status-now.st-resolvido .ico .i-2 { stroke-dasharray: 1; animation: draw .7s .15s var(--ease) both; }
.ico-check path { stroke-dasharray: 1; }
.success-burst .ico { animation: pop .6s var(--spring) both; color: var(--ok); }

/* ---------- Topo e navegação ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 16px;
  padding: max(10px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left));
  background: color-mix(in oklab, var(--surface) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; letter-spacing: -.01em; min-width: 0; }
.brand-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-mark { display: inline-grid; place-items: center; width: 34px; height: 34px; color: var(--brand); flex: none; }
.brand-mark svg { width: 100%; height: 100%; }
.brand-mark.big { width: 56px; height: 56px; margin-bottom: 8px; }
.brand-mark.huge { width: 96px; height: 96px; }
.nav { display: flex; gap: 4px; margin: 0 auto; }
.nav-link {
  position: relative; display: flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-radius: 999px; color: var(--muted); text-decoration: none; font-weight: 650; font-size: .95rem;
  transition: background .2s, color .2s;
}
.nav-link:hover { background: var(--surface-2); color: var(--ink); }
.nav-link.is-active { background: var(--brand-soft); color: var(--brand); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .nav-link.is-active { color: var(--ink); } }
.dot-count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--brass); color: #fff; font-size: .72rem; display: inline-grid; place-items: center; font-weight: 800; font-feature-settings: "tnum"; }
.me { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.nav + .me { margin-left: 0; }
[hidden] { display: none !important; }
.avatar {
  display: inline-grid; place-items: center; flex: none;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--brand); color: #fff; font-weight: 750; font-size: .9rem; letter-spacing: .02em;
}
.avatar.sm { width: 34px; height: 34px; font-size: .78rem; }
.avatar.xl { width: 72px; height: 72px; font-size: 1.5rem; }
.avatar.alt { background: var(--surface-2); color: var(--brand); border: 1px solid var(--line); }
.avatar.pet { background: color-mix(in oklab, var(--brass) 16%, var(--surface)); color: var(--brass-lo); }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: transparent; color: var(--muted); cursor: pointer; transition: background .2s, color .2s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn.danger:hover { background: var(--bad-soft); color: var(--bad); }

.tabbar { display: none; }

/* ---------- Estrutura ---------- */
.main {
  width: 100%; max-width: 720px; margin: 0 auto;
  padding: 24px max(16px, env(safe-area-inset-left)) calc(48px + var(--tabbar-h)) max(16px, env(safe-area-inset-right));
}
.main-wide { max-width: 1240px; }
.page-head { margin-bottom: 20px; }
.page-head h1 { margin-bottom: .2em; }
.row-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; font-weight: 650; font-size: .92rem; margin-bottom: 10px; }
.back:hover { color: var(--ink); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 20px; margin-bottom: 16px; }
.panel > h2 { display: flex; align-items: center; gap: 10px; }
.panel > h2 .ico { color: var(--brand); }
.count { margin-left: auto; font-size: .85rem; color: var(--muted); font-weight: 650; font-feature-settings: "tnum"; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; border-radius: 12px;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  font: inherit; font-weight: 700; font-size: .95rem; text-decoration: none; cursor: pointer;
  transition: transform .15s var(--ease), background .2s, border-color .2s, box-shadow .2s;
}
.btn:hover { border-color: var(--brand-line); background: var(--surface-2); }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 2px 0 var(--brand-ink); }
.btn-primary:hover { background: var(--brand-ink); border-color: var(--brand-ink); color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); border-color: transparent; }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: .86rem; border-radius: 10px; }
.btn-lg { min-height: 54px; font-size: 1.04rem; border-radius: 14px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-loading { opacity: .65; pointer-events: none; }
.link-btn { background: none; border: 0; color: var(--muted); font: inherit; font-size: .9rem; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 6px; }
.link-btn:hover { color: var(--bad); }
.btn-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

/* ---------- Formulários ---------- */
.form { display: grid; gap: 14px; }
.form.compact { gap: 10px; }
.field { display: grid; gap: 6px; }
.field > span:first-child { font-weight: 650; font-size: .92rem; }
.field small, legend small { font-weight: 500; color: var(--muted); }
input:not([type=checkbox], [type=radio], [type=file], [type=color]), select, textarea {
  width: 100%; min-height: 48px; padding: 11px 14px;
  font: inherit; color: var(--ink); background: var(--surface);
  border: 1.5px solid var(--line-2); border-radius: 12px;
  transition: border-color .2s, box-shadow .2s;
  appearance: none; -webkit-appearance: none;
}
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235B6B70' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; padding-right: 40px; }
textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
input[type=color] { width: 64px; height: 48px; border: 1.5px solid var(--line-2); border-radius: 12px; padding: 4px; background: var(--surface); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in oklab, var(--brand) 16%, transparent); }
::placeholder { color: color-mix(in oklab, var(--muted) 75%, transparent); }
.has-error input, .has-error textarea, .has-error .cat-card { border-color: var(--bad); }
.field em, .err-line { color: var(--bad); font-style: normal; font-size: .86rem; font-weight: 600; }
.hint { color: var(--muted); font-size: .86rem; margin: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-2 .full { grid-column: 1 / -1; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-weight: 750; margin-bottom: 10px; padding: 0; }

.pw { position: relative; display: block; }
.pw input { padding-right: 52px; }
.pw-toggle { position: absolute; right: 4px; top: 50%; translate: 0 -50%; width: 44px; height: 40px; border: 0; background: none; color: var(--muted); border-radius: 10px; cursor: pointer; }
.pw-toggle[aria-pressed=true] { color: var(--brand); }
.meter { display: block; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: var(--bad); transition: width .3s var(--ease), background .3s; }

.check { display: flex; gap: 12px; align-items: flex-start; font-size: .92rem; color: var(--muted); cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--brand); flex: none; }

/* Segmentado (rádio em pílulas) */
.seg { display: flex; gap: 6px; padding: 5px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; }
.seg label { flex: 1; position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg span { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 8px 10px; border-radius: 10px; font-weight: 650; font-size: .92rem; color: var(--muted); text-align: center; transition: background .2s, color .2s, box-shadow .2s; }
.seg span small { display: block; font-weight: 500; }
.seg input:checked + span { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.seg input:focus-visible + span { outline: 3px solid var(--brand-line); }
.seg-wrap { flex-wrap: wrap; }
.seg-wrap label { flex: 1 1 180px; }
.prio input:checked + .prio-alta { color: var(--bad); }
.prio input:checked + .prio-baixa { color: var(--ok); }

/* Interruptor */
.switches { display: grid; gap: 4px; }
.switch { display: flex; align-items: center; gap: 12px; padding: 8px 0; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch .sw { position: relative; width: 46px; height: 28px; border-radius: 999px; background: var(--line-2); flex: none; transition: background .25s; }
.switch .sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .25); transition: transform .3s var(--spring); }
.switch input:checked + .sw { background: var(--brand); }
.switch input:checked + .sw::after { transform: translateX(18px); }
.switch input:focus-visible + .sw { outline: 3px solid var(--brand-line); outline-offset: 2px; }
.switch > span:last-child { display: flex; align-items: center; gap: 8px; font-weight: 600; }

/* ---------- Avisos ---------- */
.callout { padding: 14px 16px; border-radius: var(--r); margin-bottom: 16px; font-weight: 550; }
.callout.ok { background: var(--ok-soft); color: color-mix(in oklab, var(--ok) 80%, var(--ink)); }
.callout.bad { background: var(--bad-soft); color: color-mix(in oklab, var(--bad) 85%, var(--ink)); }
.callout h2 { color: inherit; }
.toasts { position: fixed; z-index: 60; left: 50%; translate: -50% 0; top: max(12px, env(safe-area-inset-top)); display: grid; gap: 8px; width: min(92vw, 440px); pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px;
  background: var(--ink); color: var(--bg); box-shadow: var(--shadow-up); font-weight: 650; font-size: .94rem;
  animation: toast-in .45s var(--spring) both; pointer-events: auto;
}
.toast .ico { color: #6EE7A8; }
.toast-error .ico { color: #FF9A8F; }
.toast.is-out { animation: toast-out .3s var(--ease) forwards; }
@keyframes toast-in { from { transform: translateY(-14px) scale(.96); opacity: 0; } }
@keyframes toast-out { to { transform: translateY(-10px); opacity: 0; } }

.nudge {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; margin-bottom: 18px;
  border-radius: var(--r); background: var(--brand-soft); color: var(--ink); text-decoration: none; font-weight: 550;
  border: 1px solid var(--brand-line);
}
.nudge > .ico:first-child { color: var(--brand); width: 1.5em; height: 1.5em; }
.nudge > span { flex: 1; }
.nudge-wait { background: color-mix(in oklab, var(--st-aguardando_morador) 10%, var(--surface)); border-color: color-mix(in oklab, var(--st-aguardando_morador) 35%, var(--surface)); }
.nudge-wait > .ico:first-child { color: var(--st-aguardando_morador); }
.nudge.compact { margin: 0; padding: 8px 14px; font-size: .9rem; }

/* ---------- Status ---------- */
.badge {
  --c: var(--st-fechado);
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 4px 10px 4px 8px; border-radius: 999px; font-size: .8rem; font-weight: 750;
  color: color-mix(in oklab, var(--c) 88%, var(--ink)); background: color-mix(in oklab, var(--c) 12%, var(--surface));
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.st-aberto { --c: var(--st-aberto); }
.st-em_analise { --c: var(--st-em_analise); }
.st-em_andamento { --c: var(--st-em_andamento); }
.st-aguardando_morador { --c: var(--st-aguardando_morador); }
.st-resolvido { --c: var(--st-resolvido); }
.st-fechado { --c: var(--st-fechado); }
.badge.st-aguardando_morador::before { animation: pulse 1.8s infinite; }
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: .76rem; font-weight: 700; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.tag.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.tag.hot { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.tag.brass { background: color-mix(in oklab, var(--brass) 14%, var(--surface)); color: var(--brass-lo); border-color: transparent; }
.tag .ico { width: 1em; height: 1em; }

/* ---------- A plaqueta (assinatura visual) ---------- */
.plaque {
  display: inline-grid; justify-items: center; gap: 2px;
  padding: 10px 22px 12px; margin-bottom: 14px; border-radius: 12px;
  background:
    linear-gradient(160deg, rgb(255 255 255 / .35), transparent 40%),
    linear-gradient(180deg, var(--brass-hi), var(--brass) 55%, var(--brass-lo));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .55), inset 0 -2px 0 rgb(0 0 0 / .18), 0 2px 0 var(--brass-lo), 0 8px 18px rgb(142 100 25 / .28);
  color: #3B2A08; position: relative;
}
.plaque::before, .plaque::after { content: ""; position: absolute; top: 50%; width: 6px; height: 6px; border-radius: 50%; translate: 0 -50%; background: radial-gradient(circle at 35% 35%, #fff6 , #6b4a10 70%); }
.plaque::before { left: 8px; }
.plaque::after { right: 8px; }
.plaque-label { font-size: .66rem; font-weight: 700; letter-spacing: .14em; opacity: .7; }
.plaque-num { font-size: 1.5rem; font-weight: 800; letter-spacing: .08em; font-feature-settings: "tnum"; text-shadow: 0 1px 0 rgb(255 255 255 / .45), 0 -1px 0 rgb(0 0 0 / .2); }
.plaque-sm {
  display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: .75rem; font-weight: 800; letter-spacing: .06em; font-feature-settings: "tnum";
  color: #3B2A08; background: linear-gradient(180deg, var(--brass-hi), var(--brass)); box-shadow: inset 0 -1px 0 rgb(0 0 0 / .15);
}
.just-opened .plaque { animation: plaque-in .8s var(--spring) both; }
@keyframes plaque-in { 0% { transform: translateY(-30px) rotate(-6deg); opacity: 0; } 60% { transform: translateY(4px) rotate(2deg); opacity: 1; } 100% { transform: none; } }

/* ---------- Trilha de progresso ---------- */
.track { list-style: none; margin: 18px 0 14px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); counter-reset: s; }
.track-step { position: relative; display: grid; justify-items: center; gap: 8px; text-align: center; }
.track-step::before { content: ""; position: absolute; top: 13px; left: calc(-50% + 16px); right: calc(50% + 16px); height: 3px; border-radius: 3px; background: var(--line); }
.track-step:first-child::before { display: none; }
.track-step.is-done::before, .track-step.is-now::before { background: var(--brand); }
.track-node { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 3px solid var(--line-2); color: #fff; z-index: 1; transition: all .3s; }
.track-node .ico { width: 16px; height: 16px; stroke-width: 3; }
.is-done .track-node { background: var(--brand); border-color: var(--brand); }
.is-now .track-node { border-color: var(--brand); background: var(--surface); --c: var(--brand); animation: pulse 2s infinite; }
.is-now .track-node::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); }
.is-now .track-node:has(.ico) { background: var(--st-resolvido); border-color: var(--st-resolvido); animation: none; }
.is-now .track-node:has(.ico)::after { display: none; }
.track-label { font-size: .78rem; font-weight: 650; color: var(--muted); line-height: 1.25; }
.is-now .track-label { color: var(--ink); font-weight: 800; }

.status-now { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: var(--r); background: color-mix(in oklab, var(--c, var(--brand)) 9%, var(--surface)); border: 1px solid color-mix(in oklab, var(--c, var(--brand)) 22%, var(--surface)); }
.status-now > .ico { width: 28px; height: 28px; color: var(--c, var(--brand)); flex: none; }
.status-now div { display: grid; }
.status-now b { color: color-mix(in oklab, var(--c, var(--brand)) 80%, var(--ink)); }
.status-now span { color: var(--muted); font-size: .92rem; }
.status-now.st-aguardando_morador > .ico { animation: ring 1s ease 2 .5s; transform-origin: 50% 15%; }

/* ---------- Início do morador ---------- */
.hello { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.hello h1 { margin-bottom: 2px; }
.hello p { margin: 0; }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; scrollbar-width: none; }
.tab-link { display: inline-flex; align-items: center; gap: 8px; padding: 10px 6px 12px; margin-right: 14px; color: var(--muted); font-weight: 700; text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab-link b { font-size: .78rem; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-feature-settings: "tnum"; }
.tab-link.is-active { color: var(--ink); border-color: var(--brand); }
.tab-link.is-active b { background: var(--brand); color: #fff; }

.tlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.trow {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  color: var(--ink); text-decoration: none; transition: border-color .2s, transform .2s var(--ease), box-shadow .2s;
}
.trow:hover { border-color: var(--brand-line); box-shadow: var(--shadow); }
.trow:active { transform: scale(.99); }
.trow:hover .cat-ico .ico { animation: hop .5s var(--ease); }
.trow.is-waiting { border-left: 4px solid var(--st-aguardando_morador); }
.trow-main { flex: 1; min-width: 0; display: grid; gap: 4px; }
.trow-title { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 8px; }
.is-unread .trow-title { font-weight: 800; }
.trow-meta { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .84rem; flex-wrap: wrap; }
.trow-side { display: flex; align-items: center; gap: 8px; }
.unread-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--brass); flex: none; --c: var(--brass); animation: pulse 2s infinite; }

.cat-ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; flex: none; background: var(--brand-soft); color: var(--brand); }
.cat-ico .ico { width: 22px; height: 22px; }
.cat-eletrica { background: color-mix(in oklab, #D9A400 14%, var(--surface)); color: #9A7400; }
.cat-hidraulica { background: color-mix(in oklab, #2F7FD8 13%, var(--surface)); color: #2266B3; }
.cat-limpeza { background: color-mix(in oklab, #1F9A8A 13%, var(--surface)); color: #157A6D; }
.cat-seguranca { background: color-mix(in oklab, #4A5C9E 14%, var(--surface)); color: #3D4F8C; }
.cat-barulho { background: color-mix(in oklab, #C2410C 11%, var(--surface)); color: #B23C0C; }
.cat-areas_comuns { background: color-mix(in oklab, #2E8B4E 13%, var(--surface)); color: #237240; }
.cat-financeiro { background: color-mix(in oklab, var(--brass) 15%, var(--surface)); color: var(--brass-lo); }
.cat-elevador { background: color-mix(in oklab, #6B4FD8 12%, var(--surface)); color: #5B41BF; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand-mark { color: color-mix(in oklab, var(--brand) 55%, #9fd3dc); } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cat-ico { filter: brightness(1.5) saturate(.9); } }
.cat-inline { display: inline-flex; align-items: center; gap: 6px; }

.empty { text-align: center; padding: 48px 16px; }
.empty-ico { display: inline-grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); color: var(--brand); margin-bottom: 16px; }
.empty-ico .ico { animation: pop .6s var(--spring) both; }
.empty p { max-width: 42ch; margin-inline: auto; }
.empty-line { margin: 0 0 8px; font-size: .92rem; }

/* ---------- Abrir chamado ---------- */
.new-ticket { gap: 26px; }
.step { display: grid; gap: 12px; }
.step legend { display: flex; align-items: center; gap: 10px; font-size: 1.05rem; }
.step-n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--bg); font-size: .82rem; font-weight: 800; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.cat-opt { position: relative; }
.cat-opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.cat-card {
  display: flex; flex-direction: column; gap: 10px; height: 100%; padding: 14px;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r);
  font-weight: 650; font-size: .92rem; line-height: 1.3; transition: border-color .2s, box-shadow .2s, transform .2s var(--ease);
}
.cat-card .cat-ico { width: 40px; height: 40px; }
.cat-opt:hover .cat-card { border-color: var(--brand-line); }
.cat-opt input:checked + .cat-card { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in oklab, var(--brand) 18%, transparent); transform: translateY(-2px); }
.cat-opt input:checked + .cat-card .ico { animation: hop .5s var(--spring); }
.cat-opt input:checked + .cat-card .ico-drop { animation: drip .8s ease 2; }
.cat-opt input:checked + .cat-card .ico-bolt { animation: flash .5s ease 2; }
.cat-opt input:focus-visible + .cat-card { outline: 3px solid var(--brand-line); outline-offset: 2px; }

.drop {
  position: relative; display: flex; align-items: center; gap: 14px; padding: 18px;
  border: 2px dashed var(--line-2); border-radius: var(--r); background: var(--surface); cursor: pointer; transition: border-color .2s, background .2s;
}
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop-ico { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--brand-soft); color: var(--brand); flex: none; }
.drop-text small { color: var(--muted); }
.drop.is-over { border-color: var(--brand); background: var(--brand-soft); }
.drop.is-over .ico-clip, .drop:hover .ico-clip { animation: wiggle .5s ease; }
.drop-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.drop-list li { display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); font-size: .85rem; max-width: 100%; animation: pop .35s var(--spring); }
.drop-list img { width: 36px; height: 36px; object-fit: cover; border-radius: 6px; }
.drop-list span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }
.sticky-submit { position: sticky; bottom: calc(12px + var(--tabbar-h)); z-index: 5; }
.sticky-submit .btn { box-shadow: 0 2px 0 var(--brand-ink), var(--shadow-up); }

/* ---------- Chamado: conversa ---------- */
.ticket-hero { text-align: center; padding: 8px 0 4px; }
.ticket-hero h1 { max-width: 28ch; margin-inline: auto; }
.ticket-sub { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 16px; font-size: .9rem; }
.ticket-hero.staff { text-align: left; }
.ticket-hero.staff h1 { margin-inline: 0; }
.ticket-hero.staff .ticket-sub { justify-content: flex-start; align-items: center; }
.thread { display: grid; gap: 14px; margin: 26px 0 18px; }
.msg { display: grid; gap: 4px; max-width: min(88%, 560px); }
.msg-me { justify-self: end; justify-items: end; }
.msg-them { justify-self: start; }
.msg-bubble { padding: 12px 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); overflow-wrap: anywhere; }
.msg-bubble p:last-child { margin-bottom: 0; }
.msg-me .msg-bubble { background: var(--brand); color: #fff; border-color: var(--brand); border-bottom-right-radius: 6px; }
.msg-me .msg-bubble a { color: #fff; }
.msg-them .msg-bubble { border-bottom-left-radius: 6px; }
.msg-internal .msg-bubble { background: color-mix(in oklab, var(--brass) 12%, var(--surface)); color: var(--ink); border: 1px dashed var(--brass); }
.msg-internal .msg-bubble a { color: var(--brand); }
.msg-who { display: flex; align-items: center; gap: 8px; font-size: .82rem; font-weight: 700; color: var(--muted); }
.msg-who .ico { width: 1em; height: 1em; }
.msg-time { font-size: .76rem; color: var(--muted); }
.msg-loc { display: flex; align-items: center; gap: 6px; font-size: .88rem; opacity: .85; }
.sys { display: flex; justify-content: center; align-items: center; gap: 10px; font-size: .8rem; color: var(--muted); }
.sys span { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-weight: 650; }
.sys .ico { width: 1em; height: 1em; }
.files { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.file a { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: rgb(0 0 0 / .06); color: inherit; text-decoration: none; font-size: .86rem; font-weight: 600; }
.msg-me .file a { background: rgb(255 255 255 / .16); }
.file small { opacity: .7; }
.file.is-img a { padding: 0; overflow: hidden; }
.file.is-img img { width: 120px; height: 96px; object-fit: cover; border-radius: 10px; transition: transform .3s var(--ease); }
.file.is-img a:hover img { transform: scale(1.04); }

.composer {
  position: sticky; bottom: calc(10px + var(--tabbar-h)); z-index: 6;
  display: flex; align-items: flex-end; gap: 6px; padding: 6px; border-radius: 24px;
  background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow-up);
}
.composer textarea { flex: 1; min-height: 44px; max-height: 40vh; border: 0; resize: none; padding: 10px 6px; box-shadow: none !important; background: transparent; }
.composer-attach { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--muted); cursor: pointer; flex: none; }
.composer-attach:hover { background: var(--surface-2); color: var(--ink); }
.composer-attach input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.composer-count { position: absolute; top: 2px; right: 2px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--brass); color: #fff; font-size: .7rem; display: grid; place-items: center; }
.composer-send { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--brand); color: #fff; cursor: pointer; flex: none; transition: transform .15s var(--ease); }
.composer-send:active { transform: scale(.92); }
.composer-send:hover .ico-send { animation: fly .6s var(--ease); }
.cancel-form { text-align: center; margin-top: 16px; }

.resolve-panel { text-align: center; }
.rate-form { justify-items: center; }
.rate-form .field { width: 100%; text-align: left; }
.stars { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.stars input { position: absolute; opacity: 0; }
.stars label { cursor: pointer; color: var(--line-2); padding: 2px; }
.stars .ico { width: 38px; height: 38px; stroke-width: 1.5; transition: transform .25s var(--spring), color .2s, fill .2s; }
.stars label:hover .ico, .stars label:hover ~ label .ico, .stars input:checked ~ label .ico { color: var(--brass); fill: var(--brass-hi); }
.stars label:hover .ico { transform: scale(1.2) rotate(-8deg); }
.stars input:checked + label .ico { animation: pop .45s var(--spring); }
.stars input:focus-visible + label { outline: 3px solid var(--brand-line); border-radius: 8px; }
.rated { display: flex; align-items: center; justify-content: center; gap: 2px; color: var(--muted); font-size: .9rem; }
.rated .ico { color: var(--brass); fill: var(--brass-hi); }
.reopen { margin-top: 16px; text-align: left; }
.reopen summary { cursor: pointer; font-weight: 700; color: var(--muted); text-align: center; list-style: none; }
.reopen summary::-webkit-details-marker { display: none; }
.reopen[open] summary { margin-bottom: 12px; }

/* ---------- Cadastro / listas de pessoas ---------- */
.rows { list-style: none; margin: 0 0 8px; padding: 0; }
.row-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.row-item:last-child { border-bottom: 0; }
.row-main { flex: 1; min-width: 0; display: grid; }
.row-main small { color: var(--muted); }
.plate {
  display: inline-grid; place-items: center; min-width: 92px; padding: 10px 8px 4px; position: relative;
  font-weight: 800; letter-spacing: .1em; font-size: .9rem; font-feature-settings: "tnum";
  color: #111; background: #fff; border: 2px solid #1E2B30; border-radius: 6px; flex: none;
}
.plate::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 7px; background: #1F46A6; border-radius: 3px 3px 0 0; }
.adder summary { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 700; color: var(--brand); padding: 8px 0; list-style: none; }
.adder summary::-webkit-details-marker { display: none; }
.adder[open] summary { margin-bottom: 8px; }
.adder[open] summary .ico-plus { transform: rotate(45deg); }
.adder .form { padding: 16px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line); }
.panel.adder > summary { padding: 0; }
.confirm-strip { display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin-bottom: 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); font-weight: 650; color: var(--muted); }
.confirm-strip.is-ok { color: var(--ok); background: var(--ok-soft); border-color: transparent; }
.confirm-all { margin-top: 24px; display: grid; gap: 10px; }
[data-occupancy]:not(:has(input[value=inquilino]:checked)) .owner-only { display: none; }

.profile-head { display: flex; align-items: center; gap: 16px; }
.profile-head h1 { margin-bottom: 2px; }
.profile-head p { margin: 0; }
.logout-mobile { margin-top: 8px; }
.dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0; }
.dl dt { color: var(--muted); font-weight: 650; font-size: .9rem; }
.dl dd { margin: 0; }

/* ---------- Login ---------- */
.page-auth .main { display: grid; place-items: center; min-height: 100dvh; padding-top: 32px; }
.auth-card { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--line); border-radius: 26px; padding: 32px 26px; box-shadow: var(--shadow-up); }
.auth-card.wide { max-width: 640px; }
.auth-head { text-align: center; margin-bottom: 22px; }
.auth-head .brand-mark { color: var(--brand); }
.auth-head h1 { font-size: 1.6rem; }
.auth-foot { text-align: center; margin: 18px 0 0; font-size: .94rem; }
.auth-note { text-align: center; margin: 14px 0 0; font-size: .86rem; color: var(--muted); }
.condo-pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-weight: 750; margin: 4px 0 0; }
.unit-row { grid-template-columns: 1fr 1.3fr; }

/* Instalador */
.install .main { max-width: 720px; }
.checks { list-style: none; padding: 0; margin: 0 0 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; font-size: .88rem; }
.checks .ok { color: var(--ok); }
.checks .bad { color: var(--bad); font-weight: 700; }
.install form:has(input[value=sqlite]:checked) .mysql-only { display: none; }
.install fieldset { padding: 16px; border: 1px solid var(--line); border-radius: var(--r); display: grid; gap: 12px; }

/* ---------- Painel da equipe ---------- */
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 18px; }
.kpi { display: grid; gap: 2px; padding: 14px 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: border-color .2s; }
a.kpi:hover { border-color: var(--brand-line); }
.kpi b { font-size: 1.7rem; font-weight: 800; font-feature-settings: "tnum"; letter-spacing: -.02em; }
.kpi span { color: var(--muted); font-size: .84rem; font-weight: 600; }
.kpi.is-active { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.filters select { width: auto; flex: 0 1 220px; min-height: 44px; }
.search { position: relative; flex: 1 1 260px; display: block; }
.search .ico { position: absolute; left: 14px; top: 50%; translate: 0 -50%; color: var(--muted); }
.search input { padding-left: 44px; min-height: 44px; }
.table-wrap { overflow-x: auto; border-radius: var(--r-l); border: 1px solid var(--line); background: var(--surface); }
table.tickets { width: 100%; border-collapse: collapse; font-size: .93rem; }
.tickets th { text-align: left; font-size: .78rem; color: var(--muted); font-weight: 700; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.tickets td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tickets tr:last-child td { border-bottom: 0; }
.tickets tbody tr[data-href] { cursor: pointer; transition: background .15s; }
.tickets tbody tr[data-href]:hover { background: var(--surface-2); }
.tickets .c-main a { color: var(--ink); text-decoration: none; }
.tickets .c-main { display: grid; gap: 4px; min-width: 260px; }
.tickets td small { display: block; color: var(--muted); }
.cell-strong { font-weight: 700; }
.tickets tr.is-unread { background: color-mix(in oklab, var(--brass) 6%, var(--surface)); }
.prio-row-alta td:first-child { box-shadow: inset 4px 0 0 var(--bad); }
.tickets.plain td { padding: 10px 14px; }
.err-small { display: block; color: var(--bad); font-size: .78rem; }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 16px; color: var(--muted); font-size: .9rem; }

.desk { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.desk-side { position: sticky; top: 84px; display: grid; gap: 0; }
.side-card h2 { font-size: .95rem; color: var(--muted); }
.side-name { display: flex; gap: 12px; align-items: center; }
.side-name span:last-child { display: grid; }
.side-name small { color: var(--muted); }
.side-links { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 2px; }
.side-links a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; color: var(--ink); text-decoration: none; font-size: .9rem; overflow-wrap: anywhere; }
.side-links a:hover { background: var(--surface-2); }
.side-links .ico { color: var(--brand); }
.mini-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.mini-list a { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0; color: var(--ink); text-decoration: none; font-size: .9rem; border-bottom: 1px solid var(--line); }
.mini-list a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.reply-box { display: grid; gap: 10px; padding: 16px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-l); box-shadow: var(--shadow); }
.reply-box:has(input[value=internal]:checked) { background: color-mix(in oklab, var(--brass) 8%, var(--surface)); border-color: var(--brass); }
.mode-seg { align-self: start; }
.quick { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chip { flex: none; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--muted); font: inherit; font-size: .82rem; font-weight: 600; cursor: pointer; }
.chip:hover { border-color: var(--brand); color: var(--brand); }
.reply-bar { display: flex; align-items: center; gap: 10px; }
.status-pick { display: flex; align-items: center; gap: 8px; margin-left: auto; font-size: .86rem; color: var(--muted); font-weight: 650; }
.status-pick select { width: auto; min-height: 44px; }

.people { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); }
.person { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.person:last-child { border-bottom: 0; }
.person-main { display: flex; gap: 12px; align-items: center; color: var(--ink); text-decoration: none; min-width: 0; }
.person-main > span:last-child { display: grid; min-width: 0; }
.person-main small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mini { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: .85rem; font-weight: 650; font-feature-settings: "tnum"; }
.mini .ico { width: 1em; height: 1em; margin-left: 6px; }
.person-actions { display: flex; gap: 6px; }

.condo-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.condo.is-off { opacity: .6; }
.condo-head { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.condo-head > div:nth-child(2) { flex: 1; min-width: 200px; }
.condo-head h2 { margin-bottom: 2px; }
.condo-head p { margin: 0; font-size: .9rem; }
.condo-stats { display: flex; gap: 16px; flex-wrap: wrap; }
.condo-stats a { color: var(--muted); text-decoration: none; font-size: .88rem; font-weight: 600; }
.condo-stats b { color: var(--ink); font-size: 1.1rem; font-feature-settings: "tnum"; margin-right: 2px; }
.condo-stats .hot b { color: var(--bad); }
.invite { margin-top: 16px; padding: 14px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line); }
.invite.is-closed { opacity: .65; }
.invite-label { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: .88rem; margin-bottom: 8px; }
.invite-row { display: flex; gap: 6px; flex-wrap: wrap; }
.invite-row input { flex: 1 1 260px; min-height: 36px; font-size: .85rem; font-family: ui-monospace, Menlo, monospace; padding: 6px 10px; }
.condo-more { margin-top: 12px; }
.condo-more summary { cursor: pointer; color: var(--muted); font-weight: 650; font-size: .9rem; }
.condo-more[open] summary { margin-bottom: 12px; }
.inline-form { grid-template-columns: 1fr 1.4fr auto; align-items: end; }

.settings { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; align-items: start; }
.side-tabs { display: grid; gap: 4px; position: sticky; top: 84px; }
.side-tabs a { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; color: var(--muted); text-decoration: none; font-weight: 650; }
.side-tabs a:hover { background: var(--surface); color: var(--ink); }
.side-tabs a.is-active { background: var(--surface); color: var(--brand); box-shadow: var(--shadow); }
.test-row { display: flex; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.test-row input { max-width: 240px; }
.code { white-space: pre-wrap; word-break: break-all; padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; }
.wa-help p { display: none; margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--brand-soft); font-size: .9rem; }
[data-wa][data-provider] [data-for] { display: none; }
[data-wa][data-provider="zapi"] [data-for~="zapi"],
[data-wa][data-provider="evolution"] [data-for~="evolution"],
[data-wa][data-provider="meta"] [data-for~="meta"],
[data-wa][data-provider="webhook"] [data-for~="webhook"] { display: grid; }
[data-wa][data-provider] .wa-help p[data-for] { display: none; }
[data-wa][data-provider="zapi"] .wa-help p[data-for="zapi"],
[data-wa][data-provider="evolution"] .wa-help p[data-for="evolution"],
[data-wa][data-provider="meta"] .wa-help p[data-for="meta"],
[data-wa][data-provider="webhook"] .wa-help p[data-for="webhook"] { display: block; }

/* ---------- Cartaz ---------- */
.page-poster .main { max-width: 760px; }
.poster-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.poster { background: #fff; color: #17262B; border-radius: 28px; padding: 56px 40px; text-align: center; border: 1px solid var(--line); }
.poster .brand-mark { color: var(--brand); margin-bottom: 12px; }
.poster h1 { font-size: 2.6rem; max-width: 16ch; margin: 0 auto 12px; }
.poster-lead { font-size: 1.15rem; max-width: 36ch; margin: 0 auto 28px; color: #3E4F55; }
.poster-qr { display: inline-block; padding: 18px; background: #fff; border-radius: 22px; border: 3px solid var(--brand); }
.poster-qr svg, .poster-qr img { width: 260px; height: 260px; display: block; }
.poster-step { margin: 18px 0 30px; font-weight: 700; font-size: 1.05rem; }
.poster-condo { display: inline-block; padding: 10px 22px; border-radius: 12px; font-weight: 800; font-size: 1.15rem; color: #3B2A08; background: linear-gradient(180deg, var(--brass-hi), var(--brass) 60%, var(--brass-lo)); box-shadow: inset 0 1px 0 rgb(255 255 255 / .5), 0 2px 0 var(--brass-lo); }
.poster-app { margin-top: 16px; color: #5B6B70; font-weight: 650; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; background: rgb(8 16 18 / .86); animation: fade .2s; cursor: zoom-out; }
.lightbox img { max-height: 90dvh; border-radius: 12px; animation: pop .35s var(--spring); }
@keyframes fade { from { opacity: 0; } }

/* ---------- Atualizações ao vivo ---------- */
.live-pill { position: fixed; left: 50%; translate: -50% 0; bottom: calc(86px + var(--tabbar-h)); z-index: 40; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border: 0; border-radius: 999px; background: var(--brass); color: #2D1F05; font: inherit; font-weight: 800; box-shadow: var(--shadow-up); cursor: pointer; animation: toast-in .4s var(--spring); }

/* ---------- Responsivo ---------- */
@media (max-width: 1000px) {
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .desk { grid-template-columns: 1fr; }
  .desk-side { position: static; }
  .settings { grid-template-columns: 1fr; }
  .side-tabs { position: static; display: flex; overflow-x: auto; scrollbar-width: none; }
  .side-tabs a { flex: none; }
  .person { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .has-user:not(.is-staff) { --tabbar-h: calc(64px + env(safe-area-inset-bottom)); }
  .has-user:not(.is-staff) .nav { display: none; }
  .has-user:not(.is-staff) .me { margin-left: auto; }
  .has-user:not(.is-staff) .me form { display: none; }
  .tabbar {
    position: fixed; z-index: 30; left: 0; right: 0; bottom: 0;
    display: grid; grid-template-columns: repeat(4, 1fr);
    height: var(--tabbar-h); padding: 6px 4px env(safe-area-inset-bottom);
    background: color-mix(in oklab, var(--surface) 92%, transparent);
    backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
    border-top: 1px solid var(--line);
  }
  .tab { display: grid; justify-items: center; align-content: center; gap: 3px; color: var(--muted); text-decoration: none; font-size: .7rem; font-weight: 700; border-radius: 12px; }
  .tab .ico { width: 24px; height: 24px; }
  .tab.is-active { color: var(--brand); }
  .tab.is-active .ico { animation: hop .45s var(--spring); }
  .tab-new .ico { width: 30px; height: 30px; padding: 4px; border-radius: 10px; background: var(--brand); color: #fff; stroke-width: 2.2; }
  .tab-new.is-active { color: var(--ink); }
  .btn-new { display: none; }
  .is-staff .topbar { flex-wrap: wrap; row-gap: 8px; }
  .is-staff .nav { order: 3; width: 100%; overflow-x: auto; scrollbar-width: none; margin: 0 -4px; }
  .is-staff .nav-link { flex: none; padding: 8px 12px; }
  .is-staff .me { margin-left: auto; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .kpis .kpi:last-child { grid-column: span 2; }
  .tickets thead { display: none; }
  .tickets, .tickets tbody, .tickets tr, .tickets td { display: block; }
  .tickets tr { padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .tickets td { padding: 2px 0; border: 0; }
  .tickets .c-main { min-width: 0; }
  .tickets td:nth-child(3) { display: none; }
  .tickets td:nth-child(4), .tickets td:nth-child(5) { display: inline-block; margin-right: 10px; margin-top: 6px; font-size: .85rem; }
  .prio-row-alta td:first-child { box-shadow: none; }
  .prio-row-alta { box-shadow: inset 4px 0 0 var(--bad); }
  .filters select { flex: 1 1 140px; }
  .inline-form { grid-template-columns: 1fr; }
  .reply-bar { flex-wrap: wrap; }
  .status-pick { margin-left: 0; flex: 1; }
  .reply-bar .btn { flex: 1 1 100%; }
  .mode-seg { width: 100%; }
}

@media (max-width: 520px) {
  .main { padding-top: 18px; }
  .grid-2 { grid-template-columns: 1fr; }
  .unit-row { grid-template-columns: 1fr 1fr; }
  .brand-name { font-size: .98rem; }
  .auth-card { padding: 26px 18px; border-radius: 22px; }
  .page-auth .main { place-items: start center; }
  .cat-grid { grid-template-columns: 1fr 1fr; }
  .cat-card { flex-direction: row; align-items: center; font-size: .86rem; padding: 10px; gap: 8px; }
  .cat-card .cat-ico { width: 34px; height: 34px; border-radius: 10px; }
  .trow { padding: 12px; gap: 12px; }
  .trow .cat-ico { width: 40px; height: 40px; }
  .trow-side .badge { font-size: 0; padding: 0; width: 12px; height: 12px; background: none; }
  .trow-side .badge::before { width: 10px; height: 10px; }
  .msg { max-width: 92%; }
  .track-label { font-size: .7rem; }
  .plaque-num { font-size: 1.3rem; }
  .checks { grid-template-columns: 1fr; }
  .seg span { font-size: .84rem; padding: 8px 6px; }
  .poster { padding: 36px 20px; }
  .poster h1 { font-size: 1.9rem; }
}

@media (min-width: 761px) {
  .logout-mobile { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

@media print {
  .topbar, .tabbar, .no-print, .toasts, .skip { display: none !important; }
  body { background: #fff; }
  .main { padding: 0; max-width: none; }
  .poster { border: 0; padding: 20px 0; }
}

/* ---------- Instalar app (PWA) ---------- */
.install-banner { position: fixed; z-index: 35; left: 12px; right: 12px; bottom: calc(12px + var(--tabbar-h)); max-width: 520px; margin: 0 auto; display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow-up); animation: toast-in .5s var(--spring); }
.install-banner > span:nth-child(2) { flex: 1; display: grid; line-height: 1.3; }
.install-banner small { color: var(--muted); }
.install-banner[hidden] { display: none; }
a.avatar { text-decoration: none; color: #fff; }

/* =====================================================================
   v1.1 — status mais distintos, listas zebradas, fluidez e novos módulos
   ===================================================================== */
:root {
  --zebra: color-mix(in oklab, var(--brand) 3.5%, var(--surface));
  --st-aberto: #2F62C9;
  --st-em_analise: #7048E8;
  --st-em_andamento: #C27803;
  --st-aguardando_morador: #D9480F;
  --st-resolvido: #1F8A55;
  --st-fechado: #6B7A7F;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --zebra: color-mix(in oklab, var(--brand) 9%, var(--surface)); } }

/* Transição suave entre páginas (navegadores compatíveis) */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .22s; }
.main { view-transition-name: main; }

/* Status: selo cheio e cor própria por etapa */
.badge { color: #fff; background: var(--c); padding: 4px 11px 4px 9px; box-shadow: 0 1px 0 color-mix(in oklab, var(--c) 60%, black); }
.badge::before { background: rgb(255 255 255 / .85); }
.badge.st-fechado { color: color-mix(in oklab, var(--c) 30%, var(--ink)); background: color-mix(in oklab, var(--c) 16%, var(--surface)); box-shadow: none; }
.badge.st-fechado::before { background: var(--c); }
.sdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex: none; }

/* Faixa colorida à esquerda de cada linha conforme o status */
.trow.st-row { box-shadow: inset 5px 0 0 var(--c); padding-left: 20px; }
.trow.is-waiting { border-left: 1px solid var(--line); }
.tickets tr.st-row td:first-child { box-shadow: inset 4px 0 0 var(--c); }
.prio-row-alta td:first-child { box-shadow: none; }

/* Listas e tabelas zebradas */
.tlist.zebra li:nth-child(even) .trow { background: var(--zebra); }
.tickets.zebra tbody tr:nth-child(even) { background: var(--zebra); }
.tickets.zebra tbody tr.is-unread { background: color-mix(in oklab, var(--brass) 9%, var(--surface)); }
.people.zebra .person:nth-child(even), .rows.zebra .row-item:nth-child(even) { background: var(--zebra); }
.rows.zebra .row-item { padding-inline: 10px; border-radius: 10px; border-bottom: 0; }

/* Chips de status para filtrar */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 16px; }
.chip-st { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--muted); font-weight: 700; font-size: .85rem; text-decoration: none; transition: background .2s, color .2s, border-color .2s; }
.chip-st:hover { border-color: var(--c, var(--brand)); color: var(--ink); }
.chip-st.is-active { background: var(--c, var(--ink)); border-color: var(--c, var(--ink)); color: #fff; }
.chip-st.is-active .sdot { background: #fff; }

/* Busca */
.search-big { flex: 1 1 420px; }
.search-inline { margin: 0 0 14px; }
.search-inline .search { display: block; }
mark { background: color-mix(in oklab, var(--brass-hi) 55%, transparent); color: inherit; padding: 0 2px; border-radius: 3px; }
.snippet { display: block; font-size: .84rem; color: var(--muted); line-height: 1.45; margin-top: 2px; white-space: normal; }
.result-line { color: var(--muted); font-size: .92rem; margin: 0 0 12px; }

/* KPIs */
.kpis-4 { grid-template-columns: repeat(4, 1fr); }
.kpis-6 { grid-template-columns: repeat(6, 1fr); }
.kpi { position: relative; overflow: hidden; }
.kpi::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--kc, transparent); }
.k-new { --kc: var(--brass); } .k-queue { --kc: var(--st-aberto); } .k-wait { --kc: var(--st-aguardando_morador); } .k-done { --kc: var(--st-resolvido); } .k-rate { --kc: var(--brass-hi); }
.kpi-st { --kc: var(--c); }
.kpi-st b { color: var(--c); }

/* Boas-vindas */
.welcome-card {
  position: relative; display: flex; gap: 18px; align-items: flex-start; overflow: hidden;
  padding: 24px; margin-bottom: 18px; border-radius: var(--r-l); color: #fff;
  background: radial-gradient(120% 140% at 100% 0%, color-mix(in oklab, var(--brass) 45%, var(--brand)) 0%, var(--brand) 45%, var(--brand-ink) 100%);
  box-shadow: var(--shadow-up); animation: welcome-in .7s var(--spring) both;
}
.welcome-card h1 { color: #fff; margin-bottom: 6px; }
.welcome-card p { color: rgb(255 255 255 / .9); max-width: 60ch; }
.welcome-art { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; background: rgb(255 255 255 / .14); flex: none; color: var(--brass-hi); }
.welcome-art .ico { animation: wave 1.6s ease .5s 2; transform-origin: 70% 80%; }
.btn-light { background: #fff; color: var(--brand); border-color: #fff; }
.btn-light:hover { background: color-mix(in oklab, #fff 88%, var(--brass-hi)); color: var(--brand-ink); }
@keyframes wave { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(16deg); } 40% { transform: rotate(-10deg); } 60% { transform: rotate(12deg); } 80% { transform: rotate(-4deg); } }
@keyframes welcome-in { from { transform: translateY(12px) scale(.98); opacity: 0; } }
.welcome-staff { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.welcome-staff h1 { margin-bottom: 4px; }
.welcome-staff p { margin: 0; }
.welcome-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.role-pill { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; padding: 4px 10px; border-radius: 999px; background: color-mix(in oklab, var(--brass) 14%, var(--surface)); color: var(--brass-lo); font-weight: 700; font-size: .82rem; }

/* Avisos do prédio */
.notices { margin-bottom: 18px; padding: 16px; border-radius: var(--r-l); background: color-mix(in oklab, var(--brass) 8%, var(--surface)); border: 1px solid color-mix(in oklab, var(--brass) 30%, var(--surface)); }
.notices h2 { display: flex; align-items: center; gap: 8px; font-size: 1rem; color: var(--brass-lo); }
.notices ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.notice { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface); box-shadow: inset 4px 0 0 var(--c); }
.notice-main { flex: 1; display: grid; min-width: 0; }
.notice-main > span { font-size: .9rem; color: var(--muted); }
.notice-main small { color: var(--muted); font-size: .76rem; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .notices h2 { color: var(--brass-hi); } }

/* Recibos de leitura (só equipe) */
.ticks { width: 16px; height: 11px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -1px; margin-right: 3px; }
.rcpt { display: inline-flex; align-items: center; margin-left: 8px; color: var(--muted); font-weight: 650; }
.rcpt.is-delivered { color: var(--muted); }
.rcpt.is-read { color: #1D9BF0; }
.rcpt-mini { display: inline-flex; margin-left: 6px; color: var(--line-2); vertical-align: middle; }
.rcpt-mini.is-delivered { color: var(--muted); }
.rcpt-mini.is-read { color: #1D9BF0; }
.rcpt-mini .ticks { width: 18px; height: 12px; margin: 0; }
.rcpt.is-fresh { animation: pop .5s var(--spring); }
.msg-auto .msg-bubble { background-image: linear-gradient(135deg, rgb(255 255 255 / .08) 25%, transparent 25%, transparent 50%, rgb(255 255 255 / .08) 50%, rgb(255 255 255 / .08) 75%, transparent 75%); background-size: 14px 14px; }
.auto-card h2 .ico, .msg-who .ico-zap { color: var(--brass); }

/* Login */
.social { display: grid; gap: 8px; }
.btn-social { justify-content: center; background: var(--surface); border-color: var(--line-2); font-weight: 700; }
.btn-social .ico { width: 20px; height: 20px; }
.btn-social:hover { border-color: var(--ink); }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .85rem; margin: 16px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.compact-check { font-size: .9rem; align-items: center; }
.compact-check input { width: 20px; height: 20px; margin: 0; }
.auth-alt { display: grid; gap: 6px; justify-items: center; margin-top: 14px; }
.auth-small { font-size: .9rem; color: var(--muted); }
.social-linked { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--brand-soft); margin-bottom: 14px; font-size: .9rem; }
.social-linked span { flex: 1; }
.social-linked .ico { width: 22px; height: 22px; }

/* Equipe / ajustes */
.checks-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 6px 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
[data-role-form]:has(input[value=atendente]:checked) .gestor-only { display: none; }
.mini-details summary { cursor: pointer; color: var(--brand); font-size: .84rem; font-weight: 650; margin-top: 2px; }
.mini-details[open] summary { margin-bottom: 8px; }
.roles-help { display: grid; gap: 4px; padding: 12px 14px; margin: 10px 0; border-radius: 12px; background: var(--surface-2); font-size: .88rem; color: var(--muted); }
.roles-help p { margin: 0; }
.roles-help b { color: var(--ink); }
.provider { padding: 14px; border: 1px solid var(--line); border-radius: var(--r); display: grid; gap: 10px; }
.provider legend { display: flex; align-items: center; gap: 8px; padding: 0 6px; }
.managers { display: flex; align-items: center; gap: 6px; margin: 4px 0 0; font-size: .85rem; color: var(--muted); }
.inline-form .full { grid-column: 1 / -1; }
.danger-zone { border-color: color-mix(in oklab, var(--bad) 35%, var(--surface)); }
.btn-danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-danger:hover { background: color-mix(in oklab, var(--bad) 85%, black); border-color: transparent; color: #fff; }
.callout:not(.ok):not(.bad) { background: var(--surface-2); border: 1px solid var(--line); }
.center-row { justify-content: center; margin-top: 12px; }
.panel.center { text-align: center; }

/* Relatório */
.report-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.status-picks { display: flex; flex-wrap: wrap; gap: 8px; }
.status-pick-opt { position: relative; }
.status-pick-opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.status-pick-opt span { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--surface); font-weight: 700; font-size: .9rem; color: var(--muted); transition: all .2s; }
.status-pick-opt input:checked + span { border-color: var(--c); color: color-mix(in oklab, var(--c) 80%, var(--ink)); background: color-mix(in oklab, var(--c) 10%, var(--surface)); }
.status-pick-opt input:focus-visible + span { outline: 3px solid var(--brand-line); }

/* Log de atividade */
.log td { vertical-align: top; }
.log-act { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; font-size: .88rem; white-space: nowrap; }
.log-act .ico { width: 1.05em; height: 1.05em; }
.tone-ok { color: var(--ok); } .tone-bad { color: var(--bad); } .tone-info { color: var(--st-aberto); } .tone-warn { color: var(--st-aguardando_morador); }
.log-detail { font-size: .88rem; max-width: 420px; overflow-wrap: anywhere; }
.date-f { display: flex; align-items: center; gap: 6px; font-size: .86rem; font-weight: 650; color: var(--muted); }
.date-f input { min-height: 44px; width: auto; }

@media (max-width: 1000px) {
  .kpis-6 { grid-template-columns: repeat(3, 1fr); }
  .report-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .kpis-4 { grid-template-columns: repeat(2, 1fr); }
  .kpis .kpi-st:last-child, .kpis-4 .kpi:last-child { grid-column: auto; }
  .welcome-card { flex-direction: column; padding: 20px; }
  .tickets.log td:nth-child(5) { display: block; }
  .tickets.log td:nth-child(3) { display: inline-block; }
}
@media (max-width: 520px) {
  .report-grid { grid-template-columns: 1fr; }
  .trow.st-row { padding-left: 16px; }
}
@media (max-width: 520px) {
  .trow-side .badge { background: none; box-shadow: none; }
  .trow-side .badge::before { background: var(--c); width: 11px; height: 11px; }
}
.toast .ticks-seen { color: #6EC8FF; width: 20px; height: 13px; }
/* Celular: o status aparece com nome e cor dentro da linha do chamado */
.badge-m { display: none; }
.notice { align-items: flex-start; }
.notice-main small { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
@media (max-width: 520px) {
  .badge-m { display: inline-flex; }
  .badge-m .badge { font-size: .74rem; padding: 2px 9px 2px 7px; }
  .trow-side .badge { display: none; }
  .trow-meta { gap: 8px; }
}

.st-aberto { --c: var(--st-aberto); } .st-em_analise { --c: var(--st-em_analise); } .st-em_andamento { --c: var(--st-em_andamento); }
.st-aguardando_morador { --c: var(--st-aguardando_morador); } .st-resolvido { --c: var(--st-resolvido); } .st-fechado { --c: var(--st-fechado); }

/* Barra de filtros por status (painel da equipe) */
.rail {
  display: flex; align-items: center; gap: 6px; margin: 0 0 18px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow);
  overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity;
}
.rail::-webkit-scrollbar { display: none; }
.rail-group { display: flex; gap: 4px; flex: none; }
.rail-sep { width: 1px; align-self: stretch; margin: 4px 4px; background: var(--line); flex: none; }
.rail-chip:not([class*="st-"]) { --c: var(--ink); }
.rail-chip {
  display: inline-flex; align-items: center; gap: 8px; flex: none; scroll-snap-align: start;
  height: 40px; padding: 0 8px 0 13px; border-radius: 11px;
  color: var(--muted); font-weight: 650; font-size: .88rem; text-decoration: none; white-space: nowrap;
  transition: background .18s, color .18s, box-shadow .18s, transform .12s var(--ease);
}
.rail-chip b {
  min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; display: inline-grid; place-items: center;
  background: var(--surface-2); color: var(--ink); font-size: .76rem; font-weight: 800; font-feature-settings: "tnum";
  transition: background .18s, color .18s;
}
.rail-chip .sdot { width: 8px; height: 8px; box-shadow: 0 0 0 3px color-mix(in oklab, var(--c) 18%, transparent); }
.rail-chip:hover { background: color-mix(in oklab, var(--c) 8%, var(--surface)); color: var(--ink); }
.rail-chip:active { transform: scale(.97); }
.rail-chip:focus-visible { outline: 3px solid var(--brand-line); outline-offset: 1px; }
.rail-chip.is-zero { opacity: .55; }
.rail-chip.is-zero:hover { opacity: 1; }
.rail-chip.is-active { background: var(--c); color: #fff; box-shadow: 0 2px 8px color-mix(in oklab, var(--c) 35%, transparent); opacity: 1; }
.rail-chip.is-active b { background: rgb(255 255 255 / .22); color: #fff; }
.rail-chip.is-active .sdot { background: #fff; box-shadow: 0 0 0 3px rgb(255 255 255 / .25); }
.rail-group:first-child .rail-chip.is-active { --c: var(--brand); }
.rail-chip.has-news:not(.is-active) b { background: var(--brass); color: #fff; animation: pulse 2s infinite; --c: var(--brass); }

/* Chips das outras telas (atividade) no mesmo padrão */
.chips { padding: 6px; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); margin: 0 0 18px; width: fit-content; max-width: 100%; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
.chip-st { border: 0; height: 38px; padding: 0 14px; border-radius: 11px; background: transparent; }
.chip-st:hover { background: var(--surface-2); }
.chip-st.is-active { background: var(--brand); color: #fff; }

@media (min-width: 761px) { .rail { flex-wrap: wrap; overflow: visible; } }
@media (min-width: 761px) {
  .rail { gap: 2px; padding: 5px; }
  .rail-chip { padding: 0 6px 0 10px; gap: 7px; font-size: .86rem; }
  .rail-chip b { min-width: 22px; height: 22px; padding: 0 6px; }
  .rail-sep { margin: 6px 3px; }
}
@media (min-width: 761px) { .rail-group { display: contents; } .rail-chip { padding: 0 5px 0 9px; } }
.approved-card { display: flex; gap: 16px; align-items: flex-start; padding: 18px 20px; margin-bottom: 18px; border-radius: var(--r-l); background: var(--ok-soft); border: 1px solid color-mix(in oklab, var(--ok) 30%, var(--surface)); animation: welcome-in .5s var(--spring) both; }
.approved-ico { color: var(--ok); flex: none; }
.approved-ico .ico .i-2 { stroke-dasharray: 1; animation: draw .7s .2s var(--ease) both; }
.approved-body h2 { margin-bottom: 4px; }
.approved-body p { color: var(--ink); margin-bottom: 12px; }
.install-howto { display: grid; gap: 6px; margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); font-size: .9rem; }
.install-howto p { margin: 0; }
.install-panel .btn { margin-top: 4px; }
.remind-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 14px; border-radius: 14px; background: color-mix(in oklab, var(--brass) 9%, var(--surface)); border: 1px solid color-mix(in oklab, var(--brass) 30%, var(--surface)); }
.remind-bar span { display: flex; align-items: center; gap: 8px; }
.remind-wa { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.diag { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; font-size: .88rem; }
.diag li { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.diag li b { color: var(--ink); }
.diag li.ok .ico { color: var(--ok); } .diag li.bad .ico, .diag li.bad b { color: var(--bad); }
.temp-pw { display: grid; gap: 6px; padding: 14px; margin-bottom: 12px; border-radius: 12px; background: color-mix(in oklab, var(--brass) 10%, var(--surface)); border: 1px dashed var(--brass); }
.temp-pw span { font-size: .8rem; font-weight: 700; color: var(--brass-lo); }
.temp-pw b { font-size: 1.6rem; letter-spacing: .12em; font-feature-settings: "tnum"; user-select: all; }
.temp-pw small { color: var(--muted); }
