/*
 * Obras365 module navigation contract.
 *
 * This is intentionally shared by the main application and the dedicated
 * Condomínios page. Keep dimensions and interaction states here so the
 * navigation cannot drift again between modules.
 */
@view-transition {
  navigation: auto;
}

.o365-aside {
  view-transition-name: o365-sidebar;
}

.o365-topbar {
  view-transition-name: o365-topbar;
}

.o365-module-bar,
.cond-nav {
  view-transition-name: o365-module-navigation;
}

::view-transition-old(o365-sidebar),
::view-transition-new(o365-sidebar),
::view-transition-old(o365-topbar),
::view-transition-new(o365-topbar),
::view-transition-old(o365-module-navigation),
::view-transition-new(o365-module-navigation) {
  animation-duration: 140ms;
  animation-timing-function: ease-out;
}

.o365-module-bar,
.cond-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin: 0 0 14px;
}

.o365-main-tabs,
.mtabs {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 0 2px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  flex-wrap: nowrap !important;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.o365-main-tabs::-webkit-scrollbar,
.mtabs::-webkit-scrollbar {
  display: none;
}

/* MEDIDA CANÔNICA DA PÍLULA — fonte única para o app principal e para
 * /condominios. Antes o app sobrescrevia isto com
 * `.o365-family-shell .o365-module-pill{gap:6px;padding:9px 10px;font-size:12px}`
 * e a página de Condomínios (que não tem o wrapper .o365-family-shell) ficava com
 * pílulas visivelmente maiores que as dos demais módulos. Mexer aqui muda os dois. */
.o365-module-pill,
.o365-main-tabs > .o365-module-pill,
.mpill {
  appearance: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  min-height: 42px !important;
  padding: 9px 10px !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 11px !important;
  background: #fff;
  color: #475569;
  font: 600 12px/1 'Geist', system-ui, sans-serif !important;
  letter-spacing: 0 !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  cursor: pointer !important;
  flex: 0 0 auto !important;
  transition: background-color .16s ease, border-color .16s ease,
    color .16s ease, box-shadow .16s ease, transform .16s ease !important;
}

.o365-module-pill:hover,
.mpill:hover {
  border-color: #cbd5e1 !important;
  color: #0f172a;
  transform: translateY(-1px);
}

.o365-module-pill:focus-visible,
.mpill:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .22) !important;
  outline-offset: 2px !important;
}

