/* =========================================================
   Residencial Vila Inglesa · Gestão de Encomendas
   ========================================================= */
:root {
  --green: #1e3a30;
  --green-2: #2b4f42;
  --green-soft: #e6eee9;
  --brass: #b8914a;
  --brass-light: #e2c88f;
  --brass-soft: #f6eedd;
  --bg: #f5f2eb;
  --card: #ffffff;
  --ink: #1d2422;
  --ink-2: #4a5552;
  --muted: #7b8582;
  --line: #e4dfd4;
  --line-2: #efebe2;
  --ok: #2f7d55;
  --ok-soft: #e3f2e9;
  --warn: #a8661a;
  --warn-soft: #fbefdc;
  --red: #a63d2e;
  --red-soft: #f8e5e1;
  --blue: #2f5f8a;
  --blue-soft: #e4eef7;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(30, 40, 35, .05), 0 4px 16px rgba(30, 40, 35, .05);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.5 var(--sans); color: var(--ink); background: var(--bg); }
a { color: var(--green-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.25; }
h2 { font-family: var(--serif); font-size: 28px; letter-spacing: -.01em; }
h3 { font-size: 15px; }
p { margin: 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
code { font-family: var(--mono); font-size: .9em; background: var(--line-2); padding: 1px 5px; border-radius: 4px; }
small { font-size: 12.5px; }
.ic { width: 18px; height: 18px; flex: none; }
.ic.big { width: 40px; height: 40px; color: var(--muted); stroke-width: 1.4; }
.mono { font-family: var(--mono); font-size: .92em; letter-spacing: .01em; }
.strong { font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.block { display: block; }
.grow { flex: 1; min-width: 0; }
.pad { padding: 14px 20px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 10px; top: 10px; z-index: 100; background: #fff; padding: 8px 12px; border-radius: 8px; }
.print-only { display: none; }

/* ---------- Estrutura ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 256px; flex: none; background: var(--green); color: #dfe8e3;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; z-index: 40;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 22px 20px 20px; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand strong { display: block; font-family: var(--serif); font-size: 20px; color: #fff; letter-spacing: .01em; }
.brand span { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--brass-light); }
.brand .crest { --green: #14281f; }
.nav { padding: 14px 12px; display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
  color: #c9d6cf; font-weight: 500; font-size: 14.5px; text-decoration: none;
}
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav a.on { background: rgba(255,255,255,.1); color: #fff; box-shadow: inset 3px 0 0 var(--brass); }
.nav a span { flex: 1; }
.nav .count { font-style: normal; background: var(--brass); color: #1d1a12; font-size: 12px; font-weight: 700; min-width: 22px; text-align: center; padding: 1px 7px; border-radius: 20px; }
.nav a.nav-cta { margin: 4px 0 8px; background: var(--brass); color: #1d1a12; font-weight: 600; }
.nav a.nav-cta:hover { background: var(--brass-light); color: #1d1a12; }
.nav a.nav-cta.on { box-shadow: none; }
.me { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-top: 1px solid rgba(255,255,255,.08); }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--brass); color: #1d1a12; display: grid; place-items: center; font-weight: 700; flex: none; }
.me-txt { flex: 1; min-width: 0; }
.me-txt strong { display: block; color: #fff; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-txt span { display: block; font-size: 12px; color: #a9bbb2; }
.me .icon-btn { color: #c9d6cf; }
.me .icon-btn:hover { background: rgba(255,255,255,.1); color: #fff; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 12px; padding: 18px 32px; position: sticky; top: 0; z-index: 20;
  background: rgba(245, 242, 235, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.topbar h1 { font-family: var(--serif); font-size: 22px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-actions { display: flex; gap: 8px; }
.topbar .menu-btn { display: none; }
.content { padding: 26px 32px 40px; max-width: 1320px; width: 100%; }
.foot { padding: 0 32px 24px; color: var(--muted); font-size: 12.5px; }
.scrim { display: none; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--card);
  font: 600 14px/1.2 var(--sans); color: var(--ink); cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { text-decoration: none; border-color: #cfc8b9; background: #fbfaf6; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--green); border-color: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-2); border-color: var(--green-2); color: #fff; }
.btn-ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-ok:hover { background: #276b48; border-color: #276b48; color: #fff; }
.btn-warn { background: var(--warn); border-color: var(--warn); color: #fff; }
.btn-warn:hover { background: #8f5615; color: #fff; }
.btn-wa { background: #1f9d55; border-color: #1f9d55; color: #fff; }
.btn-wa:hover { background: #198247; color: #fff; }
.btn-ghost { background: transparent; }
.btn-danger-ghost { background: transparent; color: var(--red); border-color: #ecc8c1; }
.btn-danger-ghost:hover { background: var(--red-soft); border-color: #e1aea4; }
.btn-sm { padding: 6px 11px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 14px 18px; font-size: 15.5px; }
.btn-block { display: flex; width: 100%; }
.icon-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px;
  border: 0; background: transparent; color: var(--ink-2); cursor: pointer;
}
.icon-btn:hover { background: var(--line-2); color: var(--ink); text-decoration: none; }
.icon-btn.danger:hover { background: var(--red-soft); color: var(--red); }
.link { display: inline-flex; align-items: center; gap: 4px; font-size: 13.5px; font-weight: 600; }
.link .ic { width: 15px; height: 15px; }
.back { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink-2); margin-bottom: 16px; }
.back .ic { width: 16px; height: 16px; }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Cards e grids ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.pad-lg { padding: 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.cols { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.cols-form { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.cols-detail { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.cols-side { grid-template-columns: minmax(0, 1fr) 340px; }
.cols-half { grid-template-columns: 1fr 1fr; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.sticky { position: sticky; top: 90px; }
.sec-title { display: flex; align-items: center; gap: 10px; font-size: 16px; margin-bottom: 16px; }
.sec-title .ic { color: var(--brass); }
.step { width: 26px; height: 26px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--brass); font-weight: 600; margin-bottom: 4px; }
.empty { padding: 44px 20px; text-align: center; color: var(--ink-2); display: flex; flex-direction: column; align-items: center; gap: 10px; }

/* ---------- Painel ---------- */
.hello { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.search-big { flex: 0 1 460px; display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; box-shadow: var(--shadow); }
.search-big input { border: 0; outline: 0; padding: 13px 0; font: inherit; flex: 1; background: transparent; min-width: 0; }
.search-big:focus-within { border-color: var(--green-2); box-shadow: 0 0 0 3px var(--green-soft); }
.search-big .ic { color: var(--muted); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.stats-3 { grid-template-columns: repeat(3, 1fr); }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); color: var(--ink); display: flex; flex-direction: column; gap: 6px; }
a.stat:hover { text-decoration: none; border-color: #d3cbb9; }
.stat-label { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-2); font-weight: 500; }
.stat-label .ic { width: 16px; height: 16px; color: var(--brass); }
.stat strong { font-family: var(--serif); font-size: 34px; font-weight: 600; line-height: 1; }
.stat-foot { font-size: 12.5px; color: var(--muted); }
.stat-main { background: var(--green); border-color: var(--green); color: #fff; }
.stat-main .stat-label, .stat-main .stat-foot { color: #c9d9d0; }
.stat-main .stat-label .ic { color: var(--brass-light); }
.stat-warn { background: var(--warn-soft); border-color: #efd5ac; }
.stat-warn strong { color: var(--warn); }

.callout { display: flex; align-items: center; gap: 16px; padding: 18px 20px; background: var(--brass-soft); border: 1px solid #ead9b5; border-radius: var(--radius); margin-bottom: 22px; flex-wrap: wrap; }
.callout > .ic { width: 28px; height: 28px; color: var(--brass); }
.callout > div { flex: 1; min-width: 200px; }
.callout p { color: var(--ink-2); font-size: 14px; }

.pkg-list { display: flex; flex-direction: column; }
.pkg { display: flex; align-items: center; gap: 14px; padding: 12px 20px; border-bottom: 1px solid var(--line-2); color: var(--ink); }
.pkg:last-child { border-bottom: 0; }
.pkg:hover { background: #fbfaf6; text-decoration: none; }
.pkg-unit {
  min-width: 52px; height: 40px; padding: 0 8px; border-radius: 10px; background: var(--green-soft); color: var(--green);
  display: inline-grid; place-items: center; font-weight: 700; font-size: 14px; flex: none; letter-spacing: .01em;
}
.pkg-unit.sm { min-width: 44px; height: 34px; font-size: 13px; }
.pkg-unit.xs { min-width: 0; height: auto; padding: 2px 8px; border-radius: 6px; font-size: 12.5px; display: inline-block; }
.pkg-late .pkg-unit { background: var(--warn-soft); color: var(--warn); }
.pkg-main { flex: 1; min-width: 0; }
.pkg-main strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pkg-main span { display: block; font-size: 13px; color: var(--muted); }
.pkg-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: 13px; color: var(--ink-2); text-align: right; }
.late { color: var(--warn); font-weight: 600; }

.unit-rank, .feed { list-style: none; margin: 0; padding: 6px 0; }
.unit-rank a, .feed a { display: flex; align-items: center; gap: 12px; padding: 9px 20px; color: var(--ink); }
.unit-rank a:hover, .feed a:hover { background: #fbfaf6; text-decoration: none; }
.unit-rank small, .feed small { display: block; color: var(--muted); }
.feed a { align-items: flex-start; font-size: 14px; }
.dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 7px; flex: none; background: var(--muted); }
.dot.ok { background: var(--ok); }
.dot.back { background: var(--warn); }

.legend { display: flex; gap: 12px; font-size: 12px; color: var(--muted); }
.legend span::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.lg-r::before { background: var(--brass); }
.lg-e::before { background: var(--green-2); }
.bars { display: flex; gap: 8px; padding: 18px 20px 14px; height: 170px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.bar-col small { color: var(--muted); font-size: 11.5px; }
.bar-pair { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 3px; }
.bar { width: 42%; max-width: 16px; min-height: 2px; border-radius: 4px 4px 1px 1px; position: relative; }
.bar i { position: absolute; top: -17px; left: 50%; transform: translateX(-50%); font-style: normal; font-size: 10.5px; color: var(--ink-2); }
.bar-r { background: var(--brass); }
.bar-e { background: var(--green-2); }

/* ---------- Badges / tags ---------- */
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.st-wait { background: var(--brass-soft); color: #8a6420; }
.st-ok { background: var(--ok-soft); color: var(--ok); }
.st-back { background: var(--red-soft); color: var(--red); }
a.badge:hover { text-decoration: none; filter: brightness(.96); }
.pf-sindico { background: var(--green); color: #fff; }
.pf-porteiro { background: var(--blue-soft); color: var(--blue); }
.pf-morador { background: var(--line-2); color: var(--ink-2); }
.tag { display: inline-block; padding: 1px 7px; border-radius: 5px; font-size: 11.5px; font-weight: 600; background: var(--line-2); color: var(--ink-2); margin: 2px 2px 0 0; }
.tag-cold { background: var(--blue-soft); color: var(--blue); }
.tag-frag { background: var(--red-soft); color: var(--red); }

/* ---------- Formulários ---------- */
.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.req { color: var(--red); font-weight: 600; }
input, select, textarea {
  font: inherit; color: var(--ink); background: #fff; border: 1px solid #d9d3c6; border-radius: var(--radius-sm);
  padding: 10px 12px; width: 100%; outline: none; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--green-2); box-shadow: 0 0 0 3px var(--green-soft); }
textarea { resize: vertical; }
input[type=checkbox], input[type=radio] { width: auto; }
input.mono { font-family: var(--mono); }
select { cursor: pointer; }
.pw { display: flex; position: relative; }
.pw input { padding-right: 76px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: var(--line-2); border-radius: 6px; padding: 5px 9px; font: 600 12px var(--sans); color: var(--ink-2); cursor: pointer; }

.unit-picker { display: flex; flex-direction: column; border: 1px solid #d9d3c6; border-radius: var(--radius-sm); overflow: hidden; }
.unit-picker:focus-within { border-color: var(--green-2); box-shadow: 0 0 0 3px var(--green-soft); }
.unit-picker input { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none !important; }
.unit-picker select { border: 0; border-radius: 0; box-shadow: none !important; padding: 4px; min-height: 170px; }
.unit-picker option { padding: 7px 10px; border-radius: 6px; }
.unit-picker option:checked { background: var(--green) linear-gradient(var(--green), var(--green)); color: #fff; }
.unit-picker optgroup { font-style: normal; font-weight: 700; color: var(--muted); font-size: 12px; }

.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: inline-block; padding: 8px 14px; border: 1px solid #d9d3c6; border-radius: 30px; font-size: 14px; font-weight: 500; background: #fff; transition: all .12s; }
.seg label:hover span { border-color: var(--green-2); }
.seg input:checked + span { background: var(--green); border-color: var(--green); color: #fff; }
.seg input:focus-visible + span { box-shadow: 0 0 0 3px var(--green-soft); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips:empty { display: none; }
.chips-quick { margin-top: -6px; }
.chip { border: 1px dashed #cfc6b2; background: var(--brass-soft); color: #6d531f; border-radius: 20px; padding: 4px 11px; font: 500 12.5px var(--sans); cursor: pointer; }
.chip:hover { border-style: solid; background: #f1e3c4; }
.chip.chip-label { background: none; border: 0; padding: 4px 2px; color: var(--muted); cursor: default; }

.stepper { display: flex; }
.stepper input { text-align: center; border-radius: 0; border-left: 0; border-right: 0; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
.stepper button { width: 44px; border: 1px solid #d9d3c6; background: var(--line-2); font-size: 18px; cursor: pointer; color: var(--ink); }
.stepper button:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.stepper button:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

.toggles { display: flex; flex-direction: column; gap: 10px; }
.toggle { display: flex; align-items: center; gap: 12px; cursor: pointer; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.toggle input { position: absolute; opacity: 0; }
.toggle strong { display: block; font-size: 14px; }
.toggle small { display: block; color: var(--muted); }
.tg { width: 40px; height: 23px; border-radius: 20px; background: #d6d0c3; position: relative; flex: none; transition: background .15s; }
.tg::after { content: ""; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.toggle input:checked + .tg { background: var(--green); }
.toggle input:checked + .tg::after { transform: translateX(17px); }
.toggle input:focus-visible + .tg { box-shadow: 0 0 0 3px var(--green-soft); }

.form .card.pad-lg { display: flex; flex-direction: column; gap: 14px; }
.form .card.pad-lg > .sec-title { margin-bottom: 2px; }
.form .card.pad-lg > .form { gap: 14px; }
.submit-card { background: var(--green-soft); border-color: #cfdcd4; display: flex; flex-direction: column; gap: 10px; }

/* ---------- Filtros ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.filters select { width: auto; min-width: 160px; }
.search { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid #d9d3c6; border-radius: var(--radius-sm); padding: 0 12px; flex: 1 1 280px; }
.search:focus-within { border-color: var(--green-2); box-shadow: 0 0 0 3px var(--green-soft); }
.search input { border: 0; padding: 10px 0; box-shadow: none !important; }
.search .ic { color: var(--muted); }
.search.sm { flex: 0 1 220px; }
.search.sm input { padding: 7px 0; }
.check { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; cursor: pointer; white-space: nowrap; }
.check input { accent-color: var(--green); width: 16px; height: 16px; }
.date { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); }
.date input { width: auto; padding: 8px 10px; }
.result-info { font-size: 14px; color: var(--ink-2); margin-bottom: 14px; }

/* ---------- Tabelas ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; padding: 11px 16px; border-bottom: 1px solid var(--line); background: #fcfbf8; white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #fcfbf7; }
.row-link { cursor: pointer; }
.row-late td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
.row-off td { opacity: .55; }
.row-edit td { background: var(--brass-soft) !important; }
.td-act { text-align: right; white-space: nowrap; }
.td-act form.inline, form.inline { display: inline; }
.inline-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.inline-form .field { width: 120px; }
.inline-form .field.grow { flex: 1; min-width: 180px; }

.unit-groups { display: flex; flex-direction: column; gap: 16px; }
.ug-head { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.ug-head.flat { padding: 0 0 16px; margin-bottom: 14px; }
.ug-head strong { display: block; }
.ug-head small { display: block; color: var(--muted); }

/* ---------- Entrega ---------- */
.check-all { margin-bottom: 10px; }
.pick-list { display: flex; flex-direction: column; gap: 8px; }
.pick { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 11px; cursor: pointer; transition: all .12s; }
.pick:hover { border-color: #cdc5b4; }
.pick input { position: absolute; opacity: 0; }
.pick-box { width: 24px; height: 24px; border-radius: 7px; border: 2px solid #c9c1b0; display: grid; place-items: center; flex: none; color: transparent; }
.pick-box .ic { width: 16px; height: 16px; stroke-width: 3; }
.pick input:checked ~ .pick-box { background: var(--ok); border-color: var(--ok); color: #fff; }
.pick:has(input:checked) { border-color: var(--ok); background: var(--ok-soft); }
.pick input:focus-visible ~ .pick-box { box-shadow: 0 0 0 3px var(--green-soft); }
.pick strong { display: block; font-size: 14.5px; }
.pick small { display: block; color: var(--ink-2); }
.pick .where { display: inline-flex; align-items: center; gap: 4px; color: var(--brass); font-weight: 600; margin-top: 2px; }
.pick .where .ic { width: 14px; height: 14px; }

/* ---------- Detalhe ---------- */
.success-banner { display: flex; align-items: center; gap: 16px; padding: 18px 20px; background: var(--ok-soft); border: 1px solid #bfe0cc; border-radius: var(--radius); margin-bottom: 20px; flex-wrap: wrap; }
.sb-icon { width: 44px; height: 44px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; flex: none; }
.sb-icon .ic { width: 24px; height: 24px; stroke-width: 2.6; }
.success-banner p { font-size: 14px; color: var(--ink-2); }
.receipt-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px dashed var(--line); }
.code-lg { font-size: 26px; font-weight: 700; margin-bottom: 8px; color: var(--green); }
.unit-big { text-align: center; background: var(--green); color: #fff; border-radius: 12px; padding: 10px 18px; min-width: 96px; }
.unit-big small { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--brass-light); }
.unit-big strong { display: block; font-family: var(--serif); font-size: 32px; line-height: 1.1; }
.dl { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 24px; margin: 0; }
.dl-1 { grid-template-columns: 1fr 1fr; margin-bottom: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line-2); }
.dl .full { grid-column: 1 / -1; }
.dl dt { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; margin-bottom: 3px; }
.dl dd { margin: 0; font-size: 15px; word-break: break-word; }
.delivered { margin-top: 22px; padding: 18px; border-radius: 12px; background: var(--ok-soft); border: 1px solid #c7e3d2; }
.delivered h4 { display: flex; align-items: center; gap: 8px; color: var(--ok); margin-bottom: 14px; font-size: 15px; }
.back-box { background: var(--red-soft); border-color: #eccbc4; }
.back-box h4 { color: var(--red); margin-bottom: 6px; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--line); display: flex; flex-direction: column; gap: 16px; }
.timeline li { position: relative; display: flex; flex-direction: column; gap: 1px; font-size: 14px; }
.timeline li::before { content: ""; position: absolute; left: -25px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--brass); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.timeline .tl-entregue::before { background: var(--ok); }
.timeline .tl-devolvida::before { background: var(--red); }
.timeline .tl-editada::before, .timeline .tl-reaberta::before { background: var(--muted); }
.timeline span { color: var(--ink-2); }
.timeline small { color: var(--muted); }
.wa-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.actions-col { display: flex; flex-direction: column; gap: 8px; }
.danger-zone summary { list-style: none; }
.danger-zone summary::-webkit-details-marker { display: none; }
.danger-zone[open] summary { margin-bottom: 12px; }
.danger-zone form { padding: 14px; border-radius: 10px; background: var(--warn-soft); }
.sign { margin-top: 48px; border-top: 1px solid var(--ink); padding-top: 6px; font-size: 12px; text-align: center; width: 70%; }

/* ---------- Morador ---------- */
.resident-hero { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 26px 28px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); margin-bottom: 20px; box-shadow: var(--shadow); }
.resident-hero.has { background: var(--green); border-color: var(--green); color: #fff; }
.resident-hero.has .eyebrow { color: var(--brass-light); }
.hero-msg { margin-top: 6px; font-size: 16px; color: inherit; opacity: .92; max-width: 520px; }
.hero-count { text-align: center; flex: none; }
.hero-count strong { display: block; font-family: var(--serif); font-size: 56px; line-height: 1; }
.hero-count span { font-size: 12.5px; text-transform: uppercase; letter-spacing: .1em; opacity: .8; }
.resident-hero.has .hero-count strong { color: var(--brass-light); }
.res-cards { display: flex; flex-direction: column; }
.res-card { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-bottom: 1px solid var(--line-2); color: var(--ink); }
.res-card:hover { background: #fbfaf6; text-decoration: none; }
.res-card strong, .res-card span, .res-card small { display: block; }
.res-card span { color: var(--ink-2); font-size: 14px; }
.res-card small { color: var(--muted); }
.res-ic { width: 44px; height: 44px; border-radius: 12px; background: var(--brass-soft); color: var(--brass); display: grid; place-items: center; flex: none; }
.res-ic .ic { width: 22px; height: 22px; }
.content > section.card + section.card, .content > .stats + section.card { margin-top: 20px; }

/* ---------- Mensagens ---------- */
.flash { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 11px; margin-bottom: 16px; font-size: 14px; border: 1px solid; }
.flash > span { flex: 1; }
.flash-ok { background: var(--ok-soft); border-color: #bfe0cc; color: #1f5c3c; }
.flash-erro { background: var(--red-soft); border-color: #ecc8c1; color: #7d2a1e; }
.flash-warn { background: var(--warn-soft); border-color: #efd5ac; color: #7a4a10; }
.flash-info { background: var(--blue-soft); border-color: #c8dbec; color: #24486a; margin-top: 18px; margin-bottom: 0; }
.flash-x { border: 0; background: none; font-size: 20px; line-height: 1; cursor: pointer; color: inherit; opacity: .6; }

.pager { display: flex; gap: 4px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.pager a, .pager span { padding: 7px 12px; border-radius: 8px; font-size: 14px; }
.pager a { background: var(--card); border: 1px solid var(--line); color: var(--ink); }
.pager a:hover { text-decoration: none; border-color: #cfc8b9; }
.pager .cur { background: var(--green); color: #fff; font-weight: 600; }
.pager .off { color: #bbb; }
.pager .gap { color: var(--muted); }

/* ---------- Login / instalação ---------- */
.guest {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background:
    radial-gradient(circle at 15% 10%, rgba(184,145,74,.18), transparent 40%),
    radial-gradient(circle at 90% 90%, rgba(43,79,66,.25), transparent 45%),
    var(--green);
}
.guest-wrap { width: 100%; max-width: 420px; }
.guest-wrap:has(.wide) { max-width: 520px; }
.guest-card { background: var(--card); border-radius: 20px; padding: 32px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.guest-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.guest-brand h1 { font-family: var(--serif); font-size: 28px; color: var(--green); }
.guest-brand p { font-size: 12.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--brass); font-weight: 600; }
.guest-help { margin-top: 20px; font-size: 13px; color: var(--muted); text-align: center; }
.lead { color: var(--ink-2); margin-bottom: 18px; }
.checklist { color: var(--red); padding-left: 20px; }

/* ---------- Responsivo ---------- */
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .cols, .cols-form, .cols-detail, .cols-side { grid-template-columns: 1fr; }
  .sticky { position: static; }
}
@media (max-width: 860px) {
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; transform: translateX(-105%); transition: transform .2s ease; box-shadow: 0 0 40px rgba(0,0,0,.3); }
  body.menu-open .sidebar { transform: none; }
  body.menu-open .scrim { display: block; position: fixed; inset: 0; background: rgba(15,25,20,.45); z-index: 30; }
  .topbar .menu-btn { display: inline-grid; }
  .topbar { padding: 12px 16px; }
  .topbar h1 { font-size: 19px; }
  .top-actions .btn span { display: none; }
  .top-actions .btn { padding: 9px 11px; }
  .content { padding: 18px 16px 32px; }
  .foot { padding: 0 16px 20px; }
  .cols-half, .grid2 { grid-template-columns: 1fr; }
  h2 { font-size: 24px; }
}
@media (max-width: 640px) {
  .stats, .stats-3 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stats-3 .stat:first-child { grid-column: 1 / -1; }
  .stat { padding: 13px 14px; }
  .stat strong { font-size: 28px; }
  .search-big { flex-basis: 100%; }
  .pad-lg { padding: 18px; }
  .filters > * { flex: 1 1 100%; }
  .filters select { width: 100%; }
  .filters .btn { flex: 1 1 auto; }
  .date input { flex: 1; }
  .dl { grid-template-columns: 1fr; }
  .resident-hero { padding: 20px; }
  .hero-count strong { font-size: 44px; }
  .receipt-head { flex-direction: column-reverse; }
  .unit-big { align-self: stretch; display: flex; align-items: baseline; gap: 10px; justify-content: center; }
  /* tabelas viram cartões */
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { padding: 10px 14px; border-bottom: 1px solid var(--line-2); position: relative; }
  .table tbody tr:last-child { border-bottom: 0; }
  .table td { border: 0; padding: 3px 0; position: relative; }
  .table td[data-label] { padding-left: 112px; min-height: 26px; }
  .table td[data-label]::before { content: attr(data-label); position: absolute; left: 0; top: 5px; width: 104px; font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
  .td-act { display: flex !important; justify-content: flex-end; gap: 6px; padding-top: 8px !important; }
  .td-act .btn { flex: 1; }
  .table tbody tr:hover td { background: none; }
  .row-late td:first-child { box-shadow: none; }
  .row-late { box-shadow: inset 3px 0 0 var(--warn); }
  .guest-card { padding: 24px; }
}

/* ---------- Impressão ---------- */
@media print {
  body { background: #fff; }
  .sidebar, .topbar, .foot, .no-print, .flash, .scrim { display: none !important; }
  .print-only { display: block; }
  .content { padding: 0; }
  .cols { display: block; }
  .card { box-shadow: none; border: 1px solid #999; }
  .unit-big { background: #fff; color: #000; border: 2px solid #000; }
  .unit-big small { color: #000; }
  .code-lg { color: #000; }
  .badge, .tag { border: 1px solid #999; }
  .delivered { background: #fff; border-color: #999; }
}

/* ---------- Quadro público ---------- */
.board { background: var(--bg); min-height: 100vh; }
.board-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px clamp(16px, 4vw, 40px); background: var(--green); }
.board-brand { display: flex; align-items: center; gap: 12px; }
.board-brand .crest { --green: #14281f; }
.board-brand strong { display: block; font-family: var(--serif); font-size: 21px; color: #fff; }
.board-brand span { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--brass-light); }
.btn-brass { background: var(--brass); border-color: var(--brass); color: #1d1a12; }
.btn-brass:hover { background: var(--brass-light); border-color: var(--brass-light); color: #1d1a12; }
.board-wrap { max-width: 1180px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px) 40px; }
.board-hero { display: flex; justify-content: space-between; align-items: center; gap: 24px; background: var(--green); color: #fff; padding: 10px 0 46px; flex-wrap: wrap; box-shadow: 0 0 0 100vmax var(--green); clip-path: inset(0 -100vmax); }
.board-hero .eyebrow { color: var(--brass-light); }
.board-hero h1 { font-family: var(--serif); font-size: clamp(24px, 4vw, 34px); margin: 4px 0 8px; }
.board-hero p { color: #c9d9d0; max-width: 560px; }
.board-nums { display: flex; gap: 12px; }
.board-nums div { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); border-radius: 14px; padding: 12px 20px; text-align: center; min-width: 120px; }
.board-nums strong { display: block; font-family: var(--serif); font-size: 40px; line-height: 1; color: var(--brass-light); }
.board-nums span { font-size: 12.5px; color: #c9d9d0; }
.board-tools { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: -22px 0 26px; position: relative; }
.board-tools .search { background: #fff; box-shadow: var(--shadow); flex: 1 1 320px; padding: 2px 14px; border-radius: 12px; }
.board-tools .search input { font-size: 16px; padding: 12px 0; }
.board-tabs { display: flex; gap: 4px; background: #fff; padding: 4px; border-radius: 12px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.board-tabs button { border: 0; background: none; padding: 9px 16px; border-radius: 9px; font: 600 14px var(--sans); color: var(--ink-2); cursor: pointer; }
.board-tabs button em { font-style: normal; background: var(--line-2); padding: 0 7px; border-radius: 10px; font-size: 12px; margin-left: 4px; }
.board-tabs button.on { background: var(--green); color: #fff; }
.board-tabs button.on em { background: rgba(255,255,255,.18); }
.board-bloco { margin-bottom: 30px; }
.board-bloco h2 { font-size: 22px; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.board-bloco h2::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.board-empty { display: flex; align-items: center; gap: 8px; color: var(--ok); background: var(--ok-soft); border: 1px solid #c7e3d2; border-radius: 12px; padding: 14px 16px; }
.board-none { text-align: center; padding: 30px; color: var(--ink-2); background: #fff; border-radius: 14px; border: 1px dashed var(--line); }
.apt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.apt { background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.apt[hidden] { display: none; }
.apt header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; background: var(--brass-soft); border-bottom: 1px solid #eadfc6; }
.apt-id { display: flex; align-items: baseline; gap: 6px; }
.apt-id small { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #8a6420; font-weight: 600; }
.apt-id strong { font-family: var(--serif); font-size: 28px; line-height: 1; color: var(--green); }
.apt-id span { font-size: 12.5px; color: var(--muted); }
.apt-count { font-size: 13px; color: var(--ink-2); }
.apt-count strong { font-size: 15px; color: var(--ink); }
.apt ul { list-style: none; margin: 0; padding: 4px 0; }
.apt li { display: flex; align-items: center; gap: 10px; padding: 9px 16px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.apt li:last-child { border-bottom: 0; }
.apt li strong { display: block; font-size: 14px; font-weight: 600; }
.apt li small { display: block; color: var(--muted); }
.apt-when { font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.board-foot { text-align: center; color: var(--muted); font-size: 12.5px; padding: 0 16px 28px; }
.guest-back { margin-top: 12px; }
@media (max-width: 640px) {
  .board-nums { width: 100%; }
  .board-nums div { flex: 1; min-width: 0; padding: 10px; }
  .board-nums strong { font-size: 32px; }
  .board-tabs { width: 100%; }
  .board-tabs button { flex: 1; padding: 9px 6px; }
}
.res-card { padding: 10px 16px 10px 20px; }
.res-link { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; color: var(--ink); }
.res-link:hover { text-decoration: none; }
.res-card .btn { flex: none; }
.tag-conf { background: var(--brass-soft); color: #8a6420; }
.callout-soft .ic { color: var(--ok); }
.callout-soft { background: var(--ok-soft); border-color: #c7e3d2; }
.declaro { white-space: normal; align-items: flex-start; line-height: 1.4; }
.declaro input { margin-top: 2px; flex: none; }
@media (max-width: 640px) { .res-card { flex-wrap: wrap; } .res-card > .btn { width: 100%; } }
.timeline .tl-confirmada::before { background: var(--ok); }
.form-card { margin-bottom: 20px; }
