@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url(fonts/archivo-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url(fonts/archivo-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Layout: escritório de leilão à noite. Menu lateral rotulado + tela de trabalho; cor só nos dados (rating, faixa de preço, status).
   Grade: menu 236px + tela fluida com margem 24px (16px no celular); blocos em grade de 12 colunas com 16px de espaço. */
:root {
  /* escuro (padrão) */
  --bg: #0c100f;
  --panel: #121816;
  --raise: #19211e;
  --hover: #1f2925;
  --line: #222c28;
  --line2: #2f3b36;
  --ink: #e6ebe8;
  --ink2: #aab5af;
  --ink3: #8a978f;
  --accent: #6d9dff;
  --accent-ink: #07101f;
  --accent-soft: #17233d;
  --ok: #4fc58c;
  --ok-soft: #12281d;
  --warn: #e6b450;
  --warn-soft: #2c2312;
  --bad: #f07b6d;
  --bad-soft: #331917;
  --r-s: #e9c35a;
  --r-s-soft: #2d2610;
  --r-a: #4fc58c;
  --r-a-soft: #12281d;
  --r-b: #7fb4e8;
  --r-b-soft: #142434;
  --r-c: #9aa59f;
  --r-c-soft: #222a27;
  --r-d: #f07b6d;
  --r-d-soft: #331917;
  --r-r: #b49af0;
  --sp: #5fc4c9;
  --sp-soft: #12292b;
  --hl: #f2b84b;
  --r-r-soft: #241d36;
  --r-none: #39443f;
  --band: #23324f;
  --scrim: rgba(3, 6, 5, 0.62);
  --f-ui: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --r: 8px;
  --rc: 6px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f3f5f4;
  --panel: #ffffff;
  --raise: #f6f8f7;
  --hover: #eef2f0;
  --line: #e1e6e3;
  --line2: #cfd6d2;
  --ink: #141a17;
  --ink2: #4a554f;
  --ink3: #56625b;
  --accent: #2c5fd6;
  --accent-ink: #ffffff;
  --accent-soft: #e4ebfb;
  --ok: #176b44;
  --ok-soft: #dcf1e6;
  --warn: #7d5106;
  --warn-soft: #f8ecd3;
  --bad: #b8392c;
  --bad-soft: #f8e1dd;
  --r-s: #7a5a00;
  --r-s-soft: #f6ecc4;
  --r-a: #176b44;
  --r-a-soft: #dcf1e6;
  --r-b: #2c62a8;
  --r-b-soft: #e1ecf8;
  --r-c: #5d6964;
  --r-c-soft: #e8ecea;
  --r-d: #b8392c;
  --r-d-soft: #f8e1dd;
  --r-r: #6a4bb8;
  --sp: #11777d;
  --sp-soft: #dcf1f2;
  --hl: #a86a00;
  --r-r-soft: #ece6fa;
  --r-none: #d5dcd8;
  --band: #d6e2fa;
  --scrim: rgba(20, 26, 23, 0.4);
  color-scheme: light;
}
/* Foreclosure: troca só a cor de ação para cobre, para nunca confundir as duas bases */
body.fc {
  --accent: #f0a35c;
  --accent-ink: #1e1206;
  --accent-soft: #33230f;
  --band: #3f2d18;
}
:root[data-theme="light"] body.fc {
  --accent: #b4610f;
  --accent-ink: #ffffff;
  --accent-soft: #f8e9d8;
  --band: #f3dcc2;
}

* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-ui);
  font-size: 14px;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 40;
  background: var(--bg);
}
a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button,
select,
input,
textarea {
  font: inherit;
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
::selection {
  background: var(--accent-soft);
}
svg[data-i],
.ico {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
h1,
h2,
h3 {
  margin: 0;
  font-weight: 650;
  text-wrap: balance;
  letter-spacing: -0.01em;
}
h1 {
  font-size: 26px;
  font-stretch: 88%;
  line-height: 1.1;
}
h2 {
  font-size: 16px;
  font-stretch: 92%;
}
h3 {
  font-size: 14px;
}
p {
  margin: 0;
}
.muted {
  color: var(--ink3);
}
.ink2 {
  color: var(--ink2);
}
.num {
  text-align: right;
  white-space: nowrap;
}
.nowrap {
  white-space: nowrap;
}
.code {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  font-stretch: 94%;
}
.small {
  font-size: 12.5px;
}
kbd {
  font: inherit;
  font-size: 11.5px;
  color: var(--ink3);
  border: 1px solid var(--line2);
  border-radius: 4px;
  padding: 0 5px;
  line-height: 18px;
}

/* ---------- shell ---------- */
.app {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  min-height: 100vh;
}
.side {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  height: calc(100vh - env(safe-area-inset-top, 0px));
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px 12px 14px max(12px, env(safe-area-inset-left, 0px));
  border-right: 1px solid var(--line);
  background: var(--bg);
  overflow-y: auto;
  z-index: 30;
}
.side-top {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 4px;
}
.mark {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--ink);
}
.mark:hover {
  text-decoration: none;
}
.mark svg {
  width: 32px;
  height: 32px;
  flex: none;
}
.mark-bg {
  fill: var(--accent);
}
.mark-fg {
  fill: none;
  stroke: var(--accent-ink);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.mark-t {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}
.mark-t strong {
  font-size: 15.5px;
  font-stretch: 86%;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.mark-t small {
  font-size: 12px;
  color: var(--ink3);
}
.seg {
  display: inline-flex;
  background: var(--raise);
  border: 1px solid var(--line);
  border-radius: var(--rc);
  padding: 2px;
  gap: 2px;
}
.seg button {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--ink2);
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  white-space: nowrap;
  transition:
    background 0.15s,
    color 0.15s;
}
.seg button:hover {
  color: var(--ink);
}
.seg button[aria-pressed="true"] {
  background: var(--panel);
  color: var(--ink);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--line2);
}
.mode button[aria-pressed="true"] {
  color: var(--accent);
}
.nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.nav-g {
  font-size: 12px;
  color: var(--ink3);
  padding: 14px 10px 6px;
}
.nav-g:first-child {
  padding-top: 2px;
}
.nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: var(--rc);
  color: var(--ink2);
  font-size: 14px;
  transition:
    background 0.12s,
    color 0.12s;
}
.nav a:hover {
  background: var(--hover);
  color: var(--ink);
  text-decoration: none;
}
.nav a[aria-current="page"] {
  background: var(--raise);
  color: var(--ink);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--line);
}
.nav a[aria-current="page"] svg {
  color: var(--accent);
}
.count {
  margin-left: auto;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink2);
  background: var(--raise);
  border-radius: 9px;
  padding: 0 7px;
  line-height: 18px;
}
.count.bad {
  background: var(--bad);
  color: var(--accent-ink);
}
:root[data-theme="light"] .count.bad {
  color: #fff;
}
.side-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 4px 0;
  border-top: 1px solid var(--line);
}
.sync {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--ink3);
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink3);
  flex: none;
}
.dot.on {
  background: var(--ok);
}
.dot.warn {
  background: var(--warn);
}
.scrim {
  position: fixed;
  inset: 0;
  background: var(--scrim);
  z-index: 25;
}

