/* Portal /os — alinhado à identidade Pred IA (painel.php) */

:root {
  --cor-primaria: #0068ff;
  --cor-primaria-escura: #0050cc;
  --cor-primaria-clara: #3385ff;
  --cor-primaria-mais-clara: #6ba3ff;
  --bg-page: #f0f6ff;
  --bg-card: #ffffff;
  --bg-soft: #f8fafc;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --border-focus: rgba(0, 104, 255, 0.35);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 10px 40px rgba(0, 52, 128, 0.08);
  --shadow-lg: 0 20px 50px rgba(0, 52, 128, 0.12);
  --radius: 16px;
  --radius-lg: 22px;
  --input-radius: 16px;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg-page);
  background-image: radial-gradient(ellipse 120% 80% at 50% -20%, rgba(0, 104, 255, 0.08), transparent),
    linear-gradient(180deg, #ffffff 0%, var(--bg-page) 35%);
}

a {
  color: var(--cor-primaria);
}

/* Cabeçalho com logo */
.os-topbar {
  background: linear-gradient(135deg, #ffffff 0%, #f8fbff 50%, #eef4ff 100%);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.os-topbar-inner {
  max-width: 640px;
  margin: 0 auto;
  padding: 20px 20px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
}

@media (min-width: 540px) {
  .os-topbar-inner {
    flex-direction: row;
    text-align: left;
    align-items: center;
    gap: 22px;
  }
}

.site-logo-link {
  text-decoration: none;
  display: inline-block;
  line-height: 0;
}

.site-logo {
  height: 48px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  display: block;
}

.condo-thumb-fa {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(0, 104, 255, 0.12), rgba(51, 133, 255, 0.18));
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--cor-primaria);
  font-size: 1.5rem;
}

.site-intro {
  flex: 1;
  min-width: 0;
}

.site-intro h1 {
  margin: 0 0 8px;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.2;
}

.site-intro p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 36em;
}

#app {
  max-width: 560px;
  margin: 0 auto;
  padding: 24px 18px 40px;
  min-height: calc(100vh - 140px);
}

.os-footer {
  text-align: center;
  padding: 20px 16px 28px;
  font-size: 12px;
  color: var(--text-muted);
}

.os-footer a {
  text-decoration: none;
  font-weight: 600;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 22px;
  box-shadow: var(--shadow-md);
  margin-bottom: 18px;
}

.card-title {
  margin: 0 0 18px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-title i {
  color: var(--cor-primaria);
  font-size: 1.1rem;
}

label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}

label i {
  color: var(--cor-primaria);
  font-size: 14px;
  opacity: 0.9;
}

.label-like {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.label-like i {
  color: var(--cor-primaria);
  font-size: 14px;
  opacity: 0.9;
}

.os-fotos-abertura-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.os-fotos-abertura-bar .btn-sm {
  width: auto;
}

.os-fotos-abertura-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.os-fotos-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.os-msg-fotos-preview {
  margin-top: 14px;
  padding: 12px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(0, 104, 255, 0.04) 0%, rgba(248, 250, 252, 0.9) 100%);
  border: 1px solid rgba(0, 104, 255, 0.12);
  min-height: 0;
}

.os-msg-fotos-preview:empty {
  display: none;
}

.form-msg-os .hint strong {
  color: var(--text);
  font-weight: 600;
}

.os-foto-thumb-wrap {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  flex-shrink: 0;
}

.os-foto-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.os-foto-thumb-wrap.primeira::after {
  content: "Antes";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 4px 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  text-align: center;
  color: #fff;
  background: linear-gradient(135deg, var(--cor-primaria) 0%, var(--cor-primaria-escura) 100%);
}

.os-foto-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.65);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.os-foto-remove:hover {
  background: rgba(220, 38, 38, 0.95);
}

.os-foto-antes-box {
  margin: 0 0 18px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #fff 0%, var(--bg-soft) 100%);
}

.os-foto-antes-box .os-foto-antes-tit {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--cor-primaria);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.os-foto-antes-box img {
  width: 100%;
  max-height: min(50vh, 380px);
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: zoom-in;
}

.tl-anexos img {
  max-width: 100%;
  border-radius: 10px;
  margin-top: 10px;
  border: 1px solid var(--border);
  cursor: zoom-in;
}

.os-lightbox {
  position: fixed;
  inset: 0;
  z-index: 12000;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.os-lightbox[hidden] {
  display: none !important;
}

.os-lightbox img {
  max-width: 100%;
  max-height: calc(100vh - 80px);
  object-fit: contain;
  border-radius: 12px;
}

.os-lightbox-close,
.os-lightbox-nav {
  position: absolute;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.os-lightbox-close {
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  font-size: 18px;
}

.os-lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  font-size: 16px;
}

.os-lightbox-prev { left: 12px; }
.os-lightbox-next { right: 12px; }

.os-lightbox-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.45);
  padding: 6px 14px;
  border-radius: 20px;
}

.os-inf-destaque-modal {
  position: fixed;
  inset: 0;
  z-index: 13000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.os-inf-destaque-modal[hidden] {
  display: none !important;
}

.os-inf-destaque-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
}

.os-inf-destaque-panel {
  position: relative;
  width: min(720px, 100%);
  max-height: min(88vh, 720px);
  background: var(--surface, #fff);
  border-radius: 16px;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.22);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.os-inf-destaque-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}

.os-inf-destaque-header h2 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.os-inf-destaque-close {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: #f1f5f9;
  color: #334155;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.os-inf-destaque-body {
  padding: 20px;
  overflow-y: auto;
  color: var(--text);
  font-size: 15px;
  line-height: 1.7;
}

.os-inf-destaque-body p {
  margin-bottom: 0.75rem;
}

.os-inf-destaque-body img,
.os-inf-destaque-body video {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.os-inf-destaque-body iframe {
  max-width: 100%;
  border-radius: 8px;
}

.os-inf-destaque-body a {
  color: var(--cor-primaria);
}

.os-inf-destaque-footer {
  padding: 16px 20px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
}

.input-wrap {
  position: relative;
}

.input-wrap .input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  font-size: 15px;
}

.input-wrap input.has-icon {
  padding-left: 48px;
}

.input-wrap--os {
  border-radius: calc(var(--input-radius) + 4px);
  padding: 3px;
  background: linear-gradient(135deg, rgba(0, 104, 255, 0.2) 0%, rgba(51, 133, 255, 0.08) 50%, rgba(148, 163, 184, 0.12) 100%);
  box-shadow: 0 4px 20px rgba(0, 104, 255, 0.08);
  transition: box-shadow 0.25s, transform 0.2s;
}

.input-wrap--os:focus-within {
  box-shadow: 0 0 0 4px rgba(0, 104, 255, 0.14), 0 12px 36px rgba(0, 104, 255, 0.15);
  transform: translateY(-1px);
}

