/* FC Link Studio · estilos do painel (admin e corretor)
   Paleta tirada dos pontos do logo da Florida Connexion: ameixa + verde, laranja e vermelho.
   Cada tipo de save tem a cor de um ponto: lançamento = laranja, empreendimento = verde, listing = vermelho. */
@font-face {
  font-family: 'Baskerville Display';
  src: local('Baskerville Display'),
       local('BaskervilleDisplay'),
       url('/fonts/BaskervilleDisplay.woff2') format('woff2'),
       url('/fonts/BaskervilleDisplay.woff') format('woff'),
       url('/fonts/BaskervilleDisplay.ttf') format('truetype'),
       url('/fonts/BaskervilleDisplay.otf') format('opentype');
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --plum: #29113B; --plum-2: #43215E; --ink: #1E1426; --paper: #F6F3F8; --card: #FFFFFF; --line: #E4DCEA; --muted: #6C6177;
  --green: #6E9A2B; --orange: #E8701E; --red: #D8383E; --focus: #E8701E;
  --t-lancamento: var(--orange); --t-empreendimento: var(--green); --t-listing: var(--red);
  --display: 'Baskerville Display', 'Baskervville', 'Libre Baskerville', Georgia, serif;
  --body: 'Montserrat', system-ui, -apple-system, sans-serif;
  --r-sm: 6px; --r: 10px; --r-lg: 16px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --ink: #F1EAF6; --paper: #150A1E; --card: #20132B; --line: #36254A; --muted: #A698B4; --plum-2: #B79BD0; color-scheme: dark; }
}
:root[data-theme="dark"] { --ink: #F1EAF6; --paper: #150A1E; --card: #20132B; --line: #36254A; --muted: #A698B4; --plum-2: #B79BD0; color-scheme: dark; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15.5px/1.55 var(--body); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); line-height: 1.12; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(26px, 4vw, 34px); font-weight: 700; }
h2 { font-size: 22px; font-weight: 700; }
h3 { font-size: 17px; font-weight: 600; }
p { margin: 0 0 12px; }
small, .muted { color: var(--muted); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.dragging-files::after {
  content: "Solte arquivos aqui para enviar";
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(41, 17, 59, 0.9);
  color: #fff; display: grid; place-items: center;
  font-size: 24px; font-weight: 700; font-family: var(--display);
  border: 4px dashed rgba(255,255,255,0.4); margin: 20px; border-radius: var(--r-lg);
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---- barra superior ---- */
.bar { background: var(--plum); color: #fff; position: relative; overflow: hidden; }
.bar::after { content: ""; position: absolute; right: -40px; top: -30px; width: 260px; height: 260px; background: url(/assets/fc-dots.png) center/contain no-repeat; opacity: .16; pointer-events: none; }
.bar-in { max-width: 1240px; margin: 0 auto; padding: 18px 20px 0; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; position: relative; z-index: 1; }
.bar-logo { height: 34px; width: auto; }
.hello { flex: 1; min-width: 180px; }
.hello b { display: block; font: 700 22px/1.1 var(--display); }
.hello span { font-size: 13.5px; opacity: .75; }
.bar-tools { display: flex; align-items: center; gap: 8px; }
.icon-btn { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22); color: #fff; height: 36px; min-width: 36px; padding: 0 12px; border-radius: 999px; font: 600 14px var(--body); cursor: pointer; }
.icon-btn:hover { background: rgba(255,255,255,.18); }
.avatar { width: 46px; height: 46px; min-width: 46px; min-height: 46px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,.8); background: var(--orange); color: #fff; display: grid; place-items: center; font: 700 16px var(--display); cursor: pointer; padding: 0; overflow: hidden; flex: none; flex-shrink: 0; aspect-ratio: 1 / 1; }
.avatar img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 1 / 1; }
.tabs { max-width: 1240px; margin: 14px auto 0; padding: 0 12px; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; position: relative; z-index: 1; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: none; background: none; border: 0; color: rgba(255,255,255,.72); font: 600 14.5px var(--body); padding: 12px 14px 13px; cursor: pointer; border-bottom: 3px solid transparent; }
.tabs button:hover { color: #fff; }
.tabs button[aria-selected="true"] { color: #fff; border-bottom-color: var(--orange); }

/* ---- layout ---- */
.page { max-width: 1240px; margin: 0 auto; padding: 24px 20px 80px; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 32px; align-items: start; }
.cols.left-phone { grid-template-columns: 360px minmax(0, 1fr); }
@media (max-width: 960px) { .cols, .cols.left-phone { grid-template-columns: 1fr; } }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 16px; }
@media (max-width: 640px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; }
.panel h2 + p, .panel h3 + p { margin-top: 6px; }
.lead { font-size: 16.5px; color: var(--muted); max-width: 40em; margin-top: 6px; }
.section-h { margin: 28px 0 10px; }

/* ---- campos ---- */
label.f { display: block; font-size: 13.5px; font-weight: 600; }
label.f > span.hint { display: block; font-weight: 400; color: var(--muted); margin-top: 2px; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=url], input[type=search], select, textarea {
  display: block; width: 100%; margin-top: 6px; font: 15px var(--body); color: var(--ink); background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--r-sm); padding: 9px 11px;
}
textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--plum-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--plum-2) 22%, transparent); }
input[type=color] { width: 44px; height: 36px; border: 1.5px solid var(--line); border-radius: var(--r-sm); padding: 2px; background: var(--card); }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--plum-2); flex: none; }
.check b { display: block; font-weight: 600; }
.check small { display: block; }

