:root {
  color-scheme: light;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: #162b22;
  background: #f3f7f4;
  --green: #136b3d;
  --green-hover: #0c542f;
  --forest: #0d3124;
  --mint: #d9f5e4;
  --canvas: #f3f7f4;
  --paper: #fff;
  --ink: #162b22;
  --muted: #52675b;
  --line: #dbe7df;
  --soft-line: #e8efe9;
  --radius: 1rem;
  --small-radius: .65rem;
  --ease: cubic-bezier(.22,.68,.3,1);
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--green); text-underline-offset: .2em; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
:focus-visible { outline: 3px solid #228650; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3, .metric > strong { letter-spacing: -.035em; }
h1 { font-size: clamp(1.9rem,3.5vw,2.7rem); line-height: 1.08; }
h2 { font-size: 1.125rem; line-height: 1.24; }
h3 { font-size: 1rem; }
.loading { margin: 2rem; color: var(--muted); }

/* Small line icons, drawn with CSS so the CRM can stay offline. */
.icon { display: inline-block; position: relative; flex: 0 0 auto; width: 1rem; height: 1rem; font-size: 1rem; line-height: 1; color: inherit; }
.icon::before, .icon::after { position: absolute; box-sizing: border-box; }
.icon[data-icon="grid"]::before { content: ""; width: .33em; height: .33em; top: .1em; left: .1em; border-radius: .065em; background: currentColor; box-shadow: .46em 0, 0 .46em, .46em .46em; }
.icon[data-icon="kanban"]::before { content: ""; inset: .11em .05em; border: 1.5px solid; border-radius: .14em; }
.icon[data-icon="kanban"]::after { content: ""; top: .3em; left: .34em; width: .09em; height: .37em; background: currentColor; box-shadow: .22em 0; }
.icon[data-icon="spark"]::before { content: ""; inset: .02em; background: currentColor; clip-path: polygon(50% 0, 64% 35%, 100% 50%, 64% 65%, 50% 100%, 36% 65%, 0 50%, 36% 35%); }
.icon[data-icon="users"]::before { content: ""; width: .42em; height: .42em; border: 1.5px solid; border-radius: 50%; top: .04em; left: .23em; }
.icon[data-icon="users"]::after { content: ""; width: .72em; height: .4em; border: 1.5px solid; border-radius: .35em .35em .11em .11em; top: .54em; left: .08em; }
.icon[data-icon="building"]::before { content: ""; inset: .06em .17em .04em; border: 1.5px solid; border-radius: .1em .1em 0 0; }
.icon[data-icon="building"]::after { content: ""; width: .12em; height: .1em; top: .29em; left: .36em; background: currentColor; box-shadow: .21em 0,0 .2em,.21em .2em,.1em .43em; }
.icon[data-icon="calendar"]::before { content: ""; inset: .15em .08em .08em; border: 1.5px solid; border-radius: .16em; }
.icon[data-icon="calendar"]::after { content: ""; top: .37em; left: .16em; width: .68em; height: 1.5px; background: currentColor; }
.icon[data-icon="file"]::before { content: ""; inset: .05em .17em; border: 1.5px solid; border-radius: .15em; }
.icon[data-icon="file"]::after { content: ""; width: .34em; height: 1.5px; left: .33em; top: .37em; background: currentColor; box-shadow: 0 .2em; }
.icon[data-icon="check"]::before { content: ""; inset: .07em; border: 1.5px solid; border-radius: 50%; }
.icon[data-icon="check"]::after { content: ""; width: .4em; height: .23em; top: .32em; left: .3em; border-left: 1.5px solid; border-bottom: 1.5px solid; transform: rotate(-45deg); }
.icon[data-icon="target"]::before, .icon[data-icon="target"]::after { content: ""; border: 1.5px solid; border-radius: 50%; }
.icon[data-icon="target"]::before { inset: .06em; }
.icon[data-icon="target"]::after { inset: .32em; }
.icon[data-icon="sliders"]::before, .icon[data-icon="menu"]::before { content: ""; top: .2em; left: .09em; width: .81em; height: 1.5px; border-radius: .2em; background: currentColor; box-shadow: 0 .25em, 0 .5em; }
.icon[data-icon="sliders"]::after { content: ""; top: .12em; left: .32em; width: .14em; height: .22em; border-radius: .12em; background: currentColor; box-shadow: .29em .25em, .09em .5em; }
.icon[data-icon="bars"]::before { content: ""; inset: .07em .05em .09em; border-left: 1.5px solid; border-bottom: 1.5px solid; border-radius: 0 0 0 .1em; }
.icon[data-icon="bars"]::after { content: ""; right: .15em; bottom: .25em; width: .13em; height: .59em; background: currentColor; box-shadow: -.24em .17em, -.48em .33em; clip-path: inset(0 0 0 -.5em); }
.icon[data-icon="search"]::before { content: ""; width: .58em; height: .58em; left: .08em; top: .08em; border: 1.5px solid; border-radius: 50%; }
.icon[data-icon="search"]::after { content: ""; width: .33em; height: 1.5px; left: .6em; top: .63em; background: currentColor; transform: rotate(45deg); transform-origin: left; }
.icon[data-icon="plus"]::before, .icon[data-icon="plus"]::after { content: ""; inset: calc(50% - .75px) .15em; background: currentColor; border-radius: 1px; }
.icon[data-icon="plus"]::after { transform: rotate(90deg); }

.shell { min-height: 100dvh; display: grid; grid-template-columns: 15rem minmax(0,1fr); }
.sidebar { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; color: #e1f0e7; background: var(--forest); }
.sidebar nav { overflow-y: auto; padding: .25rem .75rem .75rem; scrollbar-color: #54876a transparent; scrollbar-width: thin; }
.brand { display: inline-flex; align-items: center; gap: .72rem; color: #fff; text-decoration: none; font-size: 1.2rem; font-weight: 750; padding: 1.12rem 1.13rem; line-height: 1; width: fit-content; letter-spacing: -.035em; }
.brand small { display: block; color: #b3d9c2; font-size: .65rem; letter-spacing: .17em; margin-top: .35rem; }
.brand-mark { display: flex; position: relative; align-items: flex-end; justify-content: center; gap: 2.5px; background: #8df0ad; color: #0c4d2c; border-radius: .72rem; width: 2.55rem; height: 2.55rem; padding-bottom: .65rem; }
.brand-mark i { width: .24rem; border-radius: 2px; background: currentColor; }
.brand-mark i:nth-child(1) { height: .55rem; }
.brand-mark i:nth-child(2) { height: .82rem; }
.brand-mark i:nth-child(3) { height: 1.13rem; }
.nav-group { padding-bottom: .75rem; }
.nav-group > p { color: #afd0bd; margin: .45rem .58rem .35rem; font-size: .74rem; font-weight: 650; }
.nav-link { position: relative; display: flex; align-items: center; gap: .64rem; min-height: 2.15rem; padding: .4rem .6rem; border-radius: .49rem; color: #dcebe1; text-decoration: none; font-size: .875rem; line-height: 1.15; transition: background .15s var(--ease), color .15s var(--ease); }
.nav-link:hover { background: #1a4936; color: #fff; }
.nav-link[aria-current] { background: #b5f2c6; color: #0e4227; font-weight: 750; }
.sidebar :focus-visible { outline-color: #a1efb7; }
.sidebar-foot { margin-top: auto; display: flex; align-items: center; gap: .65rem; border-top: 1px solid #29513d; padding: .8rem 1rem; font-size: .82rem; }
.sidebar-foot small { display: block; margin-top: .15rem; color: #b1d0be; font-size: .74rem; }
.avatar { flex: none; display: grid; place-items: center; background: #265840; color: #d1f8df; width: 2rem; aspect-ratio: 1; border-radius: .58rem; font-size: .73rem; font-weight: 750; }
.main-shell { min-width: 0; }
.topbar, .catalog-top { display: flex; align-items: center; gap: .75rem; min-height: 3.75rem; padding: .5rem clamp(1rem,3vw,2.5rem); background: var(--paper); border-bottom: 1px solid var(--line); }
.breadcrumb { display: flex; align-items: center; gap: .65rem; color: var(--muted); font-size: .875rem; min-width: 0; }
.breadcrumb strong { color: var(--ink); overflow-wrap: anywhere; }
.breadcrumb [aria-hidden] { color: #7c9183; }
.top-end { margin-left: auto; }
.topbar .top-link { min-height: 2.1rem; white-space: nowrap; }
.menu-toggle, .drawer-backdrop { display: none !important; }
.main, .catalog { margin-inline: auto; max-width: 95rem; padding: clamp(1rem,3vw,2.5rem); display: grid; gap: 1rem; min-width: 0; }
.page-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: .8rem 1rem; padding: .15rem 0 .55rem; }
.page-heading p { margin-top: .55rem; color: var(--muted); line-height: 1.45; }
.actions { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; }
.button { display: inline-flex; width: fit-content; align-items: center; justify-content: center; gap: .45rem; min-height: 2.5rem; padding: .42rem .85rem; border-radius: var(--small-radius); border: 1px solid var(--line); background: var(--paper); color: #254a35; text-decoration: none; font-size: .875rem; font-weight: 650; line-height: 1.2; transition: background .16s var(--ease), border-color .16s var(--ease), transform .12s var(--ease); }
.button:hover { background: #eff8f1; border-color: #a9c9b1; }
.button:active { transform: translateY(1px); }
.button.primary { background: var(--green); color: white; border-color: var(--green); }
.button.primary:hover { background: var(--green-hover); border-color: var(--green-hover); }
.button.small { min-height: 2rem; padding: .24rem .62rem; }
.button.danger { color: #a03330; }
.button.danger:hover { background: #fff0ee; border-color: #efbbb6; }
.button.close { display: grid; width: 2.4rem; min-height: 2.4rem; padding: 0; font-size: 1.4rem; line-height: 1; }

.hero { position: relative; isolation: isolate; overflow: hidden; color: #fff; border-radius: 1.2rem; background: #12683a; background-image: linear-gradient(105deg,#115b35 0%,#127140 65%,#1f854a 100%); min-width: 0; }
.hero-content { position: relative; z-index: 1; padding: clamp(1.35rem,3vw,2.25rem); max-width: 35rem; }
.hero time { display: inline-flex; align-items: center; gap: .45rem; color: #d7f7e2; font-size: .85rem; margin-bottom: .8rem; font-weight: 600; }
.hero time::first-letter { text-transform: uppercase; }
.hero h1 { font-size: clamp(2.5rem,5vw,3.7rem); letter-spacing: -.06em; }
.hero p { color: #ecfff3; margin-top: .5rem; line-height: 1.5; }
.hero .actions { margin-top: 1.2rem; }
.hero-button { background: #d6f9de; color: #10472c; border-color: #d6f9de; }
.hero-button:hover { background: #fff; border-color: #fff; }
.hero-secondary { background: transparent; color: #fff; border-color: #85ba98; }
.hero-secondary:hover { color: #fff; background: #1d7547; border-color: #c3edd2; }
.hero :focus-visible { outline-color: #d7f7e2; }
.architecture { position: absolute; z-index: 0; inset: 0 0 0 auto; width: min(51%,31rem); overflow: hidden; pointer-events: none; }
.architecture i { position: absolute; height: 94%; width: 32%; border: 1px solid #a1efae8c; border-radius: .85rem .85rem 0 0; top: var(--top); left: var(--left); transform: skewY(-21deg); background: repeating-linear-gradient(0deg,transparent 0 1.22rem,#a8f0b73b 1.22rem calc(1.22rem + 1px)),linear-gradient(130deg,#65cf8180,#25854a4a); box-shadow: inset 1.1rem 0 #ccffd41c; }
.architecture i:nth-child(1) { --top: 72%; --left: 0%; opacity: .45; }
.architecture i:nth-child(2) { --top: 60%; --left: 16%; opacity: .58; }
.architecture i:nth-child(3) { --top: 51%; --left: 33%; opacity: .75; }
.architecture i:nth-child(4) { --top: 32%; --left: 54%; }
.architecture i:nth-child(5) { --top: 12%; --left: 73%; }

.metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: .8rem; }
.metric, .panel, .goal { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: 0 1px 2px #112b1810; }
.metric { min-height: 7.8rem; padding: .85rem .95rem; display: grid; align-content: start; gap: .38rem; color: var(--ink); text-decoration: none; }
.metric-link { transition: transform .16s var(--ease), border-color .16s var(--ease), box-shadow .16s var(--ease); }
.metric-link:hover { transform: translateY(-2px); border-color: #9fcaab; box-shadow: 0 6px 16px #173a2211; }
.metric-top { display: flex; align-items: center; gap: .55rem; color: #364e3f; font-size: .875rem; font-weight: 650; line-height: 1.2; }
.metric-icon, .empty-icon, .dialog-icon { display: grid; place-items: center; flex: 0 0 auto; width: 2rem; aspect-ratio: 1; border-radius: .55rem; background: #e4f5e9; color: #176a3e; }
.metric > strong { font-size: clamp(1.2rem,2vw,1.85rem); font-variant-numeric: tabular-nums; line-height: 1.16; overflow-wrap: anywhere; }
.metric small, .panel-title p { color: var(--muted); font-size: .86rem; line-height: 1.35; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(0,1fr); gap: .85rem; }
.panel { overflow: hidden; }
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: .65rem; padding: .95rem 1.05rem; border-bottom: 1px solid var(--soft-line); }
.panel-title p { margin-top: .3rem; }
.panel-title > .button { flex: 0 0 auto; min-height: 2.1rem; }
.bar-list { display: grid; gap: .63rem; padding: .85rem 1.05rem 1rem; }
.bar-line { display: grid; align-items: center; grid-template-columns: minmax(7rem,1.15fr) minmax(0,2fr) 1.65rem; gap: .6rem; font-size: .87rem; }
.bar-line strong { text-align: right; font-variant-numeric: tabular-nums; }
.stage-name { --stage: #458962; display: flex; align-items: center; gap: .45rem; overflow-wrap: anywhere; }
.stage-name::before { content: ""; width: .48rem; height: .48rem; flex: 0 0 auto; background: var(--stage); border-radius: 50%; }
[data-stage="Novo"] { --stage: #44865f; }
[data-stage="Em atendimento"] { --stage: #288090; }
[data-stage="Visita"] { --stage: #6565a6; }
[data-stage="Proposta"] { --stage: #ad751e; }
[data-stage="Fechado"] { --stage: #1d8050; }
[data-stage="Perdido"] { --stage: #ac5852; }
progress { width: 100%; height: .43rem; border: none; border-radius: 1rem; appearance: none; background: #e8f0ea; }
progress::-webkit-progress-bar { background: #e8f0ea; border-radius: 1rem; }
progress::-webkit-progress-value { background: #3d9b60; border-radius: 1rem; }
progress::-moz-progress-bar { background: #3d9b60; border-radius: 1rem; }
.empty { min-height: 9rem; display: grid; place-items: center; align-content: center; gap: .45rem; padding: 1.3rem 1rem; text-align: center; }
.empty-icon { width: 2.65rem; border-radius: .75rem; }
.empty > strong { font-size: .95rem; }
.empty p { color: var(--muted); max-width: 26rem; font-size: .9rem; line-height: 1.4; }
.results-panel .empty { min-height: 15rem; }
.dashboard-grid .empty { min-height: 12rem; }
.item-list, .report-list { list-style: none; margin: 0; padding: .25rem 1rem .65rem; }
.item-list li + li, .report-list li + li { border-top: 1px solid var(--soft-line); }
.item-button { display: grid; gap: .25rem; width: 100%; background: none; border: 0; border-radius: .4rem; text-align: left; padding: .72rem .42rem; color: inherit; }
.item-button:hover { background: #eff8f2; }
.item-button span { color: var(--muted); font-size: .875rem; }
.report-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .68rem .35rem; }
.toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem; padding: .85rem 1rem; }
.report-filter { align-items: end; }
.result-count { margin-left: auto; color: var(--muted); font-size: .875rem; white-space: nowrap; }
input, select, textarea { width: 100%; min-width: 0; min-height: 2.6rem; background: #fff; color: var(--ink); border: 1px solid #bcccbe; border-radius: .57rem; padding: .55rem .65rem; }
input::placeholder, textarea::placeholder { color: #5e7367; }
input:focus, select:focus, textarea:focus { border-color: #348957; }
input[type="checkbox"] { accent-color: var(--green); min-height: auto; width: 1.13rem; height: 1.13rem; flex: 0 0 auto; }
textarea { resize: vertical; }
label { display: grid; gap: .3rem; font-size: .875rem; color: #384e40; font-weight: 650; }
.required { color: #9f362c; }
.search-field { position: relative; width: min(100%,24rem); }
.search-field > .icon { position: absolute; left: .76rem; top: calc(50% - .5rem); color: #53715e; pointer-events: none; }
.search-field > input { padding-left: 2.2rem; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .9rem; }
th, td { padding: .65rem 1rem; border-top: 1px solid var(--soft-line); }
th { white-space: nowrap; color: #385b46; background: #f1f7f2; font-weight: 675; }
td { overflow-wrap: anywhere; min-width: 5.3rem; }
td:first-child { min-width: 8rem; }
tr:nth-child(even) td { background: #fbfdfb; }
tbody tr:hover td { background: #f0f8f2; }
.text-button { text-align: left; font-weight: 700; padding: .1rem 0; border: none; background: none; color: var(--green); overflow-wrap: anywhere; }
.text-button:hover { text-decoration: underline; }
.badge { display: inline-flex; align-items: center; width: fit-content; max-width: 100%; border-radius: 999px; padding: .24rem .56rem; background: #e9f3ed; color: #315642; font-size: .79rem; font-weight: 650; line-height: 1.25; overflow-wrap: anywhere; }
.badge:is([data-status="Quente"],[data-status="Proposta"],[data-status="Enviada"]) { background: #fff0d7; color: #78511e; }
.badge:is([data-status="Frio"],[data-status="Em atendimento"],[data-status="Agendada"]) { background: #e3f2f7; color: #27596e; }
.badge:is([data-status="Fechado"],[data-status="Aceita"],[data-status="Assinado"],[data-status="Concluída"],[data-status="Disponível"]) { background: #ddf4e3; color: #1e5735; }
.badge:is([data-status="Perdido"],[data-status="Cancelada"],[data-status="Cancelado"],[data-status="Recusada"],[data-status="Vencida"]) { background: #fee9e6; color: #854039; }
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(11.15rem,1fr); gap: .72rem; overflow-x: auto; padding-bottom: .65rem; scrollbar-color: #81ab90 #e4eee6; }
.lane { min-height: 15rem; min-width: 0; background: #eaf2ec; border: 1px solid #dce9df; border-radius: .85rem; padding: .55rem; transition: background .14s var(--ease), border-color .14s var(--ease); }
.lane.is-drop-target { background: #d8f2df; border-color: #328554; }
.lane h2 { display: flex; justify-content: space-between; align-items: center; gap: .35rem; padding: .38rem .3rem .64rem; font-size: .9rem; }
.lane-count { display: grid; place-items: center; min-width: 1.46rem; min-height: 1.46rem; border-radius: .48rem; background: #d7e8dc; font-variant-numeric: tabular-nums; }
.lane-empty { color: var(--muted); font-size: .85rem; text-align: center; padding: .75rem .35rem; border: 1px dashed #adc9b6; border-radius: .56rem; }
.lead-card { margin-bottom: .45rem; background: #fff; border: 1px solid #dbe8df; border-radius: .67rem; padding: .66rem; cursor: grab; box-shadow: 0 1px 2px #153b2410; }
.lead-card:active { cursor: grabbing; }
.lead-card p { margin: .3rem 0 .54rem; color: var(--muted); font-size: .85rem; overflow-wrap: anywhere; }
.lead-card > div { display: flex; align-items: center; gap: .38rem; flex-wrap: wrap; font-size: .8rem; }
.goal-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(12rem,100%),1fr)); gap: .6rem; margin: 0 1rem 1rem; }
.goal { display: grid; gap: .45rem; padding: .75rem; background: #f6fbf7; }
.goal span { font-size: .85rem; color: var(--muted); }

dialog { width: min(43rem,calc(100% - 1.4rem)); max-height: calc(100dvh - 1.4rem); padding: 0; color: inherit; border: 1px solid var(--line); border-radius: 1.05rem; box-shadow: 0 15px 60px #0624184d; scrollbar-width: thin; }
dialog::backdrop { background: #092b1c91; }
dialog[open] { display: grid; grid-template-rows: auto minmax(0,1fr) auto; overflow: hidden; animation: dialog-in .18s var(--ease) both; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
.dialog-header, .dialog-actions { display: flex; align-items: center; gap: .6rem; }
.dialog-header { padding: .85rem 1.1rem; border-bottom: 1px solid var(--line); background: white; }
.dialog-body { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.dialog-header .button { margin-left: auto; flex: 0 0 auto; }
.dialog-header p { font-size: .83rem; margin-bottom: .2rem; color: var(--muted); }
.dialog-header h2 { overflow-wrap: anywhere; }
.dialog-icon { width: 2.55rem; border-radius: .68rem; }
.edit-form, .activity { padding: 1rem 1.1rem; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .75rem .85rem; }
.form-grid .wide { grid-column: 1 / -1; }
.form-grid .checkbox { display: flex; align-items: center; align-self: end; min-height: 2.6rem; }
.dialog-actions { border-top: 1px solid var(--line); padding: .75rem 1.1rem; background: white; }
.spacer { flex: 1; }
.form-error { color: #8d251d; background: #fff1ee; border-radius: .55rem; padding: .65rem; margin-top: .65rem; }
.activity { border-top: 1px solid var(--line); background: #f6faf7; display: grid; gap: .6rem; }
.activity h3 { display: flex; align-items: center; gap: .45rem; }
.activity-list article { position: relative; padding: .55rem .55rem .55rem 1.1rem; border-bottom: 1px solid var(--line); }
.activity-list article::before { content: ""; position: absolute; top: .94rem; left: .16rem; background: #33814e; width: .35rem; height: .35rem; border-radius: 50%; }
.activity-list time { color: var(--muted); font-size: .8rem; }
.activity-list p { margin-top: .2rem; white-space: pre-wrap; overflow-wrap: anywhere; }
#toast { display: none; }
#toast.visible { display: block; position: fixed; right: 1rem; bottom: 1rem; z-index: 20; max-width: min(28rem,calc(100vw - 2rem)); padding: .76rem 1rem; border-radius: .65rem; background: #155b35; color: #fff; box-shadow: 0 5px 20px #173b2570; }
#toast.error { background: #8d251d; }

.catalog-top { justify-content: space-between; }
.catalog-top .brand { color: var(--forest); padding: 0; }
.catalog-top .brand small { color: #4a6957; }
.catalog { max-width: 76rem; }
.catalog-hero .hero-content { padding-block: clamp(1.75rem,5vw,3.25rem); }
.catalog-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; }
.catalog-filters { display: flex; gap: .3rem; flex-wrap: wrap; }
.filter-button { min-height: 2.45rem; border: 1px solid var(--line); border-radius: 999px; padding: .3rem .75rem; font-size: .875rem; font-weight: 650; color: var(--green); background: #fff; }
.filter-button:hover { border-color: #a9c9b1; }
.filter-button[aria-pressed="true"] { color: #fff; background: var(--green); border-color: var(--green); }
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(100%,18rem),1fr)); gap: 1rem; }
.catalog-grid > .empty { grid-column: 1 / -1; min-height: 15rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.property-card { min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.property-media { position: relative; aspect-ratio: 16/10; overflow: hidden; background: #dfeee3; }
.property-media img, .property-placeholder { width: 100%; height: 100%; object-fit: cover; display: grid; place-items: center; }
.property-media img { transition: transform .22s var(--ease); }
.property-card:hover img { transform: scale(1.025); }
.property-media > .badge { position: absolute; top: .7rem; left: .7rem; background: #fff; }
.property-placeholder .icon { color: #36764b; width: 2.35rem; height: 2.35rem; font-size: 2.35rem; }
.property-info { display: grid; gap: .45rem; padding: .95rem; overflow-wrap: anywhere; }
.property-info p, .property-info small { color: var(--muted); }
.property-info > strong { color: var(--green); font-size: 1.2rem; }

@media (max-width: 72rem) {
  .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 56rem) {
  .shell { grid-template-columns: minmax(0,1fr); }
  .sidebar { display: none; position: fixed; z-index: 5; left: 0; top: 3.75rem; height: calc(100dvh - 3.75rem); width: min(16rem,86vw); box-shadow: 0 8px 22px #143a2350; }
  .show-nav .sidebar { display: flex; }
  .show-nav .drawer-backdrop { display: block !important; position: fixed; inset: 3.75rem 0 0; background: #0d31246b; z-index: 4; }
  .menu-toggle { display: inline-flex !important; min-height: 2.2rem; padding: .4rem .52rem; }
  .topbar { position: sticky; top: 0; z-index: 6; }
  .hero-content { max-width: 30rem; }
}
@media (max-width: 37rem) {
  .dashboard-grid, .form-grid { grid-template-columns: 1fr; }
  .hero-content { max-width: 100%; }
  .architecture { opacity: .42; width: 42%; }
  .hero { background-image: linear-gradient(106deg,#115b35 0%,#12683a 68%,#177844 100%); }
  .hero h1 { max-width: 12ch; }
  .hero p { max-width: 29ch; }
  .metrics { gap: .55rem; }
  .metric { min-height: 7.4rem; padding: .66rem; }
  .metric-top { gap: .35rem; }
  .metric-icon { width: 1.65rem; }
  .panel-title { flex-wrap: wrap; }
  .dashboard-grid .empty { min-height: 9rem; }
  .breadcrumb > span { display: none; }
  .catalog-toolbar .search-field, .results-panel .search-field { width: 100%; }
  .catalog-toolbar .result-count { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

.inventory-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); background: #e2f2e7; border: 1px solid #cfe5d6; border-radius: var(--radius); }
.inventory-summary > div { padding: .75rem 1rem; display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
.inventory-summary > div + div { border-left: 1px solid #c7e0d0; }
.inventory-summary strong { color: #115536; font-size: 1.4rem; font-variant-numeric: tabular-nums; }
.inventory-summary span { color: #345d46; font-size: .875rem; }
.property-toolbar .search-field { width: min(100%,22rem); }
.property-toolbar > select { width: auto; max-width: 100%; font-size: .875rem; }
.property-cell { display: flex; align-items: center; gap: .7rem; min-width: 13rem; }
.property-thumbnail { display: block; width: 3.05rem; height: 2.75rem; flex: 0 0 auto; border-radius: .5rem; overflow: hidden; background: #e2f1e7; }
.property-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.property-thumbnail .icon { width: 1rem; height: 1rem; font-size: 1rem; }
.property-cell small { display: block; margin-top: .1rem; color: var(--muted); }
.badge[data-status="Rascunho"] { background: #edf1ed; color: #53675b; }

dialog.property-dialog { width: min(67rem,calc(100vw - 1.4rem)); }
.property-dialog .dialog-header { min-height: 4.25rem; }
.dialog-title { min-width: 0; }
.property-dialog .dialog-header > .badge { margin-left: auto; flex: none; }
.property-dialog .dialog-header > .close { margin-left: 0; }
.property-dialog .dialog-body { overflow: hidden; display: grid; }
.property-form { display: grid; grid-template: minmax(0,1fr) auto / 12.6rem minmax(0,1fr); min-height: 0; }
.property-steps { display: flex; flex-direction: column; align-items: stretch; gap: .25rem; min-height: 0; overflow: auto; padding: .85rem .65rem; background: #f1f7f2; border-right: 1px solid var(--line); }
.property-step { display: flex; align-items: center; gap: .55rem; padding: .6rem .55rem; text-align: left; min-height: 2.45rem; border: 1px solid transparent; border-radius: .56rem; background: none; color: #294b36; font-size: .85rem; font-weight: 655; }
.property-step:hover { background: #e3f0e6; }
.property-step[aria-current="step"] { color: #0d532e; background: #d6efdd; border-color: #c0e1cb; font-weight: 750; }
.property-step:focus-visible { outline-offset: -2px; }
.property-fields { min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.property-form [hidden] { display: none !important; }
.property-section { padding: 1.25rem clamp(.9rem,2.8vw,1.65rem) 1.4rem; }
.property-section > header { margin-bottom: 1rem; }
.property-section > header h3 { font-size: 1.45rem; }
.property-section > header p { color: var(--muted); margin-top: .35rem; font-size: .92rem; line-height: 1.45; }
.property-section .form-grid { gap: .85rem .9rem; }
.property-section .property-wide { grid-column: 1 / -1; }
.property-check { display: flex; align-items: center; align-self: end; min-height: 2.6rem; gap: .55rem; padding: .5rem .65rem; border-radius: .57rem; background: #eef7f0; }
.property-check.property-wide { margin-top: .1rem; }
.cep-control { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: .35rem .45rem; align-items: end; }
.cep-button { min-height: 2.6rem; white-space: nowrap; }
.cep-message { grid-column: 1 / -1; font-size: .82rem; color: var(--muted); }
.cep-message:empty { display: none; }
.cep-message[data-tone="error"] { color: #8d251d; }
.cep-message[data-tone="success"] { color: var(--green); }
.map-box { overflow: hidden; border: 1px solid var(--line); border-radius: .7rem; background: #e5eee7; }
.map-surface { height: clamp(14rem,31vw,19rem); isolation: isolate; }
.portfolio-map { min-width: 0; }
.portfolio-map .map-box { margin: .7rem .95rem .95rem; }
.portfolio-map .map-surface { height: clamp(13rem,30vw,17rem); }
.location-map { grid-column: 1 / -1; min-width: 0; display: grid; gap: .55rem; padding: .15rem 0; }
.location-map .map-surface { cursor: crosshair; }
.location-map .leaflet-dragging .map-surface { cursor: grabbing; }
.map-tools { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .45rem; }
.map-tools h4 { margin: 0; font-size: .96rem; }
.map-caption, .map-warning { color: var(--muted); font-size: .84rem; }
.map-warning { padding: .55rem .7rem; background: #fff1d7; color: #734b18; }
.map-pin::before { content: ""; position: absolute; width: 1.22rem; height: 1.22rem; left: .17rem; top: .16rem; transform: rotate(-45deg); background: #167542; border: 2px solid white; border-radius: 50% 50% 50% .16rem; box-shadow: 0 1px 4px #163e35b0; }
.map-pin::after { content: ""; position: absolute; width: .42rem; height: .42rem; left: .59rem; top: .6rem; border-radius: 50%; background: white; }
.map-popup { min-width: 8rem; display: grid; gap: .38rem; font-family: "Segoe UI", system-ui, sans-serif; }
.map-popup p { margin: 0; color: var(--muted); }
.map-popup .button { margin-top: .12rem; }
.icon[data-icon="message"]::before { content: ""; inset: .09em .06em .16em; border: 1.5px solid; border-radius: .23em; }
.icon[data-icon="message"]::after { content: ""; width: .22em; height: .22em; left: .24em; bottom: .09em; transform: skewY(-35deg); border-left: 1.5px solid; border-bottom: 1.5px solid; }
.lead-workspace { display: grid; gap: .55rem; padding: .85rem 1.1rem; background: #f3f8f4; border-bottom: 1px solid var(--line); }
.lead-related { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(12rem,100%),1fr)); gap: .55rem; }
.lead-related:empty { display: none; }
.lead-related h4 { margin: .35rem 0; color: var(--muted); font-size: .84rem; }
.lead-related .item-list { padding: 0; }
.wa-view { display: grid; gap: .8rem; min-width: 0; }
.wa-banner { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .65rem .85rem; background: #edf7ef; }
.wa-banner button { flex: none; }
.wa-state { color: #304e3e; font-size: .875rem; line-height: 1.45; }
.wa-layout { display: grid; grid-template-columns: minmax(14rem,.72fr) minmax(0,1.5fr); gap: .8rem; }
.wa-search { padding: .6rem .75rem; border-bottom: 1px solid var(--soft-line); }
.wa-threads { max-height: 29rem; overflow-y: auto; }
.wa-thread { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: .26rem .35rem; color: var(--ink); padding: .68rem .75rem; border-bottom: 1px solid var(--soft-line); text-decoration: none; }
.wa-thread:hover, .wa-thread[aria-current] { background: #e5f5e9; }
.wa-thread strong,.wa-thread span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-thread span, .wa-thread > small { grid-column: 1/-1; color: var(--muted); font-size: .82rem; }
.wa-thread time { color: var(--muted); font-size: .72rem; }
.wa-conversation { display: grid; align-content: start; min-height: 18rem; }
.wa-recipient { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .45rem; padding: .75rem .85rem; border-bottom: 1px solid var(--soft-line); }
.wa-recipient:empty { display: none; }
.wa-recipient p, .wa-hint, .wa-feedback { color: var(--muted); font-size: .85rem; }
.wa-recipient h2 { overflow-wrap: anywhere; }
.wa-empty { color: var(--muted); padding: 1rem .8rem; font-size: .9rem; }
.wa-messages { height: clamp(13rem,42vh,31rem); overflow-y: auto; display: flex; flex-direction: column; align-items: flex-start; gap: .45rem; padding: .7rem .8rem; background: #f2f7f3; }
.wa-message { display: grid; gap: .35rem; max-width: min(87%,36rem); padding: .55rem .65rem; background: #fff; border: 1px solid var(--line); border-radius: .62rem .62rem .62rem .18rem; }
.wa-message.wa-out { align-self: flex-end; background: #dff4e5; border-radius: .62rem .62rem .18rem .62rem; }
.wa-message p { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .9rem; }
.wa-message small { color: var(--muted); font-size: .72rem; }
.wa-composer { display: grid; gap: .5rem; border-top: 1px solid var(--line); padding: .65rem .8rem; }
.wa-compose-actions { display: flex; align-items: center; justify-content: space-between; gap: .45rem; }
.wa-compose-actions button { flex: none; }
.wa-composer textarea:disabled { background: #f2f5f2; cursor: not-allowed; }
@media (max-width: 47rem) {
  .wa-layout { grid-template-columns: minmax(0,1fr); }
  .wa-threads { max-height: 12rem; }
}
.property-form > .form-error { grid-column: 1 / -1; margin: .35rem .85rem .65rem; padding: .55rem .7rem; }
.choice-set { min-width: 0; margin: 0; padding: .55rem .6rem .65rem; border: 1px solid var(--line); border-radius: .7rem; }
.choice-set legend { padding-inline: .3rem; font-size: .875rem; font-weight: 650; color: #384e40; }
.choice-grid { display: flex; flex-wrap: wrap; gap: .4rem; }
.choice-chip { display: inline-flex; align-items: center; gap: .35rem; min-height: 2rem; padding: .25rem .48rem; border: 1px solid var(--line); border-radius: .5rem; color: #375844; font-size: .84rem; cursor: pointer; }
.choice-chip:has(input:checked) { border-color: #a2cdb0; background: #e3f3e8; color: #164f32; }
.choice-chip input { margin: 0; width: .95rem; height: .95rem; }
.photo-editor { margin-bottom: 1rem; }
.photo-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: .5rem; }
.photo-drop { display: grid; grid-template-columns: auto minmax(0,1fr); gap: .55rem; align-items: center; padding: .8rem; border: 1px dashed #a4c6af; border-radius: .75rem; background: #f5fbf7; color: #26533a; }
.photo-drop.is-drop-target { border-color: #2b8c51; background: #dcf3e2; }
.photo-drop p, .photo-message { color: var(--muted); font-size: .84rem; line-height: 1.4; }
.photo-drop-icon { display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: .55rem; background: #dcefe1; }
.photo-drop input { grid-column: 1 / -1; max-width: 100%; font-size: .875rem; padding: .22rem; min-height: 2.45rem; color: var(--muted); }
.photo-drop input::file-selector-button { margin-right: .45rem; padding: .4rem .55rem; background: #e4f1e8; color: #24553a; border: 0; border-radius: .35rem; font: inherit; font-weight: 650; cursor: pointer; }
.photo-message:empty, .photo-grid:empty { display: none; }
.photo-message { margin-top: .45rem; color: #78511e; overflow-wrap: anywhere; }
.photo-grid { margin-top: .65rem; display: grid; grid-template-columns: repeat(auto-fit,minmax(min(12rem,100%),1fr)); gap: .58rem; }
.photo-tile { min-width: 0; border: 1px solid var(--line); border-radius: .6rem; overflow: hidden; background: #fff; }
.photo-tile-image { position: relative; aspect-ratio: 16 / 9; background: #dfeee3; }
.photo-tile-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-tile-image > .badge { position: absolute; top: .38rem; left: .38rem; background: white; }
.photo-actions { display: flex; flex-wrap: wrap; gap: .24rem; padding: .35rem; }
.photo-actions .button { padding-inline: .38rem; font-size: .78rem; }
.photo-actions .button:disabled { opacity: .42; cursor: default; }
.listing-review { margin-top: 1rem; padding: .8rem .9rem; background: #f1f7f3; border: 1px solid var(--line); border-radius: .65rem; }
.listing-review h4 { margin: 0 0 .4rem; font-size: .9rem; }
.listing-checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: .32rem; }
.listing-checklist li { display: flex; align-items: center; gap: .4rem; font-size: .84rem; color: #395644; }
.listing-checklist small { margin-left: auto; color: var(--muted); }
.check-spot { display: grid; place-items: center; width: 1.1rem; height: 1.1rem; border: 1px solid #b4c4b7; border-radius: 50%; }
.complete .check-spot { border: 0; color: #17643d; }
.catalog-picture { width: 100%; height: 100%; }
.carousel-controls { position: absolute; display: flex; align-items: center; gap: .35rem; right: .45rem; bottom: .45rem; border: 1px solid #ffffff88; border-radius: .55rem; padding: .15rem; background: #153e2ad9; color: white; font-size: .78rem; }
.carousel-controls button { display: grid; place-items: center; min-width: 1.8rem; min-height: 1.65rem; font-size: 1.15rem; line-height: 1; border: 0; border-radius: .38rem; background: transparent; color: white; }
.carousel-controls button:hover { background: #ffffff24; }

@media (max-width: 43rem) {
  .property-form { grid-template: auto minmax(0,1fr) auto / minmax(0,1fr); }
  .property-steps { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); border-right: 0; border-bottom: 1px solid var(--line); padding: .45rem .6rem; }
  .property-step { min-width: 0; line-height: 1.18; }
}
@media (max-width: 37rem) {
  .inventory-summary > div { display: grid; gap: .15rem; padding: .65rem .55rem; }
  .inventory-summary span { font-size: .81rem; }
  .property-toolbar .search-field { width: 100%; }
  .property-dialog .dialog-header { padding-inline: .75rem; gap: .45rem; }
  .property-dialog .dialog-icon { display: none; }
  .property-dialog .dialog-actions { padding-inline: .75rem; }
}
@media (max-width: 29rem) {
  .property-steps { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .property-step { padding: .4rem; min-height: 2.1rem; }
}

/* Celular. Campos com 16px evitam o zoom automático do Safari no iPhone a cada toque. */
@media (pointer: coarse) {
  input, select, textarea, .property-toolbar > select { font-size: 16px; }
}
/* Formulário de imóvel em tela cheia, acompanhando o teclado, com as etapas numa faixa que rola para o lado. */
@media (max-width: 43rem) {
  dialog.property-dialog { width: 100%; max-width: 100%; height: var(--vvh,100dvh); max-height: var(--vvh,100dvh); margin: 0; inset: var(--vvt,0px) 0 auto 0; border: 0; border-radius: 0; }
  .property-steps { display: flex; flex-direction: row; gap: .3rem; overflow-x: auto; overflow-y: hidden; padding: .4rem .6rem; scrollbar-width: none; scroll-snap-type: x proximity; }
  .property-steps::-webkit-scrollbar { display: none; }
  .property-step { flex: 0 0 auto; white-space: nowrap; min-height: 2.25rem; padding: .35rem .6rem; scroll-snap-align: start; }
}
.access-panel { display: grid; gap: .55rem; margin: 1rem 1.1rem; padding: .85rem; border: 1px solid var(--line); border-radius: var(--radius); background: #f3f8f4; }
.access-panel h3, .access-panel p { margin: 0; }
.access-status, .access-copied, .notice-row small, .empty-note { color: var(--muted); font-size: .88rem; }
.access-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.access-link { display: grid; gap: .5rem; }
.access-link:empty { display: none; }
.access-link a.button { text-decoration: none; }
.notices-panel { margin-bottom: .8rem; }
.notice-row { display: grid; gap: .45rem; padding: .6rem 0; }
.audit-view { display: grid; gap: .8rem; }
.empty-note { padding: .85rem 1.05rem; }

/* Abas das listas de imóveis e atendimentos */
.list-tabs { display: flex; flex-wrap: wrap; gap: .5rem .75rem; padding: .85rem 1rem 0; }
.segmented { display: inline-flex; flex-wrap: wrap; gap: .25rem; padding: .25rem; background: var(--canvas); border: 1px solid var(--line); border-radius: 999px; }
.segmented button { display: inline-flex; align-items: center; gap: .4rem; min-height: 2.25rem; padding: .35rem .85rem; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: inherit; font-size: .875rem; font-weight: 600; cursor: pointer; }
.segmented button:hover { color: var(--ink); background: var(--paper); }
.segmented button[aria-pressed="true"] { color: #fff; background: var(--green); }
.segmented button:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.segmented-count { font-variant-numeric: tabular-nums; font-weight: 500; opacity: .8; }
.list-more { display: flex; justify-content: center; padding: 1rem; }
@media (max-width: 40rem) { .list-tabs { padding-inline: .75rem; } .segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; width: 100%; border-radius: .9rem; } .segmented button { justify-content: center; padding-inline: .4rem; border-radius: .7rem; } }