.input-wrap--os .input-icon {
  left: 18px;
  color: var(--cor-primaria);
  opacity: 0.85;
}

.input-wrap--os .os-field-control {
  border-radius: var(--input-radius);
  border: none;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.95);
}

input[type="text"],
input[type="tel"],
input[type="number"],
input[type="search"],
input[type="password"],
textarea,
select {
  width: 100%;
  padding: 15px 18px;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  color: var(--text);
  font-size: 16px;
  outline: none;
  line-height: 1.45;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.9), 0 2px 10px rgba(15, 23, 42, 0.04);
  transition: border-color 0.22s, box-shadow 0.22s, background 0.22s, transform 0.15s;
}

input::placeholder,
textarea::placeholder {
  color: #94a3b8;
}

input:hover,
textarea:hover,
select:hover {
  border-color: rgba(0, 104, 255, 0.3);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.95), 0 4px 18px rgba(0, 104, 255, 0.09);
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--cor-primaria-clara);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(0, 104, 255, 0.12), 0 10px 32px rgba(0, 104, 255, 0.12);
}

textarea {
  min-height: 128px;
  resize: vertical;
  padding-top: 16px;
  padding-bottom: 16px;
}

.os-field-control {
  padding: 17px 20px;
  border-radius: var(--input-radius);
  border-width: 1.75px;
  font-size: 1.02rem;
  letter-spacing: -0.012em;
  background: linear-gradient(165deg, #ffffff 0%, #f6f9ff 45%, #f1f5f9 100%);
}

.card-form-os textarea.os-field-control {
  min-height: 168px;
  line-height: 1.58;
}

select.os-field-control {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath fill='none' stroke='%230068ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M1.5 1.5L7 7l5.5-5.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  padding-right: 46px;
}

.pin-input.os-field-control {
  padding-top: 18px;
  padding-bottom: 18px;
  max-width: 240px;
  margin-left: auto;
  margin-right: auto;
  display: block;
}

.card-form-os {
  box-shadow: 0 16px 48px rgba(0, 52, 128, 0.1);
}

.card-dash {
  padding-bottom: 22px;
}

.os-dash-novo-wrap {
  margin: 6px 0 22px;
}

.btn-dash-novo {
  display: block;
  width: 100%;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  cursor: pointer;
  text-align: left;
  position: relative;
  border-radius: 20px;
  background: transparent;
  color: inherit;
}

.btn-dash-novo-glow {
  position: absolute;
  inset: -2px;
  border-radius: 22px;
  background: linear-gradient(135deg, #0068ff 0%, #3385ff 40%, #60a5fa 100%);
  opacity: 0.55;
  filter: blur(10px);
  z-index: 0;
  transition: opacity 0.25s, transform 0.25s;
}

.btn-dash-novo:hover .btn-dash-novo-glow,
.btn-dash-novo:focus-visible .btn-dash-novo-glow {
  opacity: 0.85;
  transform: scale(1.01);
}

.btn-dash-novo:focus-visible {
  outline: none;
}

.btn-dash-novo:focus-visible .btn-dash-novo-inner {
  box-shadow: 0 0 0 3px #fff, 0 0 0 6px rgba(0, 104, 255, 0.35);
}

.btn-dash-novo-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 20px 20px 18px;
  border-radius: 20px;
  background: linear-gradient(135deg, #0068ff 0%, #0050cc 48%, #0047b3 100%);
  color: #fff;
  box-shadow: 0 10px 32px rgba(0, 80, 204, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.18);
  transition: transform 0.18s, box-shadow 0.2s, filter 0.2s;
}

.btn-dash-novo:hover .btn-dash-novo-inner {
  filter: brightness(1.04);
  transform: translateY(-2px);
  box-shadow: 0 14px 40px rgba(0, 80, 204, 0.5);
}

.btn-dash-novo:active .btn-dash-novo-inner {
  transform: translateY(0);
}

.btn-dash-novo-ico {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.btn-dash-novo-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.btn-dash-novo-title {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.btn-dash-novo-desc {
  font-size: 0.85rem;
  font-weight: 500;
  opacity: 0.92;
  line-height: 1.35;
}

.btn-dash-novo-chev {
  font-size: 1rem;
  opacity: 0.85;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.btn-dash-novo:hover .btn-dash-novo-chev {
  transform: translateX(4px);
}

.os-dash-lista-head {
  margin: 8px 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.os-dash-lista-titulo {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.os-dash-lista-titulo i {
  color: var(--cor-primaria);
  font-size: 1rem;
}

.os-list-dash {
  max-height: min(420px, 52vh);
  overflow-y: auto;
  padding-right: 4px;
  margin-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 104, 255, 0.35) transparent;
}

.os-list-dash::-webkit-scrollbar {
  width: 6px;
}

.os-list-dash::-webkit-scrollbar-thumb {
  background: rgba(0, 104, 255, 0.35);
  border-radius: 999px;
}

.btn-dash-trocar {
  margin-top: 10px;
  width: 100%;
}

.row {
  margin-bottom: 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 20px;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.15s, background 0.15s, filter 0.15s;
  font-family: inherit;
}

.btn:active {
  transform: scale(0.99);
}

.btn-primary {
  background: linear-gradient(135deg, var(--cor-primaria) 0%, var(--cor-primaria-clara) 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 104, 255, 0.35);
}

.btn-primary:hover {
  filter: brightness(1.05);
  box-shadow: 0 6px 20px rgba(0, 104, 255, 0.4);
}

.btn-submit-os--pulse {
  animation: os-submit-pulse 1.5s ease-in-out infinite;
}

.btn-submit-os--pulse:hover {
  animation: os-submit-pulse 1.5s ease-in-out infinite;
}

@keyframes os-submit-pulse {
  0%,
  100% {
    box-shadow: 0 4px 14px rgba(0, 104, 255, 0.35);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 8px 28px rgba(0, 104, 255, 0.55), 0 0 0 6px rgba(0, 104, 255, 0.18);
    transform: scale(1.03);
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn-submit-os--pulse {
    animation: none;
    box-shadow: 0 6px 20px rgba(0, 104, 255, 0.5);
  }
}

.btn-secondary {
  background: #fff;
  color: var(--cor-primaria);
  border: 2px solid var(--cor-primaria);
}

.btn-secondary:hover {
  background: rgba(0, 104, 255, 0.06);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px dashed var(--border);
}

.btn-ghost:hover {
  color: var(--cor-primaria);
  border-color: var(--cor-primaria-clara);
  background: rgba(0, 104, 255, 0.04);
}

.btn-sm {
  width: auto;
  padding: 10px 16px;
  font-size: 13px;
}

/* Voltar / Sair — mais evidentes no portal */
.btn-nav-compact {
  width: auto;
  flex-shrink: 0;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 700;
}

.btn-nav-compact i {
  font-size: 1.08em;
}

.btn-nav-back {
  min-height: 50px;
  font-size: 16px;
  font-weight: 700;
}

.btn-nav-back-spaced {
  margin-top: 16px;
}

.btn-nav-back i {
  font-size: 1.12em;
}

.btn-nav-sair.btn-secondary {
  border-color: #dc3545;
  color: #c82333;
}

.btn-nav-sair.btn-secondary:hover {
  background: rgba(220, 53, 69, 0.08);
  border-color: #bd2130;
  color: #a71d2a;
}

.btn-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 8px;
}

.btn-grid .btn {
  width: auto;
  flex-direction: column;
  padding: 20px 14px;
  gap: 10px;
  border-radius: var(--radius);
  min-height: 100px;
}

.btn-grid .btn i {
  font-size: 1.75rem;
  opacity: 0.95;
}

.btn-grid .btn.btn-secondary i {
  color: var(--cor-primaria);
}

/* SweetAlert acima de overlays locais */
.swal2-container {
  z-index: 5000 !important;
}

.msg {
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  margin-bottom: 14px;
  line-height: 1.4;
}

.msg-erro {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

.hidden {
  display: none !important;
}

.divider {
  margin: 22px 0;
  border: 0;
  border-top: 1px solid var(--border);
}

.hint {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 12px;
  line-height: 1.45;
}

.condo-busca {
  position: relative;
  display: block;
  margin: 0 0 10px;
}

.condo-busca i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--cor-primaria);
  pointer-events: none;
  font-size: 15px;
}

.condo-busca .os-field-control {
  width: 100%;
  padding-left: 44px;
  margin: 0;
}

.condo-busca-contagem {
  margin-top: -2px;
}

.condo-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.condo-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-soft);
  cursor: pointer;
  text-align: left;
  color: inherit;
  font: inherit;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.12s;
}

.condo-card:hover {
  border-color: var(--cor-primaria-clara);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.condo-card img {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  object-fit: cover;
  background: #e2e8f0;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.condo-card h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.condo-card span {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.condo-card span i {
  color: var(--cor-primaria);
  font-size: 12px;
}

.condo-card-sem-bairro {
  color: var(--text-muted);
  font-style: italic;
}

.pin-input {
  letter-spacing: 0.45em;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.os-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.os-item {
  padding: 16px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-soft);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.os-item:hover {
  border-color: var(--cor-primaria-clara);
  box-shadow: var(--shadow-sm);
}

.os-item h4 {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.os-item .meta {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.os-item .meta i {
  color: var(--cor-primaria);
  font-size: 12px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: rgba(0, 104, 255, 0.1);
  color: var(--cor-primaria-escura);
  border: 1px solid rgba(0, 104, 255, 0.2);
}

.status-finalizada {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
  border-color: rgba(16, 185, 129, 0.25);
}

.mapa-portal-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
  margin-bottom: 10px;
}

.mapa-portal-search {
  flex: 1;
  min-width: 200px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.mapa-portal-search:focus-within {
  border-color: var(--cor-primaria-clara);
  box-shadow: 0 0 0 3px var(--border-focus);
}

.mapa-portal-search > i {
  color: var(--text-muted);
  font-size: 14px;
}

.mapa-portal-search input {
  flex: 1;
  min-width: 0;
  width: auto;
  border: none;
  background: transparent;
  padding: 12px 4px 12px 0;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  border-radius: 0;
  box-shadow: none;
  transition: none;
  transform: none;
}

.mapa-portal-search input::placeholder {
  color: var(--text-muted);
}

.mapa-portal-search input:hover,
.mapa-portal-search input:focus {
  outline: none;
  border: none;
  background: transparent;
  box-shadow: none;
  transform: none;
}

.mapa-portal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.btn-map-tool {
  background: var(--bg-soft);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: none;
}

.btn-map-tool:hover {
  background: rgba(0, 104, 255, 0.08);
  border-color: var(--cor-primaria-clara);
  color: var(--cor-primaria);
}

.mapa-tree {
  max-height: 300px;
  overflow: auto;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  font-size: 14px;
}

.mapa-tree--portal {
  max-height: min(52vh, 420px);
  padding: 10px 12px;
  background: #fff;
}

/* Árvore estilo Pred+ (mapa do prédio) — leitura */
.mp-ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mp-li {
  margin-bottom: 8px;
}

.mp-folder.collapsed > .mp-children {
  display: none;
}

.mp-folder.collapsed > .mp-header .mp-toggle i {
  transform: rotate(-90deg);
}

.mp-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  user-select: none;
  transition: opacity 0.2s, transform 0.2s;
}

.mp-header:hover {
  opacity: 0.95;
  transform: translateX(2px);
}

.mp-toggle {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s;
}

.mp-toggle i {
  font-size: 11px;
  transition: transform 0.2s;
}

.mp-folder-name {
  font-weight: 600;
  font-size: 14px;
  flex: 1;
}

.mp-li--lvl0 > .mp-header {
  background: linear-gradient(135deg, var(--cor-primaria) 0%, var(--cor-primaria-escura) 100%);
  color: #fff;
}

.mp-li--lvl0 > .mp-header .mp-toggle {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.mp-li--lvl0 > .mp-header .mp-toggle:hover {
  background: rgba(255, 255, 255, 0.32);
}

.mp-li--lvl1 > .mp-header {
  background: #dbeafe;
  color: #1e40af;
  border: 2px solid #93c5fd;
}

.mp-li--lvl1 > .mp-header .mp-toggle {
  background: rgba(0, 0, 0, 0.06);
  color: #1e40af;
}

.mp-li--lvl2 > .mp-header {
  background: #bfdbfe;
  color: #1e3a8a;
  border: 2px solid #60a5fa;
}

.mp-li--lvl2 > .mp-header .mp-toggle {
  background: rgba(0, 0, 0, 0.06);
  color: #1e3a8a;
}

.mp-li--lvl3 > .mp-header,
.mp-li--lvl4 > .mp-header,
.mp-li--lvl5 > .mp-header {
  background: #93c5fd;
  color: #1e3a8a;
  border: 2px solid #3b82f6;
}

.mp-li--lvl3 > .mp-header .mp-toggle,
.mp-li--lvl4 > .mp-header .mp-toggle,
.mp-li--lvl5 > .mp-header .mp-toggle {
  background: rgba(255, 255, 255, 0.35);
  color: #1e3a8a;
}

.mp-children {
  padding-left: 12px;
  margin-top: 4px;
  border-left: 2px dashed var(--border);
  margin-left: 6px;
}

.mp-leaf {
  cursor: pointer;
  padding: 10px 12px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.mp-leaf:hover {
  background: rgba(0, 104, 255, 0.07);
  border-color: var(--cor-primaria-clara);
  transform: translateX(3px);
}

.mp-leaf i {
  color: var(--cor-primaria);
  font-size: 14px;
}

.mp-leaf.selected {
  background: rgba(0, 104, 255, 0.12);
  border-color: var(--cor-primaria);
  outline: 2px solid var(--cor-primaria-mais-clara);
  outline-offset: 0;
}

/* Resultados da busca (lista plana, estilo seletor Pred+) */
.mp-flat-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mp-flat-item {
  cursor: pointer;
  padding: 10px 12px;
  margin-bottom: 8px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.mp-flat-item:hover {
  background: #f0f6ff;
  border-color: var(--cor-primaria-clara);
  transform: translateX(3px);
}

.mp-flat-item.selected {
  background: rgba(0, 104, 255, 0.12);
  border-color: var(--cor-primaria);
  outline: 2px solid var(--cor-primaria-mais-clara);
}

.mp-flat-item i {
  color: var(--cor-primaria);
  margin-top: 2px;
  flex-shrink: 0;
}

.mp-flat-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-muted);
}

.mp-flat-empty i {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 10px;
  opacity: 0.45;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 18px;
}

.tl-item {
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  font-size: 14px;
}

.tl-item .data {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tl-item .data i {
  color: var(--cor-primaria);
}

.tl-item .txt {
  white-space: pre-wrap;
  line-height: 1.5;
  color: var(--text);
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 14px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.topbar strong {
  display: block;
  font-size: 1.1rem;
  color: var(--text);
}

.topbar small {
  color: var(--text-muted);
  display: block;
  margin-top: 4px;
  font-size: 13px;
}

.stack-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.os-pin-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 4px;
}

.btn-whatsapp {
  background: #25d366;
  color: #fff;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
}

.btn-whatsapp:hover {
  filter: brightness(1.06);
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.42);
}

.btn-email-code {
  background: linear-gradient(135deg, var(--cor-primaria) 0%, var(--cor-primaria-clara) 100%);
  color: #fff;
  border: none;
  box-shadow: 0 4px 14px rgba(0, 104, 255, 0.35);
}

.btn-email-code:hover {
  filter: brightness(1.05);
  box-shadow: 0 6px 20px rgba(0, 104, 255, 0.4);
}

.file-input-wrap {
  position: relative;
}

.file-input-wrap input[type="file"] {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1px dashed var(--border);
  background: #fff;
  font-size: 14px;
}

@media (min-width: 600px) {
  #app {
    max-width: 580px;
    padding: 28px 22px 48px;
  }
}

/* —— Reservas de espaços (portal /os) —— */
.os-dash-novo-wrap--stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.os-dash-lista-head--reservas {
  margin-top: 8px;
}

.os-list-reservas {
  margin-bottom: 20px;
}

/* —— Documentos do condomínio (portal /os) —— */
.card-docs-portal {
  padding-top: 18px;
}

.docs-portal-top {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 18px;
}

.docs-portal-title {
  margin: 0 0 6px;
  font-size: 1.15rem;
}

.docs-portal-sub {
  margin: 0;
}

.docs-portal-toolbar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
  position: sticky;
  top: 0;
  z-index: 800;
  background: var(--bg-card);
  padding: 10px 0 12px;
  margin-left: -22px;
  margin-right: -22px;
  padding-left: 22px;
  padding-right: 22px;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.07);
}

.docs-portal-filtros {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.docs-portal-filtro-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.docs-portal-filtro-label i {
  color: var(--cor-primaria);
  font-size: 0.85rem;
}

.docs-portal-select {
  flex: 1;
  min-width: 0;
  max-width: 100%;
  padding: 10px 12px;
  font-size: 0.88rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-family: inherit;
}

.docs-portal-select:focus {
  outline: none;
  border-color: var(--cor-primaria);
  box-shadow: 0 0 0 3px rgba(0, 104, 255, 0.15);
}

@media (min-width: 520px) {
  .docs-portal-toolbar {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  .docs-portal-search {
    flex: 1 1 220px;
  }

  .docs-portal-filtros {
    flex: 1 1 100%;
  }

  .docs-portal-select {
    flex: 1 1 180px;
    max-width: 280px;
  }

  .docs-portal-count {
    margin-left: auto;
  }
}

.docs-portal-search {
  flex: 1;
  min-width: 200px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.docs-portal-search i {
  color: var(--cor-primaria);
  opacity: 0.85;
}

.docs-portal-search input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0;
  min-height: 0;
  box-shadow: none;
}

.docs-portal-search input:focus {
  outline: none;
}

.docs-portal-count {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.docs-lista {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: min(68vh, 640px);
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(99, 102, 241, 0.4) transparent;
}

@media (max-width: 768px) {
  .docs-lista {
    max-height: none;
    overflow: visible;
    padding-right: 0;
    overscroll-behavior: auto;
  }

  .card-docs-portal {
    overflow: visible;
  }

  .docs-card-meta span:nth-child(2),
  .docs-card-meta span:nth-child(3) {
    display: none;
  }

  .docs-card-actions {
    flex-direction: column;
  }

  .docs-btn {
    width: 100%;
    min-width: 0;
  }
}

.docs-loading {
  text-align: center;
  padding: 28px 12px;
}

.docs-empty {
  text-align: center;
  padding: 36px 20px;
  background: linear-gradient(160deg, #f8fafc 0%, #eef2ff 100%);
  border: 1px dashed #c7d2fe;
  border-radius: var(--radius);
}

.docs-empty i {
  font-size: 2.4rem;
  color: #a5b4fc;
  display: block;
  margin-bottom: 12px;
}

.docs-empty p {
  margin: 0 0 8px;
  font-weight: 600;
  color: var(--text);
}

.docs-empty small {
  color: var(--text-muted);
  line-height: 1.45;
}

.docs-empty--err {
  background: linear-gradient(160deg, #fff1f2 0%, #fef2f2 100%);
  border-color: #fecaca;
}

.docs-empty--err i {
  color: #f87171;
}

.docs-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px 16px 14px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}

.docs-card:hover {
  border-color: #c7d2fe;
  box-shadow: 0 8px 28px rgba(79, 70, 229, 0.12);
  transform: translateY(-1px);
}

.docs-card-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.docs-ico {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.docs-ico--pdf {
  background: #fee2e2;
  color: #dc2626;
}

.docs-ico--txt {
  background: #e0e7ff;
  color: #4338ca;
}

.docs-ico--sheet {
  background: #dcfce7;
  color: #15803d;
}

.docs-ico--doc {
  background: #dbeafe;
  color: #1d4ed8;
}

.docs-ico--generic {
  background: #f1f5f9;
  color: #64748b;
}

.docs-card-titles {
  flex: 1;
  min-width: 0;
}

.docs-card-titles h3 {
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.3;
  color: var(--text);
}

.docs-card-arquivo {
  margin: 0 0 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
  word-break: break-word;
}

.docs-card-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: #eef2ff;
  color: #4338ca;
  border: 1px solid #c7d2fe;
}

.docs-card-resumo {
  margin: 12px 0 0;
  padding: 12px 14px;
  background: linear-gradient(135deg, #f8fafc 0%, #f5f3ff 100%);
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.docs-card-resumo-label {
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6366f1;
}

.docs-card-resumo-text {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: #334155;
}

.docs-card-resumo-btn {
  margin-top: 8px;
  padding: 0;
  border: none;
  background: none;
  color: var(--cor-primaria);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  font-family: inherit;
}

.docs-card-pendente {
  margin: 12px 0 0;
  font-size: 0.85rem;
  color: #b45309;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 10px;
  padding: 10px 12px;
}

.docs-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.docs-card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.docs-card-ext {
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #6366f1;
}

.docs-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.docs-btn {
  flex: 1;
  min-width: 120px;
  width: auto;
  padding: 11px 16px;
  font-size: 0.88rem;
  border-radius: 12px;
}

.docs-btn--view {
  background: #fff;
  color: var(--cor-primaria);
  border: 1px solid #bfdbfe;
  box-shadow: none;
}

.docs-btn--view:hover {
  background: #eff6ff;
  filter: none;
}

.docs-btn--dl {
  background: linear-gradient(135deg, var(--cor-primaria) 0%, var(--cor-primaria-clara) 100%);
  color: #fff;
  border: none;
}

.docs-btn--resumo {
  background: #eff6ff;
  color: var(--cor-primaria);
  border: 1px solid #bfdbfe;
  box-shadow: none;
}

.docs-btn--resumo:hover {
  background: #dbeafe;
  border-color: var(--cor-primaria-clara);
  filter: none;
}

.docs-ia-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
  vertical-align: middle;
}

.docs-btn--resumo .docs-ia-icon {
  width: 18px;
  height: 18px;
}

.docs-resumo-header h2 .docs-ia-icon {
  width: 22px;
  height: 22px;
}

/* Modal de resumo do documento */
.docs-resumo-modal {
  position: fixed;
  inset: 0;
  z-index: 12500;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}

.docs-resumo-modal[hidden] {
  display: none !important;
}

.docs-resumo-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
}

.docs-resumo-panel {
  position: relative;
  width: 100%;
  max-height: min(92vh, 720px);
  background: var(--bg-card);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -8px 40px rgba(15, 23, 42, 0.22);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

@media (min-width: 520px) {
  .docs-resumo-modal {
    align-items: center;
    padding: 16px;
  }

  .docs-resumo-panel {
    width: min(640px, 100%);
    border-radius: 16px;
    max-height: min(88vh, 720px);
  }
}

.docs-resumo-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.docs-resumo-header h2 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.35;
}

.docs-resumo-close {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 12px;
  background: var(--bg-soft);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
}

.docs-resumo-close:hover {
  background: #e2e8f0;
  color: var(--text);
}

.docs-resumo-body {
  padding: 16px 20px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #334155;
  white-space: pre-wrap;
}

.docs-resumo-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 20px 20px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.docs-resumo-footer .btn {
  flex: 1;
  min-width: 120px;
  width: auto;
}

@media (max-width: 768px) {
  .docs-resumo-footer {
    flex-direction: column;
  }

  .docs-resumo-footer .btn {
    width: 100%;
    min-width: 0;
  }
}

.docs-preview-frame {
  width: 100%;
  min-height: 72vh;
  border: 0;
  border-radius: 10px;
}

.docs-preview-txt {
  text-align: left;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 72vh;
  overflow: auto;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px;
  margin: 0;
  font-size: 0.85rem;
}

.docs-preview-sheets,
.docs-preview-docx {
  max-height: 72vh;
  overflow: auto;
  text-align: left;
}

.docs-sheet-block h4 {
  margin: 0 0 8px;
  color: #334155;
  font-size: 0.95rem;
}

.docs-sheet-wrap {
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  padding: 8px;
  margin-bottom: 16px;
}

.docs-preview-docx article {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 22px;
  line-height: 1.65;
  font-size: 15px;
  color: #111827;
}

.rsv-empty-hint {
  text-align: center;
  padding: 16px 12px;
  background: var(--bg-soft);
  border-radius: var(--radius);
  border: 1px dashed var(--border);
}

.rsv-card-mini {
  display: flex;
  gap: 14px;
  padding: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
}

.rsv-card-mini-img {
  width: 72px;
  min-width: 72px;
  height: 72px;
  border-radius: 12px;
  background-size: cover;
  background-position: center;
  background-color: var(--bg-soft);
}

.rsv-card-mini-img--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1.4rem;
}

.rsv-card-mini-body {
  flex: 1;
  min-width: 0;
}

.rsv-card-mini-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.rsv-card-mini-top strong {
  font-size: 0.95rem;
  line-height: 1.3;
}

.rsv-card-mini-meta {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.rsv-card-mini-valor {
  margin: 6px 0 0;
  font-weight: 700;
  color: var(--cor-primaria-escura);
  font-size: 0.95rem;
}

.rsv-mini-cancel {
  margin-top: 8px;
  border: none;
  background: transparent;
  color: #b91c1c;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0;
  cursor: pointer;
}

.rsv-mini-cancel:disabled {
  opacity: 0.55;
  cursor: default;
}

.rsv-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.rsv-st-agendada {
  background: #dbeafe;
  color: #1d4ed8;
}

.rsv-st-aguardando {
  background: #fef3c7;
  color: #92400e;
}

.rsv-st-confirmada {
  background: #ccfbf1;
  color: #0f766e;
}

.rsv-st-finalizada {
  background: #d1fae5;
  color: #047857;
}

.rsv-st-cancelada {
  background: #f1f5f9;
  color: #64748b;
}

.rsv-espacos-grid {
  display: grid;
  gap: 14px;
}

@media (min-width: 520px) {
  .rsv-espacos-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.rsv-espaco-card {
  display: flex;
  flex-direction: column;
  text-align: left;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #fff;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.rsv-espaco-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.rsv-espaco-card-img {
  height: 140px;
  background-size: cover;
  background-position: center;
  background-color: var(--bg-soft);
}

.rsv-espaco-card-img--ph {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 2rem;
}

.rsv-espaco-card-body {
  padding: 14px 16px 16px;
}

.rsv-espaco-card-body strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 4px;
}

.rsv-espaco-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--cor-primaria);
}

.rsv-galeria {
  margin: 16px 0 20px;
}

.rsv-galeria-hero {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  background-size: cover;
  background-position: center;
  background-color: var(--bg-soft);
  border: 1px solid var(--border);
}

.rsv-galeria-hero--ph {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 2.5rem;
}

.rsv-galeria-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.rsv-galeria-thumb {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border-radius: 10px;
  border: 2px solid transparent;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  padding: 0;
}

.rsv-galeria-thumb.active {
  border-color: var(--cor-primaria);
  box-shadow: 0 0 0 2px rgba(0, 104, 255, 0.25);
}

.rsv-sec {
  margin-top: 22px;
}

.rsv-sec-titulo {
  font-size: 0.95rem;
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

.rsv-cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.rsv-cal-titulo {
  font-size: 1rem;
}

.rsv-cal-legenda {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.rsv-cal-legenda span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.rsv-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.rsv-dot--livre {
  background: #22c55e;
}

.rsv-dot--parcial {
  background: #f59e0b;
}

.rsv-dot--cheio {
  background: #ef4444;
}

.rsv-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.rsv-cal-dow {
  text-align: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  padding: 4px 0;
}

.rsv-cal-cell {
  aspect-ratio: 1;
  min-height: 36px;
  border: none;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--bg-soft);
  color: var(--text);
}

.rsv-cal-cell--blank {
  background: transparent;
  cursor: default;
}

.rsv-cal-cell--livre:not(:disabled):hover {
  background: #dcfce7;
}

.rsv-cal-cell--parcial:not(:disabled) {
  background: #fef3c7;
}

.rsv-cal-cell--cheio {
  opacity: 0.72;
  cursor: pointer;
}

.rsv-cal-cell--indisponivel {
  opacity: 0.45;
  cursor: not-allowed;
}

.rsv-cal-cell--sel {
  outline: 2px solid var(--cor-primaria);
  outline-offset: 2px;
  background: #dbeafe !important;
}

.rsv-periodos-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rsv-periodo-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.rsv-periodo-btn:hover {
  border-color: var(--cor-primaria-clara);
}

.rsv-periodo-btn.selected {
  border-color: var(--cor-primaria);
  background: #eff6ff;
}

.rsv-periodo-btn.is-disabled,
.rsv-periodo-btn:disabled {
  cursor: not-allowed;
  opacity: 1;
  background: #f8fafc;
  align-items: flex-start;
  flex-wrap: wrap;
  border-color: #fecaca;
}

.rsv-periodo-btn.is-disabled .rsv-periodo-valor,
.rsv-periodo-btn:disabled .rsv-periodo-valor {
  color: #b91c1c;
  font-size: 0.82rem;
  font-weight: 600;
  text-align: left;
  flex: 1 1 100%;
  margin-top: 4px;
}

.rsv-periodo-btn.is-disabled:hover,
.rsv-periodo-btn:disabled:hover {
  border-color: var(--border);
}

.rsv-periodo-valor {
  color: var(--cor-primaria-escura);
  font-size: 1rem;
}

.rsv-confirm-wrap {
  margin-top: 22px;
}

.rsv-confirm-card {
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
}

.rsv-confirm-linha {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 8px;
  font-size: 0.9rem;
}

.rsv-confirm-linha span {
  color: var(--text-muted);
}

.rsv-confirm-valor {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--cor-primaria-escura);
  margin: 12px 0;
  text-align: center;
}

.rsv-confirm-boleto {
  font-size: 0.85rem;
  color: var(--text-muted);
  background: #eff6ff;
  border-left: 4px solid var(--cor-primaria);
  padding: 12px 14px;
  border-radius: 0 10px 10px 0;
  margin: 0 0 14px;
  line-height: 1.5;
}

.rsv-obs-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.rsv-btn-confirmar {
  width: 100%;
  margin-top: 4px;
}

/* —— Prédi: botão flutuante e chat (portal /os) —— */
.os-ai-float-btn {
  position: fixed;
  bottom: 1.5rem;
  right: 1.25rem;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--cor-primaria) 0%, var(--cor-primaria-escura) 100%);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 104, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 900;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  animation: os-ai-float-bob 3s ease-in-out infinite;
}

.os-ai-float-btn:not(.hidden):hover {
  transform: scale(1.08);
  box-shadow: 0 8px 22px rgba(0, 104, 255, 0.45);
}

.os-ai-float-btn:not(.hidden):active {
  transform: scale(0.96);
}

.os-ai-float-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(0, 104, 255, 0.25);
  animation: os-ai-pulse-ring 2s ease-in-out infinite;
  z-index: 0;
}

.os-ai-float-icon {
  position: relative;
  z-index: 1;
  width: 32px;
  height: 32px;
  object-fit: contain;
  animation: os-ai-icon-glow 2.2s ease-in-out infinite;
}

@keyframes os-ai-float-bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes os-ai-pulse-ring {
  0%,
  100% {
    transform: scale(0.92);
    opacity: 0.55;
  }
  50% {
    transform: scale(1.12);
    opacity: 0.15;
  }
}

@keyframes os-ai-icon-glow {
  0%,
  100% {
    filter: drop-shadow(0 0 0 rgba(255, 255, 255, 0));
    transform: scale(1);
  }
  50% {
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.85));
    transform: scale(1.06);
  }
}

.os-ai-chat-modal {
  position: fixed;
  bottom: 5.5rem;
  right: 1rem;
  left: 1rem;
  max-width: 420px;
  margin-left: auto;
  height: min(560px, calc(100vh - 7rem));
  max-height: calc(100vh - 7rem);
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  display: none;
  flex-direction: column;
  z-index: 901;
  border: 1px solid var(--border);
  animation: os-ai-chat-slide 0.28s ease;
}

.os-ai-chat-modal.active {
  display: flex;
}

@keyframes os-ai-chat-slide {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.os-ai-chat-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: inherit;
  overflow: hidden;
}

.os-ai-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--cor-primaria) 0%, var(--cor-primaria-escura) 100%);
  color: #fff;
  flex-shrink: 0;
}