.switch { display: flex; gap: 12px; align-items: center; cursor: pointer; }
.switch input { appearance: none; width: 42px; height: 24px; border-radius: 999px; background: var(--line); position: relative; cursor: pointer; flex: none; transition: background .15s; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.switch input:checked { background: var(--green); }
.switch input:checked::after { transform: translateX(18px); }
.switch input:disabled { opacity: .45; cursor: not-allowed; }

/* ---- botões ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 15px var(--body); padding: 11px 22px; border-radius: 999px; border: 1.5px solid transparent; cursor: pointer; text-decoration: none; background: var(--plum); color: #fff; white-space: nowrap; transition: all .2s; }
:root[data-theme="dark"] .btn:not(.ghost):not(.accent):not(.danger) { background: #fff; color: var(--plum); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn:not(.ghost):not(.accent):not(.danger) { background: #fff; color: var(--plum); } }
.btn:hover { filter: brightness(1.1); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.btn:active { transform: translateY(0); }
.btn.accent { background: var(--orange); color: #fff; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--muted); background: rgba(0,0,0,0.02); }
.btn.danger { background: transparent; color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, transparent); }
.btn.big { padding: 16px 28px; font-size: 16.5px; width: auto; min-width: 200px; border-radius: var(--r-lg); }
.btn.sm { padding: 7px 14px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; filter: none; transform: none; box-shadow: none; }

.drop { position: relative; transition: all .2s cubic-bezier(0.4, 0, 0.2, 1); }
.drop.over { border-color: #7C3AED !important; background: rgba(124, 58, 237, 0.04) !important; transform: scale(1.005); box-shadow: 0 15px 35px -5px rgba(124, 58, 237, 0.1); }
.drop svg, .drop i { transition: transform .3s ease; }
.drop.over svg, .drop.over div { transform: translateY(-5px); }

#n-ai { position: relative; overflow: hidden; }
#n-ai svg { filter: drop-shadow(0 0 2px rgba(255,255,255,0.3)); }
#n-ai:hover svg { animation: ai-bounce 0.6s infinite alternate; }

@keyframes ai-bounce {
  from { transform: translateY(0) scale(1); }
  to { transform: translateY(-2px) scale(1.1); }
}
.linkbtn { background: none; border: 0; padding: 0; color: var(--plum-2); font: 600 14px var(--body); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

.seg { display: inline-flex; background: var(--paper); border: 1.5px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; font: 600 14px var(--body); color: var(--muted); padding: 7px 14px; border-radius: 999px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(30,20,38,.18); }

/* ---- tipos de save: os pontos do logo ---- */
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--t, var(--muted)); flex: none; }
.t-lancamento { --t: var(--t-lancamento); }
.t-empreendimento { --t: var(--t-empreendimento); }
.t-listing { --t: var(--t-listing); }
.type-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink); }
.pill { display: inline-block; font-size: 12.5px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); color: var(--muted); }
.pill.on { background: color-mix(in srgb, var(--green) 16%, transparent); color: var(--green); border-color: transparent; }
.pill.off { background: color-mix(in srgb, var(--red) 12%, transparent); color: var(--red); border-color: transparent; }