.canvas {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.top {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px max(24px, env(safe-area-inset-right, 0px)) 10px 24px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.btn.menu-btn {
  display: none;
}
.search-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 0 1 420px;
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--rc);
  padding: 6px 10px;
  color: var(--ink3);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s;
}
.search-btn:hover {
  border-color: var(--line2);
  color: var(--ink2);
}
.search-btn span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.top-f {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink3);
}
main {
  padding: 22px max(24px, env(safe-area-inset-right, 0px)) 72px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 1480px;
  width: 100%;
  outline: none;
}
.tabbar {
  display: none;
}

/* ---------- controls ---------- */
select,
input[type="text"],
input[type="search"],
input[type="number"],
input[type="time"],
input:not([type]),
textarea {
  background: var(--panel);
  border: 1px solid var(--line2);
  border-radius: var(--rc);
  padding: 6px 9px;
  min-width: 0;
  color: var(--ink);
}
select {
  padding-right: 6px;
  cursor: pointer;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  outline: none;
}
input::placeholder,
textarea::placeholder {
  color: var(--ink3);
}
textarea {
  resize: vertical;
  min-height: 72px;
  line-height: 1.45;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: var(--panel);
  border: 1px solid var(--line2);
  border-radius: var(--rc);
  padding: 6px 12px;
  cursor: pointer;
  font-weight: 500;
  white-space: nowrap;
  color: var(--ink);
  transition:
    background 0.12s,
    border-color 0.12s,
    transform 0.08s;
}
.btn:hover {
  background: var(--hover);
  text-decoration: none;
}
.btn:active {
  transform: translateY(1px);
}
.btn:disabled {
  opacity: 0.45;
  cursor: default;
  transform: none;
}
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}
.btn.primary:hover {
  filter: brightness(1.08);
  background: var(--accent);
}
.btn.ghost {
  background: transparent;
  border-color: transparent;
  color: var(--ink2);
}
.btn.ghost:hover {
  background: var(--hover);
  color: var(--ink);
}
.btn.sm {
  padding: 3px 9px;
  font-size: 12.5px;
}
.btn.icon {
  padding: 6px;
}
.btn.on {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}
.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.filters input[type="search"] {
  flex: 1 1 240px;
}
.filters .spacer {
  margin-left: auto;
}