.os-ai-chat-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.os-ai-avatar-small {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
}

.os-ai-chat-title h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.os-ai-chat-title p {
  margin: 2px 0 0;
  font-size: 0.75rem;
  opacity: 0.92;
}

.os-ai-chat-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.1rem;
}

.os-ai-chat-close:hover {
  background: rgba(255, 255, 255, 0.32);
}

.os-ai-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: var(--bg-soft);
}

.os-ai-message {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  animation: os-ai-msg-in 0.25s ease;
}

.os-ai-message.os-ai-user {
  flex-direction: row-reverse;
}

@keyframes os-ai-msg-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.os-ai-message .message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.os-ai-message .message-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.os-ai-message .message-content {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.os-ai-assistant .message-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Texto formatado do Prédi (estilo painel.php) */
.os-ai-md {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text);
}

.os-ai-md-p {
  margin: 0 0 0.65em;
}

.os-ai-md-p:last-child {
  margin-bottom: 0;
}

.os-ai-md-strong,
.os-ai-md strong {
  color: var(--cor-primaria);
  font-weight: 600;
}

.os-ai-md-ul {
  margin: 0.35em 0 0.75em;
  padding-left: 1.25rem;
  list-style: disc;
}

.os-ai-md-ul li {
  margin: 0.35em 0;
  padding-left: 0.15rem;
  line-height: 1.5;
}