/* seletor de saves do corretor */
.saves { max-width: 1240px; margin: 0 auto; padding: 18px 20px 0; }
.saves-track { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.save-chip { flex: none; display: flex; gap: 10px; align-items: center; text-align: left; background: var(--card); border: 1.5px solid var(--line); border-radius: var(--r); padding: 7px 14px 7px 7px; cursor: pointer; font: inherit; color: var(--ink); max-width: 300px; }
.save-chip img, .save-chip .ph { width: 46px; height: 46px; border-radius: 7px; object-fit: cover; background: var(--paper); flex: none; }
.save-chip b { display: block; font-size: 14.5px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 210px; }
.save-chip small { display: flex; gap: 6px; align-items: center; font-size: 12.5px; }
.save-chip[aria-pressed="true"] { border-color: var(--t); box-shadow: inset 0 0 0 1px var(--t); }

/* ---- celular ---- */
.phone-wrap { position: sticky; top: 16px; }
@media (max-width: 960px) { .phone-wrap { position: static; } .phone { width: 300px; } }
.phone { width: 330px; max-width: 100%; margin: 0 auto; aspect-ratio: 9 / 18.6; background: #111; border-radius: 46px; padding: 11px; box-shadow: 0 24px 60px -24px rgba(41,17,59,.55); position: relative; }
.phone::before { content: ""; position: absolute; top: 19px; left: 50%; width: 92px; height: 24px; margin-left: -46px; background: #111; border-radius: 999px; z-index: 2; }
.phone-screen { width: 100%; height: 100%; border-radius: 36px; overflow: hidden; background: #fff; position: relative; }
.phone-screen iframe { width: 100%; height: 100%; border: 0; display: block; }
.phone-tabs { display: flex; justify-content: center; margin-bottom: 12px; }
.phone-full { position: absolute; top: -8px; right: 6px; z-index: 3; width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--orange); color: #fff; font-size: 17px; cursor: pointer; box-shadow: 0 4px 10px rgba(0,0,0,.25); }

/* WhatsApp simulado */
.wa { height: 100%; background: #EFE7DD; display: flex; flex-direction: column; font: 13px/1.35 system-ui, sans-serif; color: #111; }
.wa-top { background: #F6F6F6; padding: 38px 12px 8px; display: flex; gap: 8px; align-items: center; border-bottom: 1px solid #ddd; }
.wa-top i { width: 30px; height: 30px; border-radius: 50%; background: #cfd4d8; display: block; }
.wa-top b { display: block; font-size: 14px; }
.wa-top small { color: #777; }
.wa-body { flex: 1; padding: 12px 10px; overflow: auto; }
.wa-day { text-align: center; margin: 0 0 10px; }
.wa-day span { background: #fff; padding: 3px 10px; border-radius: 6px; font-size: 11.5px; color: #555; }
.wa-msg { background: #D9FDD3; margin-left: auto; max-width: 92%; border-radius: 9px 2px 9px 9px; padding: 4px; box-shadow: 0 1px 1px rgba(0,0,0,.12); }
.wa-card { background: #CDEFC6; border-radius: 6px; overflow: hidden; }
.wa-card .img { position: relative; aspect-ratio: 1.91 / 1; background: #ccc center/cover; }
.wa-card .img img { position: absolute; right: 8px; bottom: 8px; width: 36px; height: 36px; min-width: 36px; min-height: 36px; max-width: 36px; max-height: 36px; border-radius: 50%; border: 2px solid #fff; object-fit: cover; aspect-ratio: 1 / 1; display: block; flex-shrink: 0; box-shadow: 0 2px 6px rgba(0,0,0,0.25); }
.wa-broker-avatar { position: absolute; right: 8px; bottom: 8px; width: 36px; height: 36px; min-width: 36px; min-height: 36px; max-width: 36px; max-height: 36px; border-radius: 50%; border: 2px solid #fff; overflow: hidden; background: var(--paper); box-shadow: 0 2px 6px rgba(0,0,0,0.25); display: block; flex-shrink: 0; }
.wa-broker-avatar img { position: static; width: 100%; height: 100%; min-width: 100%; min-height: 100%; max-width: 100%; max-height: 100%; border-radius: 50%; border: none; object-fit: cover; aspect-ratio: 1 / 1; display: block; box-shadow: none; }
.wa-card .meta { padding: 6px 8px 7px; }
.wa-card .meta b { display: block; font-size: 13px; }
.wa-card .meta span { display: block; color: #555; font-size: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wa-card .meta small { color: #667; font-size: 11.5px; }
.wa-text { padding: 6px 6px 2px; word-break: break-word; }
.wa-text a { color: #0b72c6; }
.wa-time { text-align: right; font-size: 10.5px; color: #667; padding: 0 6px 2px; }

/* ---- passos do construtor ---- */
.steps { display: flex; gap: 8px; margin: 18px 0; counter-reset: st; }
.steps button { flex: 1; text-align: left; background: var(--card); border: 1.5px solid var(--line); border-radius: var(--r); padding: 10px 12px; font: 600 14px var(--body); color: var(--muted); cursor: pointer; counter-increment: st; }
.steps button::before { content: counter(st); display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--paper); margin-right: 8px; font-size: 12.5px; }
.steps button[aria-current="step"] { color: var(--ink); border-color: var(--plum-2); }
.steps button[aria-current="step"]::before { background: var(--orange); color: #fff; }
.steps button.done::before { content: "✓"; background: var(--green); color: #fff; }

.group { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 16px; }
.group-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.item-row { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.item-row:last-child { border-bottom: 0; }
.item-row .check { flex: 1; padding: 0; }
.valtag { font-size: 11.5px; font-weight: 700; color: var(--orange); margin-left: 6px; }

.callout { background: color-mix(in srgb, var(--orange) 9%, var(--card)); border: 1px solid color-mix(in srgb, var(--orange) 30%, transparent); border-radius: var(--r); padding: 12px 14px; font-size: 14.5px; }
.result { border: 2px solid var(--green); border-radius: var(--r-lg); padding: 18px; background: color-mix(in srgb, var(--green) 7%, var(--card)); }
.urlbox { font: 14px/1.4 ui-monospace, Consolas, monospace; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; word-break: break-all; }

/* listas */
.list { list-style: none; padding: 0; margin: 0; }
.list > li { padding: 14px 0; border-top: 1px solid var(--line); }
.list > li:first-child { border-top: 0; }
.stat { display: flex; flex-direction: column; }
.stat b { font: 700 30px/1 var(--display); }
.stat span { font-size: 13.5px; color: var(--muted); margin-top: 6px; }

/* cards de save no admin */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.scard { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; cursor: pointer; text-align: left; padding: 0; font: inherit; color: inherit; display: flex; flex-direction: column; }
.scard:hover { border-color: var(--t, var(--muted)); }
.scard .cv { aspect-ratio: 16 / 9; background: var(--paper) center/cover; position: relative; }
.scard .cv .pill { position: absolute; top: 10px; right: 10px; background: var(--card); }
.scard .bd { padding: 12px 14px 14px; }
.scard .bd b { display: block; font: 600 16.5px/1.25 var(--display); margin: 6px 0 2px; }

/* dialog */
dialog { border: 0; border-radius: var(--r-lg); padding: 0; background: var(--card); color: var(--ink); width: min(560px, calc(100vw - 32px)); box-shadow: 0 30px 80px -20px rgba(0,0,0,.5); }
dialog::backdrop { background: rgba(21,10,30,.55); }
.dlg { padding: 22px; }
.dlg-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 11px 18px; border-radius: 999px; font-weight: 600; z-index: 100; box-shadow: 0 10px 30px rgba(0,0,0,.25); max-width: calc(100vw - 32px); }
.toast.err { background: var(--red); color: #fff; }
.empty { text-align: center; padding: 34px 16px; color: var(--muted); }
.empty b { display: block; color: var(--ink); font: 600 18px var(--display); margin-bottom: 6px; }

/* unidades */
.units { display: grid; grid-template-columns: repeat(auto-fill, minmax(50px, 1fr)); gap: 6px; }
.unit { border: 0; border-radius: 6px; padding: 10px 0; font: 700 13px var(--body); color: #fff; cursor: pointer; background: var(--c); }
.u-available { --c: #2F8F4E; } .u-pending { --c: #D88A1E; } .u-sold { --c: #B8423B; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 14px; }
.legend span::before { content: ""; display: inline-block; width: 11px; height: 11px; border-radius: 3px; background: var(--c); margin-right: 6px; vertical-align: -1px; }

details.faq { border-top: 1px solid var(--line); padding: 12px 0; }
details.faq summary { font-weight: 600; cursor: pointer; }
details.faq p { margin: 8px 0 0; color: var(--muted); max-width: 46em; }

/* ---- thumbnails e categorização manual ---- */
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.thumbs figure { position: relative; margin: 0; aspect-ratio: 1; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.thumbs figure img { width: 100%; height: 100%; object-fit: cover; }
.thumbs figure button[data-d-rm], .thumbs figure button[data-rm] { position: absolute; top: 4px; right: 4px; background: rgba(0,0,0,0.5); color: #fff; border: 0; border-radius: 50%; width: 22px; height: 22px; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 16px; line-height: 1; z-index: 10; }
.thumbs figure figcaption { position: absolute; bottom: 0; left: 0; right: 0; padding: 4px 6px; font-size: 11px; font-weight: 700; text-align: center; color: #fff; background: rgba(0,0,0,0.5); }
.thumbs figure .cat-picker { position: absolute; top: 4px; left: 4px; display: flex; gap: 4px; background: rgba(0,0,0,0.65); padding: 3px; border-radius: 6px; opacity: 0; transition: opacity 0.2s; z-index: 10; }
.thumbs figure:hover .cat-picker { opacity: 1; }
.thumbs figure .cat-picker button { position: static; border: 0; background: none; font-size: 14px; padding: 2px 4px; cursor: pointer; border-radius: 4px; filter: grayscale(1); width: auto; height: auto; transition: all 0.2s; }
.thumbs figure .cat-picker button:hover { background: rgba(255,255,255,0.25); filter: grayscale(0.5); }
.thumbs figure .cat-picker button.on { filter: none; background: rgba(255,255,255,0.35); box-shadow: 0 0 0 1px rgba(255,255,255,0.2); }