/* ---------- page head ---------- */
.phead {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  flex-wrap: wrap;
}
.phead-t {
  flex: 1 1 320px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.phead-a {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.crumb {
  font-size: 13px;
  color: var(--ink3);
  display: flex;
  gap: 6px;
  align-items: center;
}
.sub {
  color: var(--ink2);
  font-size: 14px;
  max-width: 78ch;
}
.finding {
  color: var(--ink);
  font-size: 15px;
}
.finding b {
  color: var(--accent);
  font-weight: 600;
}

/* ---------- panels ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}
.c4 {
  grid-column: span 4;
}
.c5 {
  grid-column: span 5;
}
.c6 {
  grid-column: span 6;
}
.c7 {
  grid-column: span 7;
}
.c8 {
  grid-column: span 8;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
  min-width: 0;
}
.panel > .hd {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
  min-height: 48px;
}
.panel > .hd .r {
  margin-left: auto;
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  color: var(--ink3);
}
.panel > .bd {
  padding: 14px;
}
.panel > .ft {
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  font-size: 13px;
  color: var(--ink3);
  flex-wrap: wrap;
}
.empty {
  padding: 26px 16px;
  text-align: center;
  color: var(--ink3);
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}
.empty h2,
.empty h3 {
  color: var(--ink);
  font-size: 15px;
}
.empty p {
  max-width: 56ch;
}
.note {
  font-size: 13px;
  color: var(--ink2);
  background: var(--raise);
  border-radius: var(--rc);
  padding: 9px 12px;
}
.note.warn {
  background: var(--warn-soft);
  color: var(--warn);
}
.note.bad {
  background: var(--bad-soft);
  color: var(--bad);
}
.note.ok {
  background: var(--ok-soft);
  color: var(--ok);
}

/* ---------- figures ---------- */
.figs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
}
.fig {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  border-left: 1px solid var(--line);
}
.fig:first-child {
  border-left: 0;
}
.fig .l {
  font-size: 12.5px;
  color: var(--ink3);
}
.fig .n {
  font-size: 30px;
  font-weight: 600;
  font-stretch: 82%;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.fig .n small {
  font-size: 15px;
  color: var(--ink3);
  font-weight: 500;
  margin-left: 3px;
  letter-spacing: 0;
}
.fig .s {
  font-size: 12.5px;
  color: var(--ink2);
}
.fig .n.bad {
  color: var(--bad);
}
.fig .n.ok {
  color: var(--ok);
}
.fig .n.warn {
  color: var(--warn);
}

/* ---------- chips & rating ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 4px;
  padding: 0 7px;
  line-height: 20px;
  white-space: nowrap;
  background: var(--raise);
  color: var(--ink2);
}
.chip.ok {
  background: var(--ok-soft);
  color: var(--ok);
}
.chip.warn {
  background: var(--warn-soft);
  color: var(--warn);
}
.chip.off-resch {
  background: var(--warn-soft);
  color: var(--warn);
}
.chip.off-other {
  background: var(--raise);
  color: var(--ink2);
}
.chip.off-canc,
.chip.off-wa,
.chip.off-cty,
.chip.bad {
  background: var(--bad-soft);
  color: var(--bad);
}
.chip.off-red,
.chip.off-ras,
.chip.red {
  background: var(--r-r-soft);
  color: var(--r-r);
}
.chip.info {
  background: var(--accent-soft);
  color: var(--accent);
}
.chip .dot {
  width: 6px;
  height: 6px;
  background: currentColor;
}
.rt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 24px;
  padding: 0 6px;
  border-radius: 5px;
  font-weight: 700;
  font-size: 14px;
  font-stretch: 85%;
  background: var(--raise);
  color: var(--ink3);
}
.rt.S {
  background: var(--r-s-soft);
  color: var(--r-s);
  box-shadow: inset 0 0 0 1px var(--r-s);
}
.rt.A {
  background: var(--r-a-soft);
  color: var(--r-a);
}
.rt.B {
  background: var(--r-b-soft);
  color: var(--r-b);
}
.rt.C {
  background: var(--r-c-soft);
  color: var(--r-c);
}
.rt.D {
  background: var(--r-d-soft);
  color: var(--r-d);
}
.rt.R {
  background: var(--r-r-soft);
  color: var(--r-r);
  box-shadow: inset 0 0 0 1px var(--r-r);
}
.rt.M {
  background: var(--warn-soft);
  color: var(--warn);
  box-shadow: inset 0 0 0 1px var(--warn);
  font-size: 12px;
}
.rt.X {
  background: var(--bad-soft);
  color: var(--bad);
  box-shadow: inset 0 0 0 1px var(--bad);
  font-size: 12px;
}
.rt.O {
  box-shadow: inset 0 0 0 1px var(--ink3);
  font-size: 12px;
}
.rt.SP {
  background: var(--sp-soft);
  color: var(--sp);
  box-shadow: inset 0 0 0 1px var(--sp);
  font-size: 11.5px;
}
.rt.lg {
  min-width: 44px;
  height: 40px;
  font-size: 22px;
  border-radius: 8px;
}
.star {
  color: var(--r-s);
}
.strip {
  display: flex;
  height: 8px;
  border-radius: 3px;
  overflow: hidden;
  background: var(--r-none);
  gap: 1px;
  min-width: 80px;
}
.strip i {
  display: block;
  height: 100%;
}
.strip .S {
  background: var(--r-s);
}
.strip .A {
  background: var(--r-a);
}
.strip .B {
  background: var(--r-b);
}
.strip .C {
  background: var(--r-c);
}
.strip .D {
  background: var(--r-d);
}
.strip .N {
  background: var(--r-none);
}
.strip .SP {
  background: var(--sp);
}
.strip .R {
  background: var(--r-r);
}
.sp-t {
  color: var(--sp);
  font-weight: 600;
}
.chip.sp {
  background: var(--sp-soft);
  color: var(--sp);
}
.hl {
  color: var(--hl);
  font-weight: 700;
}
.hlbox {
  margin: 0 20px 12px;
  padding: 12px 14px;
  border-radius: 8px;
  border-left: 3px solid var(--hl);
  background: color-mix(in srgb, var(--hl) 9%, transparent);
}
.hlbox p {
  margin-left: 0;
}
.hl-hd {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.red-t {
  color: var(--r-r);
  font-weight: 600;
}
.legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--ink3);
  align-items: center;
}
.legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  margin-right: 5px;
  vertical-align: -1px;
}
.prog {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--ink2);
  white-space: nowrap;
}
.meter {
  height: 6px;
  border-radius: 3px;
  background: var(--raise);
  overflow: hidden;
  flex: 1;
  min-width: 60px;
}
.meter i {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
}
.meter.ok i {
  background: var(--ok);
}
.meter.warn i {
  background: var(--warn);
}
.meter.bad i {
  background: var(--bad);
}

/* Faixa de preço (equalização): banda p25–p75, mediana, lance mínimo e lance máximo */
.band {
  position: relative;
  height: 18px;
  min-width: 120px;
}
.band .tr {
  position: absolute;
  left: 0;
  right: 0;
  top: 8px;
  height: 2px;
  background: var(--line2);
  border-radius: 1px;
}
.band .bx {
  position: absolute;
  top: 4px;
  height: 10px;
  background: var(--band);
  border-radius: 2px;
}
.band .md {
  position: absolute;
  top: 2px;
  width: 2px;
  height: 14px;
  background: var(--ink);
  border-radius: 1px;
}
.band .mn {
  position: absolute;
  top: 1px;
  width: 8px;
  height: 16px;
  margin-left: -4px;
}
.band .mn::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 0;
  width: 2px;
  height: 16px;
  border-radius: 1px;
  background: var(--ok);
}
.band .mn.hi::before {
  background: var(--bad);
}
.band .mn.mid::before {
  background: var(--warn);
}
.band .mx {
  position: absolute;
  top: 0;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  transform: rotate(45deg);
  background: var(--accent);
  border-radius: 2px;
}
.band.lg {
  height: 30px;
}
.band.lg .tr {
  top: 14px;
}
.band.lg .bx {
  top: 8px;
  height: 16px;
}
.band.lg .md {
  top: 5px;
  height: 22px;
}
.band.lg .mn {
  top: 3px;
  height: 26px;
}
.band.lg .mn::before {
  height: 26px;
}
.band.lg .mx {
  top: 9px;
}
.pos {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.pos.lo {
  color: var(--ok);
}
.pos.mid {
  color: var(--warn);
}
.pos.hi {
  color: var(--bad);
}

/* ---------- tables ---------- */
.tbl-wrap {
  overflow-x: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
}
th {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink3);
  text-align: left;
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  background: var(--panel);
  position: sticky;
  top: 0;
  z-index: 1;
}
th.sort {
  cursor: pointer;
  user-select: none;
}
th.sort:hover {
  color: var(--ink);
}
th.sort[aria-sort] {
  color: var(--ink);
}
th.sort[aria-sort="ascending"]::after {
  content: " ↑";
  color: var(--accent);
}
th.sort[aria-sort="descending"]::after {
  content: " ↓";
  color: var(--accent);
}
th.num,
td.num {
  text-align: right;
}
td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
tbody tr:last-child td {
  border-bottom: 0;
}
tr.click {
  cursor: pointer;
  transition: background 0.1s;
}
tr.click:hover td {
  background: var(--hover);
}
tr.click:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
tr.off td {
  opacity: 0.55;
}
tr.red td {
  opacity: 0.5;
}
tr.red td:first-child {
  opacity: 1;
}
.card.red {
  opacity: 0.6;
}
tr.ours td:first-child {
  box-shadow: inset 3px 0 0 var(--ok);
}
.trunc {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.thumb {
  width: 88px;
  height: 52px;
  border-radius: 4px;
  object-fit: cover;
  display: block;
  background: var(--raise);
}
.thumb-x {
  width: 88px;
  height: 52px;
  border-radius: 4px;
  background: var(--raise);
  display: grid;
  place-items: center;
  color: var(--ink3);
  font-size: 11px;
}
.links {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.lk {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink2);
  border: 1px solid var(--line2);
  border-radius: 4px;
  padding: 0 7px;
  line-height: 22px;
  white-space: nowrap;
  transition:
    border-color 0.12s,
    color 0.12s;
}
.lk:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}
.lk.lg {
  font-size: 13.5px;
  line-height: 32px;
  padding: 0 12px;
}
.pager {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ---------- lists ---------- */
.list {
  display: flex;
  flex-direction: column;
}
.item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  color: inherit;
  min-width: 0;
}
.item:last-child {
  border-bottom: 0;
}
a.item:hover,
.item.click:hover {
  background: var(--hover);
  text-decoration: none;
  cursor: pointer;
}
.item .when {
  min-width: 62px;
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.item .when b {
  font-size: 17px;
  font-stretch: 85%;
  font-weight: 650;
}
.item .when span {
  font-size: 12px;
  color: var(--ink3);
}
.item .body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.item .body .t {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.item.unread {
  background: var(--accent-soft);
}
.item.unread:hover {
  background: var(--accent-soft);
}

/* Hoje: um leilão por linha */
.wk {
  display: grid;
  grid-template-columns: 74px minmax(0, 1.3fr) minmax(0, 1.6fr) minmax(
      0,
      1.2fr
    ) auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}
.wk:last-child {
  border-bottom: 0;
}
.wk .d {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.wk .d b {
  font-size: 24px;
  font-weight: 650;
  font-stretch: 80%;
}
.wk .d span {
  font-size: 12.5px;
  color: var(--ink3);
}
.wk .who {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.wk .who a {
  color: var(--ink);
  font-weight: 600;
  font-size: 15px;
}
.wk .col {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.wk .act {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.kv {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 7px 14px;
  margin: 0;
  font-size: 13.5px;
}
.kv dt {
  color: var(--ink3);
}
.kv dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

/* ---------- cards (imóveis no celular / visão em cartões) ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  padding: 14px;
}
.card {
  background: var(--raise);
  border-radius: var(--r);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  border: 1px solid var(--line);
  transition: border-color 0.12s;
  min-width: 0;
}
.card:hover {
  border-color: var(--line2);
}
.card:focus-visible {
  outline: 2px solid var(--accent);
}
.card .ph {
  aspect-ratio: 16 / 8;
  max-width: 100%;
  background: var(--panel);
  position: relative;
}
.card .ph img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.card .ph .rt {
  position: absolute;
  top: 8px;
  left: 8px;
}
.card .ph .star {
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 18px;
}
.card .ph .hl-card {
  position: absolute;
  top: 6px;
  left: 44px;
  font-size: 18px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}
.card .cb {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.card .ad {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card .rw {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  color: var(--ink2);
}

/* ---------- calendário ---------- */
.cal-m { min-width: 170px; text-align: center; font-size: 18px; }
.cal-kpi { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--ink2); }
.cal-kpi b { color: var(--ink); font-size: 15px; font-variant-numeric: tabular-nums; }
.cal-kpi .todo b { color: var(--warn); }
.cal {
  display: grid;
  grid-template-columns: minmax(0, 0.6fr) repeat(5, minmax(0, 1fr)) minmax(0, 0.6fr);
  gap: 6px;
}
.cal .dow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink2);
  padding: 2px 6px 4px;
}
.cal .day {
  min-height: 104px;
  border-radius: 10px;
  padding: 6px;
  background: var(--raise);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.cal .day.out { background: transparent; border-color: transparent; opacity: 0.35; }
.cal .day.wkend:not(.has) { background: transparent; border-style: dashed; }
.cal .day.past { background: color-mix(in srgb, var(--raise) 55%, var(--bg)); }
.cal .day.today {
  background: color-mix(in srgb, var(--accent) 12%, var(--raise));
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.cal .dh, .ag-d { display: flex; align-items: center; gap: 6px; padding: 0 2px 2px; }
.cal .dn { font-size: 14px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.cal .day.past .dn { color: var(--ink3); font-weight: 600; }
.cal .day.today .dn { color: var(--accent); }
.dtag { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; background: var(--accent); color: var(--accent-ink); border-radius: 99px; padding: 1px 7px; }
.cal .dsum { margin-left: auto; font-size: 11.5px; color: var(--ink2); font-variant-numeric: tabular-nums; }
.cal .ev, .cal-ag .ev {
  --c: var(--ev-td);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 6px;
  font-size: 13px;
  line-height: 1.25;
  border-radius: 6px;
  padding: 4px 7px;
  cursor: pointer;
  border: 0;
  border-left: 3px solid var(--c);
  background: color-mix(in srgb, var(--c) 16%, var(--panel));
  color: var(--ink);
  text-align: left;
  font-weight: 600;
  transition: background 0.12s, transform 0.12s;
  min-width: 0;
}
.cal .ev:hover, .cal-ag .ev:hover { background: color-mix(in srgb, var(--c) 30%, var(--panel)); }
.ev .ev-l { display: flex; align-items: center; gap: 4px; min-width: 0; }
.ev .ev-c { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev .ev-n { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink); opacity: 0.9; }
.ev .ev-t { grid-column: 1 / -1; font-size: 11px; font-weight: 500; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-fc { font-size: 9.5px; font-weight: 800; letter-spacing: 0.04em; color: var(--ev-fc); border: 1px solid var(--ev-fc); border-radius: 4px; padding: 0 3px; line-height: 1.3; }
.ev-hl { color: var(--hl); font-size: 11.5px; font-weight: 700; }
.ev-ours { color: var(--ok); font-size: 12px; }
.ev.ok { --c: var(--ok); }
.ev.todo, .ev.warn { --c: var(--warn); }
.ev.today { --c: var(--accent); background: var(--accent); color: var(--accent-ink); }
.ev.today .ev-n { color: var(--accent-ink); }
.ev.today:hover { background: color-mix(in srgb, var(--accent) 85%, #fff); }
.ev.past { --c: var(--ink3); background: color-mix(in srgb, var(--ink3) 10%, var(--panel)); font-weight: 500; color: var(--ink2); }
.ev.cx { --c: var(--bad); background: transparent; color: var(--ink3); text-decoration: line-through; font-weight: 500; }
.ev.mine { box-shadow: inset 0 0 0 1.5px var(--r-s); }
.cal-leg { margin-top: 14px; flex-wrap: wrap; row-gap: 6px; }
.cal-leg .lg { display: inline-block; width: 14px; height: 10px; border-radius: 3px; vertical-align: -1px; margin-right: 2px; }
.lg.today { background: var(--accent); }
.lg.ok { background: color-mix(in srgb, var(--ok) 40%, var(--panel)); box-shadow: inset 3px 0 0 var(--ok); }
.lg.todo { background: color-mix(in srgb, var(--warn) 40%, var(--panel)); box-shadow: inset 3px 0 0 var(--warn); }
.lg.past { background: color-mix(in srgb, var(--ink3) 25%, var(--panel)); box-shadow: inset 3px 0 0 var(--ink3); }
.lg.mine { background: transparent; box-shadow: inset 0 0 0 1.5px var(--r-s); }
/* agenda (celular) */
.cal-ag { display: flex; flex-direction: column; gap: 8px; }
.ag-day { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 10px; padding: 10px; border-radius: 10px; background: var(--raise); border: 1px solid var(--line); }
.ag-day.today { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--raise)); }
.ag-day.past { opacity: 0.8; }
.ag-d { flex-direction: column; align-items: flex-start; gap: 2px; }
.ag-d b { font-size: 22px; line-height: 1; font-variant-numeric: tabular-nums; }
.ag-d span:not(.dtag) { font-size: 12px; color: var(--ink2); text-transform: uppercase; }
.ag-l { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; }
.ag-s { grid-column: 2; font-size: 12px; color: var(--ink2); }
:root {
  --ev-td: #6d9dff;
  --ev-fc: #f0a35c;
}
:root[data-theme="light"] {
  --ev-td: #2c5fd6;
  --ev-fc: #b4610f;
}

/* ---------- gaveta ---------- */
.drawer-bg {
  position: fixed;
  inset: 0;
  background: var(--scrim);
  z-index: 50;
  animation: fade 0.18s ease-out;
}
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(680px, 100%);
  background: var(--panel);
  z-index: 51;
  overflow-y: auto;
  border-left: 1px solid var(--line2);
  box-shadow: -18px 0 48px rgba(0, 0, 0, 0.35);
  padding: calc(env(safe-area-inset-top, 0px) + 14px)
    max(18px, env(safe-area-inset-right, 0px))
    calc(env(safe-area-inset-bottom, 0px) + 28px) 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  animation: slide 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.drawer-bar {
  display: flex;
  gap: 6px;
  align-items: center;
  position: sticky;
  top: calc(-14px - env(safe-area-inset-top, 0px));
  background: var(--panel);
  padding: 4px 0 8px;
  margin-top: -4px;
  z-index: 2;
}
.drawer-bar .pos-t {
  font-size: 12.5px;
  color: var(--ink3);
  margin-right: auto;
}
.hero-img {
  width: 100%;
  aspect-ratio: 16 / 8;
  max-width: 100%;
  border-radius: var(--r);
  overflow: hidden;
  background: var(--raise);
  cursor: zoom-in;
  border: 0;
  padding: 0;
  display: block;
}
.hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.sec {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sec > h3 {
  font-size: 13px;
  color: var(--ink3);
  font-weight: 500;
}
.fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12.5px;
  color: var(--ink3);
  min-width: 0;
}
.rbtns {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.rbtns button {
  border: 1px solid var(--line2);
  background: var(--panel);
  border-radius: 6px;
  min-width: 42px;
  height: 38px;
  font-weight: 700;
  font-size: 16px;
  font-stretch: 85%;
  cursor: pointer;
  color: var(--ink2);
  transition:
    background 0.12s,
    color 0.12s,
    border-color 0.12s,
    transform 0.08s;
}
.rbtns button:active {
  transform: scale(0.96);
}
.rbtns button[aria-pressed="true"].S {
  background: var(--r-s-soft);
  color: var(--r-s);
  border-color: var(--r-s);
}
.rbtns button[aria-pressed="true"].A {
  background: var(--r-a-soft);
  color: var(--r-a);
  border-color: var(--r-a);
}
.rbtns button[aria-pressed="true"].B {
  background: var(--r-b-soft);
  color: var(--r-b);
  border-color: var(--r-b);
}
.rbtns button[aria-pressed="true"].C {
  background: var(--r-c-soft);
  color: var(--r-c);
  border-color: var(--r-c);
}
.rbtns button[aria-pressed="true"].D {
  background: var(--r-d-soft);
  color: var(--r-d);
  border-color: var(--r-d);
}
.yn {
  display: flex;
  gap: 4px;
}
.yn button {
  flex: 1;
  border: 1px solid var(--line2);
  background: var(--panel);
  border-radius: 5px;
  padding: 4px 6px;
  font-size: 12.5px;
  cursor: pointer;
  color: var(--ink2);
}
.yn button[aria-pressed="true"][data-v="yes"] {
  background: var(--ok-soft);
  color: var(--ok);
  border-color: var(--ok);
}
.yn button[aria-pressed="true"][data-v="no"] {
  background: var(--bad-soft);
  color: var(--bad);
  border-color: var(--bad);
}
.yn button[aria-pressed="true"][data-v="?"] {
  background: var(--raise);
  color: var(--ink);
  border-color: var(--ink3);
}
.eqbox {
  background: var(--raise);
  border-radius: var(--r);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.eqbox .row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  flex-wrap: wrap;
}
.eqbox .big {
  font-size: 22px;
  font-weight: 650;
  font-stretch: 84%;
}
.imgs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}
.imgs figure {
  margin: 0;
  border-radius: 6px;
  overflow: hidden;
  background: var(--raise);
}
.imgs button {
  border: 0;
  padding: 0;
  display: block;
  width: 100%;
  cursor: zoom-in;
  background: none;
}
.imgs img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  max-width: 100%;
  object-fit: cover;
}
.imgs figcaption {
  font-size: 11.5px;
  padding: 4px 7px;
  color: var(--ink3);
}
.hist {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-radius: var(--rc);
  overflow: hidden;
  border: 1px solid var(--line);
}
.hist div {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 10px;
  padding: 7px 10px;
  font-size: 13px;
  border-bottom: 1px solid var(--line);
  align-items: center;
}
.hist div:last-child {
  border-bottom: 0;
}

/* ---------- triagem ---------- */
.tri {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.tri-l {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  position: sticky;
  top: 76px;
}
.tri-r {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.tri-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  max-width: 100%;
  background: var(--raise);
  border-radius: var(--r);
  overflow: hidden;
  border: 0;
  padding: 0;
  cursor: zoom-in;
  display: block;
}
.tri-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.tri-img .none {
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--ink3);
  font-size: 13px;
  padding: 20px;
  text-align: center;
}
.tri-nav {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.dots {
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
}
.dots button {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: var(--r-none);
}
.dots button.S {
  background: var(--r-s);
}
.dots button.A {
  background: var(--r-a);
}
.dots button.B {
  background: var(--r-b);
}
.dots button.C {
  background: var(--r-c);
}
.dots button.D {
  background: var(--r-d);
}
.dots button.R {
  background: var(--r-r);
}
.dots button.M {
  background: var(--warn);
}
.dots button.X {
  background: var(--bad);
}
.dots button.O {
  background: var(--ink3);
}
.dots button.SP {
  background: var(--sp);
}
.dots button.cur {
  box-shadow:
    0 0 0 2px var(--panel),
    0 0 0 3.5px var(--ink);
}
.dots button.off {
  opacity: 0.35;
}
.keys {
  font-size: 12.5px;
  color: var(--ink3);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------- mapa esquemático ---------- */
.map {
  width: 100%;
  height: auto;
  display: block;
  background: var(--raise);
  border-radius: var(--r);
}
.map .pin {
  cursor: pointer;
  stroke: var(--panel);
  stroke-width: 1.5;
  transition: r 0.12s;
}
.map .pin:hover {
  stroke: var(--ink);
}
.map text {
  fill: var(--ink3);
  font-size: 11px;
  font-family: var(--f-ui);
}

/* ---------- gráficos ---------- */
.chart {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}
.chart .gl {
  stroke: var(--line);
  stroke-width: 1;
}
.chart .ax {
  fill: var(--ink3);
  font-size: 11px;
  font-family: var(--f-ui);
}
.chart .bar {
  fill: var(--accent);
}

.chart .lbl {
  fill: var(--ink);
  font-size: 11.5px;
  font-weight: 600;
  font-family: var(--f-ui);
}
.bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.barrow {
  display: grid;
  grid-template-columns: minmax(90px, 140px) minmax(0, 1fr) 92px;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}
.barrow .trk {
  height: 10px;
  background: var(--raise);
  border-radius: 3px;
  overflow: hidden;
}
.barrow .fil {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
}

/* ---------- busca / lightbox / toast ---------- */
.ov {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: var(--scrim);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: calc(env(safe-area-inset-top, 0px) + 72px)
    max(16px, env(safe-area-inset-right, 0px)) 16px
    max(16px, env(safe-area-inset-left, 0px));
  animation: fade 0.15s ease-out;
}
.pal {
  width: min(640px, 100%);
  background: var(--panel);
  border: 1px solid var(--line2);
  border-radius: 10px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 70vh;
  animation: pop 0.16s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.pal-in {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--ink3);
}
.pal-in input {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 4px 0;
  font-size: 16px;
}
.pal-in input:focus {
  border: 0;
}
.pal-res {
  overflow-y: auto;
}
.pal-res .item[aria-selected="true"] {
  background: var(--hover);
}
.pal-res .grp {
  font-size: 12px;
  color: var(--ink3);
  padding: 10px 14px 4px;
}
.lb {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(0, 0, 0, 0.88);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: calc(env(safe-area-inset-top, 0px) + 16px)
    max(16px, env(safe-area-inset-right, 0px))
    calc(env(safe-area-inset-bottom, 0px) + 16px)
    max(16px, env(safe-area-inset-left, 0px));
  animation: fade 0.15s ease-out;
}
.lb img {
  max-width: 100%;
  max-height: calc(100% - 60px);
  object-fit: contain;
  border-radius: 6px;
}
.lb .lb-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  color: #dfe5e2;
  font-size: 13px;
}
.lb .btn {
  background: #1d2522;
  color: #e6ebe8;
  border-color: #34403b;
}
.toast {
  position: fixed;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 22px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--bg);
  padding: 9px 16px;
  border-radius: 6px;
  z-index: 80;
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  animation: up 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  max-width: calc(100% - 32px);
}
.switch {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
}
.switch input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}
input[type="checkbox"] {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
}

@keyframes fade {
  from {
    opacity: 0;
  }
}
@keyframes slide {
  from {
    transform: translateX(28px);
    opacity: 0;
  }
}
@keyframes pop {
  from {
    transform: translateY(-6px) scale(0.985);
    opacity: 0;
  }
}
@keyframes up {
  from {
    transform: translate(-50%, 8px);
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- telas menores ---------- */
@media (max-width: 1180px) {
  .c4,
  .c5,
  .c6,
  .c7,
  .c8 {
    grid-column: 1 / -1;
  }
  .wk {
    grid-template-columns: 64px minmax(0, 1fr) minmax(0, 1fr);
  }
  .wk .col.dep {
    grid-column: 2 / 3;
  }
  .wk .act {
    grid-column: 3 / 4;
    justify-content: flex-start;
  }
  .tri {
    grid-template-columns: minmax(0, 1fr);
  }
  .tri-l {
    position: static;
  }
}
@media (max-width: 900px) {
  .app {
    grid-template-columns: minmax(0, 1fr);
  }
  .side {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    height: auto;
    width: min(290px, 86vw);
    transform: translateX(-104%);
    transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
    padding-top: calc(env(safe-area-inset-top, 0px) + 16px);
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 14px);
    background: var(--panel);
  }
  .side.open {
    transform: none;
    box-shadow: 18px 0 48px rgba(0, 0, 0, 0.4);
  }
  .btn.menu-btn {
    display: inline-flex;
  }
  .top {
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
    gap: 8px;
  }
  .search-btn kbd {
    display: none;
  }
  main {
    padding: 16px max(16px, env(safe-area-inset-right, 0px))
      calc(env(safe-area-inset-bottom, 0px) + 92px)
      max(16px, env(safe-area-inset-left, 0px));
  }
  .tabbar {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 22;
    background: var(--panel);
    border-top: 1px solid var(--line);
    padding: 6px max(8px, env(safe-area-inset-right, 0px))
      calc(env(safe-area-inset-bottom, 0px) + 6px)
      max(8px, env(safe-area-inset-left, 0px));
  }
  .tabbar a,
  .tabbar button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    font-size: 11.5px;
    color: var(--ink3);
    padding: 4px 2px;
    border: 0;
    background: none;
    cursor: pointer;
  }
  .tabbar a:hover {
    text-decoration: none;
  }
  .tabbar svg {
    width: 20px;
    height: 20px;
  }
  .tabbar a[aria-current="page"] {
    color: var(--accent);
    font-weight: 600;
  }
}
@media (max-width: 640px) {
  h1 {
    font-size: 22px;
  }
  .top-f label {
    display: none;
  }
  .top-f select {
    max-width: 86px;
  }
  .search-btn span {
    font-size: 13px;
  }
  .figs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .fig:nth-child(odd) {
    border-left: 0;
  }
  .fig:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
  .fig .n {
    font-size: 26px;
  }
  .wk {
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 10px 12px;
  }
  .wk .col,
  .wk .col.dep,
  .wk .act {
    grid-column: 1 / -1;
  }
  .kv {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .kv dd {
    margin-bottom: 6px;
  }
  .barrow {
    grid-template-columns: 84px minmax(0, 1fr) 74px;
  }
  .cards {
    grid-template-columns: minmax(0, 1fr);
    padding: 10px;
  }
  .hide-sm {
    display: none !important;
  }
  .hist div {
    grid-template-columns: 88px 1fr;
  }
  .hist div > :last-child {
    grid-column: 1 / -1;
  }
}

td .links { flex-wrap: nowrap; }
td .lk { padding: 0 6px; }
.side-foot .btn { justify-content: flex-start; }

.ok-t { color: var(--ok); }
.bad-t { color: var(--bad); }
.rlist { max-height: 640px; overflow-y: auto; }
.rlist .item.sel { background: var(--raise); box-shadow: inset 3px 0 0 var(--accent); }
.wk .col.dep .chip { align-self: flex-start; }

.rlist .grp { font-size: 12px; color: var(--ink3); padding: 10px 14px 4px; background: var(--panel); position: sticky; top: 0; z-index: 1; }

.rsum { background: var(--raise); border-radius: var(--r); padding: 14px; }
.rsum dd { color: var(--ink); }
.redit > summary { list-style: none; cursor: pointer; align-self: flex-start; }
.redit > summary::-webkit-details-marker { display: none; }
.redit[open] > summary { margin-bottom: 14px; }
.redit-b { display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 1181px) { .rdetail { position: sticky; top: 76px; max-height: calc(100vh - 92px); overflow-y: auto; } }

/* ---------- Nossos imóveis ---------- */
#navNossos[hidden] { display: none; }
.steps { display: flex; gap: 3px; margin-bottom: 3px; }
.steps i { flex: 1; height: 6px; border-radius: 2px; background: var(--raise); }
.steps i.on { background: var(--ok); }
.stage-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.stage { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--rc); font-size: 13px; color: var(--ink2); }
.stage.on { border-color: var(--ok); color: var(--ink); }
.stage.cur { box-shadow: inset 3px 0 0 var(--ok); }
table.mini { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 8px; }
table.mini td, table.mini th { padding: 6px 6px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
table.mini th { color: var(--ink3); font-weight: 500; font-size: 12px; }
table.mini .num { text-align: right; }
table.mini input { width: 100%; min-width: 0; }
.cal-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cal-row .spacer { margin-left: auto; }
ul.notes, ul.plist { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
ul.notes li { padding: 8px 10px; background: var(--raise); border-radius: var(--rc); font-size: 13.5px; white-space: pre-wrap; }
ul.plist li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.fig .n.warn { color: var(--warn); }
@media (max-width: 640px) { .stage-list { grid-template-columns: 1fr 1fr; } }
/* ---------- Sazonalidade ---------- */

.saz-leg {
  padding: 10px 14px 4px;
  margin: 0;
}

.saz-hoje {
  padding: 4px 14px 12px;
}
.saz-now {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 6px 0;
}
.saz-now .lab {
  min-width: 90px;
  font-weight: 600;
}
.saz-now .chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
a.chip.saz-chip {
  text-decoration: none;
}
@media (max-width: 720px) {
  .saz-now {
    flex-direction: column;
    gap: 4px;
  }
}

/* Sazonalidade: mini-gráficos */

/* Sazonalidade: tabela com faixas de cor (rampa azul sequencial, validada) */
:root {
  --sz0: var(--raise);
  --sz1: #184f95;
  --sz2: #256abf;
  --sz3: #3987e5;
  --sz4: #6da7ec;
  --sz5: #b7d3f6;
  --sz1-ink: #eef4fd;
  --sz2-ink: #ffffff;
  --sz3-ink: #07101f;
  --sz4-ink: #07101f;
  --sz5-ink: #07101f;
}
:root[data-theme="light"] {
  --sz1: #86b6ef;
  --sz2: #5598e7;
  --sz3: #2a78d6;
  --sz4: #1c5cab;
  --sz5: #0d366b;
  --sz1-ink: #0b1a2e;
  --sz2-ink: #0b1a2e;
  --sz3-ink: #ffffff;
  --sz4-ink: #ffffff;
  --sz5-ink: #ffffff;
}
table.sz-t {
  border-collapse: separate;
  border-spacing: 3px;
  width: 100%;
}
table.sz-t th,
table.sz-t td {
  text-align: center;
  font-variant-numeric: tabular-nums;
}
table.sz-t thead th {
  font-size: 12px;
  color: var(--ink3);
  font-weight: 600;
  padding: 6px 2px;
  text-transform: capitalize;
}
table.sz-t thead th.cur {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
table.sz-t th.cty {
  text-align: left;
  white-space: nowrap;
  font-weight: 600;
  padding: 4px 10px 4px 4px;
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--panel);
}
table.sz-t th.cty .small {
  font-weight: 400;
  font-size: 11px;
}
td.sz {
  position: relative;
  min-width: 52px;
  height: 44px;
  padding: 4px 3px;
  border-radius: 5px;
  background: var(--sz0);
  line-height: 1.15;
}
td.sz b {
  display: block;
  font-size: 15px;
  font-weight: 700;
}
td.sz small,
td.sz-tot small {
  display: block;
  font-size: 11px;
  opacity: 0.8;
}
td.sz .z {
  color: var(--ink3);
  opacity: 0.6;
}
td.sz.q1 { background: var(--sz1); color: var(--sz1-ink); }
td.sz.q2 { background: var(--sz2); color: var(--sz2-ink); }
td.sz.q3 { background: var(--sz3); color: var(--sz3-ink); }
td.sz.q4 { background: var(--sz4); color: var(--sz4-ink); }
td.sz.q5 { background: var(--sz5); color: var(--sz5-ink); }
td.sz.cur {
  box-shadow:
    0 0 0 2px var(--panel),
    0 0 0 4px var(--ink2);
}
td.sz.strong::after {
  content: "";
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--hl);
  box-shadow: 0 0 0 2px var(--panel);
}
td.sz-tot {
  padding: 4px 10px;
  white-space: nowrap;
}
td.sz-tot b {
  display: block;
  font-size: 15px;
}
td.sz-pk {
  color: var(--ink2);
  padding: 4px 8px;
}
tr.sz-reg th {
  text-align: left;
  padding: 16px 4px 4px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  position: static;
  background: none;
}
tr.sz-reg th .small {
  font-weight: 400;
}
tr.sz-fl th.cty,
tr.sz-fl td {
  border-bottom: 1px solid var(--line2);
}
table.sz-t tr.click:hover th.cty a {
  text-decoration: underline;
}
table.sz-t tr.tot th,
table.sz-t tr.tot td {
  border-bottom: 1px solid var(--line2);
}
.sz-leg {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  align-items: center;
  padding: 10px 16px 6px;
  font-size: 13px;
  color: var(--ink2);
}
.sz-k {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.sz-cell-ex {
  display: inline-block;
  background: var(--sz3);
  color: var(--sz3-ink);
  border-radius: 4px;
  padding: 2px 8px;
  text-align: center;
  line-height: 1.1;
}
.sz-cell-ex b {
  display: block;
  font-size: 13px;
}
.sz-cell-ex small {
  font-size: 10px;
}
.sz-scale {
  display: inline-flex;
  gap: 2px;
}
.sz-leg .sw {
  display: inline-block;
  width: 18px;
  height: 14px;
  border-radius: 3px;
}
.sz-leg .sw.q0 { background: var(--sz0); box-shadow: inset 0 0 0 1px var(--line2); }
.sz-leg .sw.q1 { background: var(--sz1); }
.sz-leg .sw.q2 { background: var(--sz2); }
.sz-leg .sw.q3 { background: var(--sz3); }
.sz-leg .sw.q4 { background: var(--sz4); }
.sz-leg .sw.q5 { background: var(--sz5); }
.sz-leg .sw.strong {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--hl);
}
.sz-leg .sw.cur {
  width: 16px;
  height: 14px;
  background: var(--raise);
  box-shadow: 0 0 0 2px var(--ink2);
}

.seg-w {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ---------- Mapa (aba de teste) ---------- */
:root {
  --d-nw: #f0882e;
  --d-ne: #b79ad8;
  --d-cw: #f2a585;
  --d-ce: #8fcaf0;
  --d-sw: #e2564b;
  --d-se: #5fbf62;
  --mp-none: #3a4440;
  --mp-line: rgba(230, 235, 232, 0.55);
  --mp-ring: #0c100f;
  --mp-up: #4d9cf5;
  --mp-sold: #f2b84b;
  --mp-off: #9aa59f;
  --mp-ours: #2fd08f;
}
:root[data-theme="light"] {
  --d-nw: #ef7d1a;
  --d-ne: #a585cf;
  --d-cw: #ee9a78;
  --d-ce: #79bde9;
  --d-sw: #d8463b;
  --d-se: #4caf50;
  --mp-none: #cfd6d2;
  --mp-line: rgba(20, 26, 23, 0.55);
  --mp-ring: #ffffff;
  --mp-up: #1f6fd1;
  --mp-sold: #d48806;
  --mp-off: #7d8883;
  --mp-ours: #11865a;
}
/* Leaflet: regras essenciais (a folha de estilo da biblioteca não pode ser carregada de fora) */
.leaflet-pane,.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile-container,.leaflet-pane > svg,.leaflet-pane > canvas,.leaflet-zoom-box,.leaflet-image-layer,.leaflet-layer{position:absolute;left:0;top:0}
.leaflet-container{overflow:hidden;font-family:var(--f-ui);-webkit-tap-highlight-color:transparent;outline-offset:1px}
.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow{user-select:none;-webkit-user-drag:none}
.leaflet-tile{filter:inherit;visibility:hidden}
.leaflet-tile-loaded{visibility:inherit}
.leaflet-container img.leaflet-tile{max-width:none!important;max-height:none!important;width:256px;height:256px}
.leaflet-pane{z-index:400}
.leaflet-tile-pane{z-index:200}
.leaflet-overlay-pane{z-index:400}
.leaflet-shadow-pane{z-index:500}
.leaflet-marker-pane{z-index:600}
.leaflet-tooltip-pane{z-index:650}
.leaflet-popup-pane{z-index:700}
.leaflet-map-pane canvas{z-index:100}
.leaflet-map-pane svg{z-index:200}
.leaflet-zoom-animated{transform-origin:0 0}
.leaflet-zoom-anim .leaflet-zoom-animated{transition:transform .25s cubic-bezier(0,0,.25,1)}
.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}
.leaflet-interactive{cursor:pointer}
.leaflet-grab{cursor:grab}
.leaflet-dragging .leaflet-grab{cursor:grabbing}
.leaflet-control{position:relative;z-index:800;pointer-events:auto;float:left;clear:both}
.leaflet-top,.leaflet-bottom{position:absolute;z-index:1000;pointer-events:none}
.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}
.leaflet-right .leaflet-control{float:right;margin-right:10px}
.leaflet-left .leaflet-control{margin-left:10px}
.leaflet-top .leaflet-control{margin-top:10px}
.leaflet-bottom .leaflet-control{margin-bottom:10px}
.leaflet-bar{border-radius:6px;box-shadow:0 1px 4px rgba(0,0,0,.35);overflow:hidden}
.leaflet-bar a{display:block;width:32px;height:32px;line-height:32px;text-align:center;text-decoration:none;font-size:18px;font-weight:700;background:var(--panel);color:var(--ink);border-bottom:1px solid var(--line)}
.leaflet-bar a:last-child{border-bottom:0}
.leaflet-bar a:hover{background:var(--hover)}
.leaflet-bar a.leaflet-disabled{color:var(--ink3);cursor:default}
.leaflet-control-attribution{background:color-mix(in srgb,var(--panel) 80%,transparent);color:var(--ink3);font-size:10px;padding:1px 6px;margin:0!important}
.leaflet-control-attribution a{color:var(--ink2)}
.leaflet-popup{position:absolute;text-align:left;margin-bottom:20px}
.leaflet-popup-content-wrapper{background:var(--panel);color:var(--ink);border:1px solid var(--line2);border-radius:8px;box-shadow:0 6px 24px rgba(0,0,0,.4);padding:1px}
.leaflet-popup-content{margin:12px 14px;line-height:1.4;min-width:220px}
.leaflet-popup-tip-container{width:40px;height:20px;position:absolute;left:50%;margin-top:-1px;margin-left:-20px;overflow:hidden;pointer-events:none}
.leaflet-popup-tip{width:17px;height:17px;padding:1px;margin:-10px auto 0;transform:rotate(45deg);background:var(--panel);border:1px solid var(--line2)}
.leaflet-container a.leaflet-popup-close-button{position:absolute;top:0;right:0;width:26px;height:26px;font:18px/24px var(--f-ui);color:var(--ink3);text-decoration:none;text-align:center}
.leaflet-tooltip{position:absolute;padding:6px 8px;background:var(--panel);color:var(--ink);border:1px solid var(--line2);border-radius:6px;white-space:nowrap;pointer-events:none;box-shadow:0 2px 8px rgba(0,0,0,.35);font-size:12px;line-height:1.35}
.leaflet-tooltip-top:before,.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{display:none}

.map-panel .hd.filters label {
  margin-right: -4px;
}
.map-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  min-height: 640px;
  border-top: 1px solid var(--line);
}
.mapa {
  position: relative;
  min-height: 640px;
  height: calc(100vh - 260px);
  background: var(--bg);
}
.map-msg {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--ink3);
}
.map-note {
  position: absolute;
  top: 10px;
  left: 54px;
  right: 10px;
  z-index: 1000;
  background: var(--warn-soft);
  color: var(--warn);
  border: 1px solid var(--line2);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
}
.map-side {
  border-left: 1px solid var(--line);
  padding: 14px 16px;
  overflow: auto;
  max-height: calc(100vh - 260px);
  min-height: 640px;
}
.map-side h3 {
  margin: 0;
  font-size: 18px;
}
.map-side h4 {
  margin: 16px 0 6px;
  font-size: 13px;
  color: var(--ink2);
  display: flex;
  gap: 8px;
  align-items: baseline;
}
.ms-h {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.ms-figs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}
.ms-figs > div {
  background: var(--raise);
  border-radius: 6px;
  padding: 8px;
}
.ms-figs .n {
  display: block;
  font-size: 18px;
  font-weight: 700;
}
.ms-figs .l {
  font-size: 11px;
  color: var(--ink3);
}
.ms-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ms-auc {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 6px;
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
}
a.ms-auc:hover {
  background: var(--hover);
}
.ms-auc span {
  color: var(--ink2);
  white-space: nowrap;
}
.ms-saz {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 2px;
}
.ms-saz .sz {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: 4px;
  padding: 3px 0;
  font-size: 11px;
  font-weight: 700;
  background: var(--sz0);
}
.ms-saz .sz i {
  font-style: normal;
  font-weight: 400;
  font-size: 9px;
  opacity: 0.75;
}
.ms-saz .sz.q1 { background: var(--sz1); color: var(--sz1-ink); }
.ms-saz .sz.q2 { background: var(--sz2); color: var(--sz2-ink); }
.ms-saz .sz.q3 { background: var(--sz3); color: var(--sz3-ink); }
.ms-saz .sz.q4 { background: var(--sz4); color: var(--sz4-ink); }
.ms-saz .sz.q5 { background: var(--sz5); color: var(--sz5-ink); }
.ms-saz .sz.cur { box-shadow: 0 0 0 1px var(--panel), 0 0 0 2px var(--ink2); }
.ms-saz .sz.strong::after {
  content: "";
  position: absolute;
  top: 2px;
  right: 2px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--hl);
}
.ms-leg,
.map-leg {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--ink2);
}
.map-leg {
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  border: 1px solid var(--line2);
  border-radius: 8px;
  padding: 8px 10px;
  max-width: 560px;
  gap: 6px;
}
.ml-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  align-items: center;
}
.map-leg span,
.ms-leg span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
i.sq {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
}
i.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-shadow: 0 0 0 1.5px var(--mp-ring);
}
i.dot.up { background: var(--mp-up); }
i.dot.sold { background: var(--mp-sold); }
i.dot.off { background: var(--mp-off); }
i.dot.ours { background: var(--mp-ours); }
i.dot.hl { box-shadow: 0 0 0 2.5px var(--hl); }
.mp-pop {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mp-pop .btn {
  margin-top: 6px;
  align-self: flex-start;
}
@media (max-width: 900px) {
  .map-wrap {
    grid-template-columns: 1fr;
  }
  .mapa {
    min-height: 460px;
    height: 62vh;
  }
  .map-side {
    border-left: 0;
    border-top: 1px solid var(--line);
    max-height: none;
    min-height: 0;
  }
  .map-leg {
    max-width: 260px;
  }
}
.leaflet-tooltip.cty-lbl {
  background: none;
  border: 0;
  box-shadow: none;
  padding: 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  text-shadow:
    0 0 3px var(--bg),
    0 0 3px var(--bg),
    0 0 2px var(--bg),
    0 0 1px var(--bg);
  display: none;
}
/* no satélite: nome branco com contorno escuro, sempre legível */
.mapa.lbl-sat .leaflet-tooltip.cty-lbl {
  color: #fff;
  text-shadow:
    0 0 3px #000,
    0 0 3px #000,
    0 0 2px #000,
    0 1px 2px #000;
}
.mapa.show-lbl .leaflet-tooltip.cty-lbl {
  display: block;
}
/* o mapa não pode passar na frente da ficha, do topo nem da barra do celular */
.map-wrap {
  position: relative;
  z-index: 0;
  isolation: isolate;
}
.mp-act {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.mp-pop .mp-act .btn {
  margin-top: 0;
}
.ms-leg .ml-row {
  flex-direction: column;
  align-items: flex-start;
}
@media (max-width: 900px) {
  .map-leg {
    display: none;
  }
  .map-panel .hd.filters {
    gap: 8px;
  }
  .map-panel .hd.filters label {
    width: 100%;
  }
  .map-panel .hd.filters select,
  .map-panel .hd.filters .seg {
    flex: 1 1 auto;
  }
  .map-panel .hd.filters .spacer {
    width: 100%;
    text-align: left;
  }
  .mapa {
    height: 58vh;
    min-height: 380px;
  }
  .leaflet-popup-content {
    min-width: 0;
    margin: 10px 12px;
  }
  .ms-figs .n {
    font-size: 16px;
  }
}
table.sz-t tr.partial th {
  color: var(--ink2);
}
.cal-ag[hidden] { display: none; }

/* ---- acessibilidade ---- */
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip {
  position: fixed;
  left: 12px;
  top: -60px;
  z-index: 1000;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: none;
}
.skip:focus {
  top: 12px;
}
.sub a,
.note a:not(.btn),
.muted a,
p a {
  text-decoration: underline;
  text-underline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* links dentro de texto/tabelas precisam se distinguir sem depender só da cor */
td a:not(.btn):not(.lk),
.row a:not(.btn) {
  text-decoration: underline;
  text-underline-offset: 2px;
}
/* arremates perto (ficha) */
.hist.near button {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: baseline;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 7px 2px;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.hist.near button:last-child { border-bottom: 0; }
.hist.near button:hover { background: var(--raise); }
.hist.near button > span:first-child { color: var(--ink2); font-variant-numeric: tabular-nums; }
.hist.near strong { font-variant-numeric: tabular-nums; }

/* conta oficial de property tax na ficha da carteira */
.tax-off { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.tax-off .mini tr.taxcur td { background: var(--warn-soft, rgba(234, 179, 8, 0.14)); font-weight: 600; }

/* cobertura da coleta */
table.cob th.grp { text-align: center; border-bottom: 1px solid var(--line, rgba(127,127,127,.25)); }
table.cob td[colspan] { text-align: center; }
#cobertura .seg { flex-wrap: wrap; }