.o365-module-pill svg,
.mpill svg {
  display: block;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.mpill.on,
.o365-module-pill.is-active {
  border-color: #0f172a !important;
  background: #0f172a !important;
  color: #fff !important;
  box-shadow: 0 10px 22px -12px rgba(15, 23, 42, .5) !important;
}

.o365-module-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

@media (max-width: 1100px) {
  .o365-module-bar,
  .cond-nav {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .o365-main-tabs,
  .mtabs {
    flex-basis: 100% !important;
  }
}

@media (max-width: 760px) {
  .o365-module-bar,
  .cond-nav {
    gap: 6px;
    margin-bottom: 10px;
  }

  .o365-module-pill,
  .o365-main-tabs > .o365-module-pill,
  .mpill {
    min-height: 38px !important;
    padding: 8px 11px !important;
    font-size: 11.5px !important;
  }
}

/* ============================================================
 * BARRA PADRÃO DE MÓDULO — [busca] [ordenação] [quantidade]
 * Medidas da barra de Residenciais/Comerciais/Grandes Obras
 * (card 47px · busca 33px · select 30px). Usada por TODOS os
 * módulos: Obras, Arquitetos, Construtoras, Prestadores,
 * Contratantes e Condomínios. Mexeu aqui, mexeu em todos.
 * ============================================================ */
.o365-modbar {
  display: flex; gap: 9px; flex-wrap: wrap; align-items: center;
  background: #fff; border: 1px solid #E6EBF2; border-radius: 12px;
  padding: 6px; margin-bottom: 10px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.o365-modbar-search {
  display: flex; align-items: center; gap: 8px; flex: 1; min-width: 160px;
  padding: 6px 11px; background: #F8FAFC; border: 1px solid #E2E8F0;
  border-radius: 9px; color: #94A3B8;
}
.o365-modbar-search input {
  border: 0; outline: none; background: transparent; flex: 1;
  min-width: 0; min-height: 0; font-size: 13px; color: #334155;
  font-family: 'Geist', system-ui, sans-serif;
}
.o365-modbar select {
  min-height: 0; padding: 6px 30px 6px 11px; background: #fff;
  border: 1px solid #E2E8F0; border-radius: 9px; font-size: 12.5px;
  font-weight: 600; color: #334155; cursor: pointer;
  font-family: 'Geist', system-ui, sans-serif; min-width: 170px;
  height: 30px; /* trava a paridade exata com o select de ordenação de Obras */
}
.o365-obras-toolbar #obf-sort {
  background-color: #fff !important;
  color: #334155 !important;
  -webkit-text-fill-color: #334155;
  color-scheme: light;
  opacity: 1;
}
.o365-obras-toolbar #obf-sort option {
  background: #fff;
  color: #334155;
  -webkit-text-fill-color: #334155;
}
.o365-modbar-count { font-size: 12px; color: #64748B; white-space: nowrap; }
.o365-modbar-count b { color: #0F172A; font-weight: 700; }
/* pílulas/toggles que moram na barra (ex.: "Mais recorrentes", "Sem CRM") */
.o365-modbar-toggle {
  min-height: 0 !important; padding: 6px 11px !important;
  font-size: 12px !important; border-radius: 9px !important;
}

/* Sidebar de filtros: mesmas alturas de controle do painel de Obras
 * (34px · padding 8px 11px · 12.5px) em todos os módulos. */
.o365-faside-std input:not([type=range]):not([type=checkbox]):not([type=radio]),
.o365-faside-std select {
  min-height: 0 !important; height: 34px !important; padding: 8px 11px !important;
  font-size: 12.5px !important; border-radius: 9px !important;
  box-sizing: border-box;
}
/* campos de data/varios-por-linha continuam livres para crescer se precisarem */
.o365-faside-std textarea { height: auto !important; }
.o365-faside-std select { padding-right: 30px !important; }

/* ============================================================
 * CHIP DE FILTRO — CHASSI ÚNICO  (06/09/2026 · sessao-chips)
 * Um chip. Um chassi. A cor é ACENTO, não é outro componente.
 * Substitui as fabricas de estilo inline espalhadas pelo dc.html
 * (fchip, gchip, _flagPill, _ux2Chip, activeWorksStyle, pilulas de
 * universo, rnd*Chip...). A geometria mora AQUI: nenhum `style=`
 * inline pode mais mandar em altura/raio/fonte/padding.
 * Medidas herdadas da .o365-module-pill (linhas 71-120) — o chip e a
 * pilula de modulo em escala menor, e nao um oitavo dialeto.
 * Ganho de brinde: ate hoje NENHUM chip tinha hover nem foco de
 * teclado (o atributo style-hover do dc.html e morto: 137 usos, zero
 * handler no support.js e zero regra em CSS).
 * ============================================================ */
.o365-fchip{
  --fchip-accent:#0F172A;
  --fchip-glow:rgba(15,23,42,.45);
  appearance:none;
  display:inline-flex; align-items:center; justify-content:center; gap:6px;
  min-height:32px; height:32px; padding:0 11px;
  box-sizing:border-box;
  border:1px solid #E2E8F0; border-radius:999px;
  background:#fff; color:#475569;
  font:700 11px/1 Geist, system-ui, sans-serif; letter-spacing:0;
  white-space:nowrap; text-decoration:none; cursor:pointer; user-select:none;
  box-shadow:0 1px 2px rgba(15,23,42,.04);
  transition:background-color .16s ease, border-color .16s ease,
             color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.o365-fchip:hover{ border-color:#CBD5E1; color:#0F172A; transform:translateY(-1px); }
.o365-fchip:focus-visible{ outline:3px solid rgba(37,99,235,.22); outline-offset:2px; }
.o365-fchip:active{ transform:translateY(0); }

/* ATIVO — 3 gatilhos, para casar com o markup que ja existe */
.o365-fchip.is-on,
.o365-fchip[aria-pressed="true"],
.o365-fchip[data-on="1"]{
  border-color:var(--fchip-accent);
  background:var(--fchip-accent);
  color:#fff;
  box-shadow:0 10px 22px -12px var(--fchip-glow);
}
.o365-fchip.is-on:hover,
.o365-fchip[aria-pressed="true"]:hover,
.o365-fchip[data-on="1"]:hover{
  color:#fff; transform:translateY(-1px);
  box-shadow:0 12px 26px -12px var(--fchip-glow);
}

/* DESABILITADO */
.o365-fchip:disabled,
.o365-fchip[aria-disabled="true"]{
  background:#F8FAFC; border-color:#EEF2F7; color:#CBD5E1;
  cursor:not-allowed; box-shadow:none; transform:none; pointer-events:none;
}

/* CONTADOR (usa o gap:6px ja previsto) */
.o365-fchip .o365-fchip-n{
  flex:0 0 auto; padding:2px 5px; border-radius:999px;
  font:700 10px/1 Geist Mono, ui-monospace, monospace;
  font-variant-numeric:tabular-nums;
  background:#F1F5F9; color:#64748B;
}
.o365-fchip.is-on .o365-fchip-n,
.o365-fchip[aria-pressed="true"] .o365-fchip-n,
.o365-fchip[data-on="1"] .o365-fchip-n{ background:rgba(255,255,255,.22); color:#fff; }

/* PONTO DE ACENTO (pilulas de universo em repouso) */
.o365-fchip .o365-fchip-dot{
  flex:0 0 6px; width:6px; height:6px; border-radius:50%;
  background:var(--fchip-accent);
}
.o365-fchip.is-on .o365-fchip-dot,
.o365-fchip[aria-pressed="true"] .o365-fchip-dot,
.o365-fchip[data-on="1"] .o365-fchip-dot{ background:#fff; }

/* REMOVIVEL (x embutido) */
.o365-fchip.is-removable{ padding-right:5px; }
.o365-fchip .o365-fchip-x{
  flex:0 0 18px; width:18px; height:18px; border-radius:50%;
  display:inline-flex; align-items:center; justify-content:center;
  background:rgba(15,23,42,.06); color:inherit;
  font:700 12px/1 Geist, sans-serif;
  transition:background-color .16s ease;
}
.o365-fchip:hover .o365-fchip-x{ background:rgba(15,23,42,.12); }
.o365-fchip.is-on .o365-fchip-x,
.o365-fchip[data-on="1"] .o365-fchip-x{ background:rgba(255,255,255,.22); }

/* SEGMENTADO (selecao unica) */
.o365-fchip-seg{
  display:inline-flex; align-items:stretch;
  border:1px solid #E2E8F0; border-radius:999px; overflow:hidden;
  background:#fff; box-shadow:0 1px 2px rgba(15,23,42,.04);
}
.o365-fchip-seg .o365-fchip{ border:0; border-radius:0; box-shadow:none; }
.o365-fchip-seg .o365-fchip:hover{ transform:none; background:#F8FAFC; }
.o365-fchip-seg .o365-fchip + .o365-fchip{ box-shadow:inset 1px 0 0 #EEF2F7; }
.o365-fchip-seg .o365-fchip.is-on,
.o365-fchip-seg .o365-fchip[aria-pressed="true"],
.o365-fchip-seg .o365-fchip[data-on="1"]{ box-shadow:none; transform:none; }

/* MODIFICADORES SEMANTICOS — so trocam o acento */
.o365-fchip--ink   { --fchip-accent:#0F172A; --fchip-glow:rgba(15,23,42,.45); }
.o365-fchip--blue  { --fchip-accent:#2563eb; --fchip-glow:rgba(37,99,235,.45); }
.o365-fchip--indigo{ --fchip-accent:#4338ca; --fchip-glow:rgba(67,56,202,.45); }
.o365-fchip--pink  { --fchip-accent:#DB2777; --fchip-glow:rgba(219,39,119,.45); }
.o365-fchip--teal  { --fchip-accent:#0d9488; --fchip-glow:rgba(13,148,136,.45); }
.o365-fchip--pine  { --fchip-accent:#0f766e; --fchip-glow:rgba(15,118,110,.45); }
.o365-fchip--amber { --fchip-accent:#c2410c; --fchip-glow:rgba(194,65,12,.45); }
.o365-fchip--slate { --fchip-accent:#64748B; --fchip-glow:rgba(100,116,139,.40); }

/* 07/09/2026 (cond-filtros v3): .o365-fsection era o ROTULO (Geist Mono) usado como CAIXA no rail de
   Condominios — tudo dentro (labels, inputs, summaries) herdava monoespacado. Agora e conteiner neutro em
   Geist; o kicker mono vive so em .o365-flabel (rotulos e <summary>). */
.o365-fsection{display:block;margin:14px 0 6px;font-family:Geist,system-ui,sans-serif;font-size:12.5px;font-weight:400;letter-spacing:0;text-transform:none;color:#334155}
.o365-flabel{display:block;font-family:'Geist Mono',ui-monospace,monospace;font-size:9.5px;font-weight:700;letter-spacing:.12em;color:#94A3B8;text-transform:uppercase;margin:0 0 6px}
.o365-faside-std details.o365-fsection>summary.o365-flabel{cursor:pointer;margin:0 0 6px}
.o365-fsection .o365-fchip{letter-spacing:0;text-transform:none}
.o365-fsection .o365-fchip .o365-fchip-n{letter-spacing:0}
/* <select>/<input>/<button> nao herdam font-family da UA stylesheet: cond:cidade e cond:sort saiam em Arial */
.o365-fsection select,.o365-fsection input,.o365-fsection button{font-family:inherit}
.o365-faside-std details>summary{list-style:none;cursor:pointer}
.o365-faside-std details>summary::-webkit-details-marker{display:none}

@media (max-width:760px){
  .o365-fchip{ min-height:44px!important; height:44px!important; padding:0 14px; font-size:12px; }
  .o365-fchip .o365-fchip-x{ flex:0 0 22px; width:22px; height:22px; }
  .o365-faside-std input:not([type=range]):not([type=checkbox]):not([type=radio]),
  .o365-faside-std select{ height:44px!important; min-height:44px!important; }
}
@media (prefers-reduced-motion:reduce){
  .o365-fchip{ transition:none; }
  .o365-fchip:hover, .o365-fchip.is-on:hover{ transform:none; }
}

/* Edifícios: componentes e tipografia do restante do app. */
.o365-cond-filters .o365-flabel{font-family:Geist,system-ui,sans-serif;font-size:11px;letter-spacing:.03em;font-weight:700;color:#475569}
.o365-cond-filters .o365-fsection{border-top:1px solid #eef2f6;padding-top:14px;margin-top:16px}
.o365-cond-filters .o365-fsection .o365-fsection{border-top:0;margin-top:8px;padding-top:0}
.o365-cond-filters summary.o365-flabel{display:flex;align-items:center;justify-content:space-between;padding:4px 0}
.o365-cond-filters summary.o365-flabel::after{content:'+';font-size:16px;color:#64748b}
.o365-cond-filters details[open]>summary.o365-flabel::after{content:'−'}
.o365-cond-filters .o365-fchip{font-family:Geist,system-ui,sans-serif;font-size:11px}