.os-ai-md-ul li::marker {
  color: var(--cor-primaria);
}

.os-ai-md-spacer {
  height: 0.5em;
}

.os-ai-md-media {
  margin: 0.75em 0;
}

.os-ai-md-media--img img {
  max-width: 100%;
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
}

.os-ai-user .os-ai-md {
  color: #fff;
}

.os-ai-user .os-ai-md-strong,
.os-ai-user .os-ai-md strong {
  color: #fff;
  font-weight: 700;
}

.os-ai-user .message-content {
  background: var(--cor-primaria);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.os-ai-message.os-ai-error .message-content {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

.os-ai-message.os-ai-assistant.typing-indicator .typing-indicator-bubble {
  position: relative;
  overflow: hidden;
  min-height: 120px;
  min-width: min(100%, 240px);
  padding: 12px 14px;
  padding-right: clamp(100px, 40%, 180px);
}

.os-ai-message.typing-indicator .typing-lupa-gif {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: clamp(120px, 28vw, 180px);
  height: auto;
  pointer-events: none;
  object-fit: contain;
}

.os-ai-message.typing-indicator .typing-indicator-text-row {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.os-ai-message.typing-indicator .typing-indicator-hint-row {
  position: relative;
  z-index: 1;
  display: none;
  margin: 8px 0 0 0;
  padding: 0;
  font-size: 12px;
  line-height: 1.45;
  color: #ccc;
  text-align: left;
  align-items: center;
  gap: 6px;
}

.os-ai-message.typing-indicator .typing-indicator-hint-row .typing-hint-icon {
  flex-shrink: 0;
  font-size: 12px;
  color: #ccc;
}

.os-ai-message.typing-indicator .typing-text {
  display: inline-block;
  max-width: 100%;
  min-height: 1.35em;
}

.os-ai-chat-input-container {
  display: flex;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
  flex-shrink: 0;
}

.os-ai-chat-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
}

.os-ai-chat-input:focus {
  border-color: var(--cor-primaria);
  box-shadow: 0 0 0 3px var(--border-focus);
}

.os-ai-chat-input:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.os-ai-chat-send {
  background: var(--cor-primaria);
  border: none;
  color: #fff;
  padding: 10px 16px;
  border-radius: 12px;
  cursor: pointer;
}

.os-ai-chat-send:hover:not(:disabled) {
  background: var(--cor-primaria-escura);
}

.os-ai-chat-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.os-ai-chat-unavailable {
  background: #fffbeb !important;
  border-left: 4px solid #f59e0b !important;
}

/* Referências do chat Prédi */
.os-ai-fontes {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.os-ai-fontes-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.os-ai-fontes-chevron {
  font-size: 0.7rem;
  transition: transform 0.2s ease;
}

.os-ai-fontes-toggle[aria-expanded="true"] .os-ai-fontes-chevron {
  transform: rotate(180deg);
}

.os-ai-fontes-panel {
  margin-top: 10px;
  padding: 12px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  max-height: min(50vh, 320px);
  overflow-y: auto;
}

.os-ai-fontes-panel-label {
  margin: 0 0 10px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.os-ai-fonte-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
}

.os-ai-fonte-card:last-child {
  margin-bottom: 0;
}

.os-ai-fonte-head {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.os-ai-fonte-ico {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
}

.os-ai-fonte-ico--pdf {
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
}

.os-ai-fonte-ico--docx {
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
}

.os-ai-fonte-ico--xlsx,
.os-ai-fonte-ico--xls {
  background: rgba(5, 150, 105, 0.1);
  color: #059669;
}

.os-ai-fonte-ico--txt {
  background: rgba(100, 116, 139, 0.12);
  color: #64748b;
}

.os-ai-fonte-ico--web {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
}

.os-ai-fonte-titles {
  flex: 1;
  min-width: 0;
}

.os-ai-fonte-titles strong {
  display: block;
  font-size: 0.9rem;
  line-height: 1.35;
  color: var(--text);
}

.os-ai-fonte-meta {
  margin: 4px 0 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.os-ai-fonte-arquivo {
  display: block;
  margin-top: 4px;
  font-size: 0.72rem;
  color: var(--text-muted);
  word-break: break-all;
}

.os-ai-fonte-trecho-preview {
  margin: 10px 0 0;
  padding: 10px 12px;
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg-soft);
  border-left: 3px solid var(--cor-primaria);
  border-radius: 0 8px 8px 0;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  max-height: none;
}

.os-ai-fonte-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.os-ai-trecho-modal-sub {
  margin: 0 0 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.os-ai-trecho-modal-item {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 10px;
  text-align: left;
}

.os-ai-trecho-modal-label {
  margin: 0 0 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.os-ai-trecho-badge {
  display: inline-block;
  background: var(--cor-primaria);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  margin-right: 6px;
}

.os-ai-trecho-modal-texto {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  max-height: none;
}

@media (min-width: 480px) {
  .os-ai-chat-modal {
    right: 1.25rem;
    left: auto;
    width: 420px;
  }

  .os-ai-float-btn {
    right: 1.5rem;
    bottom: 1.75rem;
  }
}

/* Escopo privativa � �rea comum (precifica��o) */
.os-escopo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 8px;
}
.os-escopo-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  text-align: left;
  padding: 14px 14px 12px;
  border: 1.5px solid var(--border, #e2e8f0);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
  color: var(--text, #0f172a);
}
.os-escopo-card i {
  color: var(--cor-primaria, #0068FF);
  font-size: 1.15rem;
  margin-bottom: 2px;
}
.os-escopo-card strong { font-size: 0.95rem; }
.os-escopo-card span { font-size: 0.78rem; color: var(--text-muted, #64748b); line-height: 1.35; }
.os-escopo-card:hover { border-color: #93c5fd; transform: translateY(-1px); }
.os-escopo-card.is-active {
  border-color: var(--cor-primaria, #0068FF);
  box-shadow: 0 0 0 3px rgba(0, 104, 255, 0.12);
  background: linear-gradient(180deg, #f0f7ff 0%, #fff 100%);
}
.os-privativa-banner {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
  border: 1px solid #bfdbfe;
}
.os-privativa-banner i { color: var(--cor-primaria, #0068FF); font-size: 1.25rem; margin-top: 2px; }
.os-privativa-banner strong { display: block; font-size: 0.95rem; margin-bottom: 4px; }
.os-privativa-banner p { margin: 0; font-size: 0.85rem; color: var(--text-muted, #64748b); line-height: 1.4; }
.os-valor-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  font-size: 0.78rem;
  font-weight: 600;
}
.os-mao-obra-box {
  margin: 16px 0;
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(180deg, #f0fdf4 0%, #f8fafc 100%);
  border: 1px solid #bbf7d0;
}
.os-mao-obra-box h3 {
  margin: 0 0 8px;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #065f46;
}
.os-mao-obra-box .mo-total {
  font-size: 1.35rem;
  font-weight: 700;
  color: #047857;
  margin: 4px 0 8px;
}
.os-mao-obra-meta { font-size: 0.82rem; color: #64748b; line-height: 1.45; }
.btn-pdf-os {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 4px;
}
@media (max-width: 420px) {
  .os-escopo-grid { grid-template-columns: 1fr; }
}

/* Atualização cadastral — bate-papo */
body.os-cadastro-aberta #app {
  max-width: 640px;
}

.card-cadastro:not(.hidden) {
  display: flex;
  flex-direction: column;
  min-height: min(78vh, 760px);
  max-height: calc(100vh - 150px);
  padding: 16px 16px 14px;
}

.cad-top { flex-shrink: 0; margin-bottom: 8px; }

.cad-kicker {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cor-primaria);
  display: flex;
  align-items: center;
  gap: 8px;
}

.cad-progress {
  display: flex;
  gap: 5px;
}

.cad-progress span {
  flex: 1;
  height: 4px;
  border-radius: 99px;
  background: #e2e8f0;
}

.cad-progress span.is-done { background: #93c5fd; }
.cad-progress span.is-on {
  background: var(--cor-primaria);
  box-shadow: 0 0 0 3px rgba(0, 104, 255, 0.15);
}

.cad-thread {
  flex: 1;
  overflow-y: auto;
  padding: 8px 2px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cad-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  max-width: 100%;
}

.cad-row--user { justify-content: flex-end; }

.cad-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 18%;
  background: #dbeafe;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 104, 255, 0.22);
}

.cad-bubble {
  background: linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
  border: 1px solid #dbe7f5;
  color: var(--text);
  border-radius: 4px 16px 16px 16px;
  padding: 10px 12px;
  font-size: 14.5px;
  line-height: 1.45;
  max-width: min(100%, 440px);
}

.cad-bubble--user {
  background: linear-gradient(135deg, #0068ff 0%, #0050cc 100%);
  color: #fff;
  border: 0;
  border-radius: 16px 16px 4px 16px;
}

.cad-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--cor-primaria);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: cad-pisca 0.8s steps(1) infinite;
}

@keyframes cad-pisca { 50% { opacity: 0; } }

.cad-composer {
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cad-composer[hidden],
.cad-composer.cad-composer--off {
  display: none !important;
}

.cad-escolhas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.cad-escolhas--vinculo { grid-template-columns: 1fr 1fr; }

.cad-escolha {
  text-align: left;
  border: 1px solid #dbe7f5;
  background: #fff;
  border-radius: 16px;
  padding: 14px 12px;
  cursor: pointer;
  font: inherit;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}

.cad-escolha i {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e8f1ff;
  color: var(--cor-primaria);
  margin-bottom: 4px;
}

.cad-escolha strong { font-size: 14px; }
.cad-escolha small { color: var(--text-muted); font-size: 12px; line-height: 1.35; }

.cad-escolha:hover {
  border-color: var(--cor-primaria);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 104, 255, 0.12);
}

.cad-btn {
  border: 0;
  border-radius: 14px;
  min-height: 46px;
  padding: 0 16px;
  font: inherit;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.cad-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.cad-btn--primary { background: linear-gradient(135deg, #0068ff, #0050cc); color: #fff; flex: 1; }
.cad-btn--ghost { background: #f1f5f9; color: #334155; }
.cad-btn--block { width: 100%; }

.cad-acoes { display: flex; gap: 8px; flex-wrap: wrap; }
.cad-acoes .cad-btn--ghost { flex: 0 0 auto; }

.cad-label { font-size: 13px; font-weight: 700; color: #334155; }
.cad-input {
  width: 100%;
  height: 48px;
  border-radius: 14px;
  border: 1.5px solid #dbe7f5;
  padding: 0 14px;
  font: inherit;
  font-size: 15px;
}
.cad-input:focus {
  outline: none;
  border-color: var(--cor-primaria);
  box-shadow: 0 0 0 4px rgba(0, 104, 255, 0.12);
}

.cad-busca {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1.5px solid #dbe7f5;
  border-radius: 14px;
  padding: 0 12px;
  background: #fff;
}
.cad-busca i { color: #94a3b8; }
.cad-busca input {
  border: 0;
  height: 44px;
  flex: 1;
  font: inherit;
  background: transparent;
  min-width: 0;
}
.cad-busca input:focus { outline: none; }

.cad-lista {
  max-height: 240px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cad-item {
  display: flex;
  gap: 10px;
  align-items: center;
  text-align: left;
  width: 100%;
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 14px;
  padding: 8px 10px;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.cad-item img, .cad-lista-ico {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: #eef4ff;
}
.cad-lista-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--cor-primaria);
}
.cad-item strong, .cad-item small { display: block; }
.cad-item small { color: var(--text-muted); font-size: 12px; }
.cad-item:hover, .cad-item.is-on { border-color: var(--cor-primaria); background: #f5f9ff; }

.cad-check {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  border: 1.5px solid #cbd5e1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  flex-shrink: 0;
}
.cad-item.is-on .cad-check {
  background: var(--cor-primaria);
  border-color: var(--cor-primaria);
  color: #fff;
}

.cad-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cad-chip {
  border: 0;
  background: #e8f1ff;
  color: #0b3d91;
  border-radius: 999px;
  padding: 6px 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.cad-drop {
  border: 1.5px dashed #93c5fd;
  background: #f8fbff;
  border-radius: 16px;
  padding: 16px;
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #1e3a8a;
}
.cad-drop i { font-size: 22px; color: var(--cor-primaria); }
.cad-drop small { color: var(--text-muted); }

.cad-preview {
  display: flex;
  gap: 10px;
  align-items: center;
  background: #f8fafc;
  border-radius: 12px;
  padding: 8px;
  font-size: 13px;
}
.cad-preview img {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border-radius: 8px;
}
.cad-preview i { font-size: 28px; color: #b91c1c; margin: 0 8px; }

.cad-resumo {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #f8fafc;
  border-radius: 16px;
  padding: 12px 14px;
}
.cad-resumo div { display: grid; grid-template-columns: 108px 1fr; gap: 8px; }
.cad-resumo dt { margin: 0; color: var(--text-muted); font-size: 12px; font-weight: 700; }
.cad-resumo dd { margin: 0; font-size: 14px; }

.cad-erro { margin: 0; color: #b91c1c; font-size: 13px; font-weight: 600; }
.cad-vazio, .cad-loading { margin: 0; color: var(--text-muted); font-size: 13px; text-align: center; padding: 8px; }

@media (max-width: 560px) {
  .cad-escolhas, .cad-escolhas--vinculo { grid-template-columns: 1fr; }
  .card-cadastro:not(.hidden) { max-height: none; min-height: 70vh; }
  .cad-resumo div { grid-template-columns: 1fr; gap: 2px; }
  .cad-acoes { flex-direction: column; }
  .cad-acoes .cad-btn { width: 100%; }
}
