/* Real Estate · glacom® — chat stile ChatGPT, tema chiaro fisso, sidebar conversazioni */
:root { color-scheme: light; --accent:#001ba0; --accent2:#00c9ec; --bg:#fff; --side:#f6f7fb; --card:#fff; --text:#1a1d29; --muted:#6b7080; --line:#e4e6ef; --ok:#0a8f5b; --warn:#b25e00; --bad:#b3261e; --user:#e8ecff; --soft:#f6f7fb; }
* { box-sizing:border-box; }
html,body { margin:0; height:100%; background:var(--bg); color:var(--text); font:15px/1.45 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif; }
body { display:flex; height:100vh; overflow:hidden; }
/* sidebar */
.side { width:270px; flex:0 0 270px; background:var(--side); border-right:1px solid var(--line); display:flex; flex-direction:column; height:100vh; }
.side-head { display:flex; align-items:center; justify-content:space-between; padding:14px 14px 8px; }
.brand { display:flex; align-items:center; gap:10px; font-weight:700; font-size:16px; white-space:nowrap; text-decoration:none; color:var(--text); }
.glogo { height:26px; display:block; }
.logo { display:inline-grid; place-items:center; width:30px; height:30px; border-radius:9px; background:var(--accent); color:#fff; font-weight:800; }
.by { color:var(--muted); font-weight:500; font-size:12.5px; }
.newbtn { margin:6px 12px 10px; display:flex; align-items:center; gap:8px; border:1px solid var(--line); background:#fff; border-radius:10px; padding:9px 12px; font:inherit; font-weight:600; cursor:pointer; color:var(--text); }
.newbtn:hover { border-color:var(--accent); }
.side-title { font-size:11.5px; letter-spacing:.06em; text-transform:uppercase; color:var(--muted); padding:6px 16px; }
.convs { flex:1; overflow:auto; padding:0 8px; }
.conv { display:block; width:100%; text-align:left; border:0; text-decoration:none; background:transparent; border-radius:9px; padding:8px 10px; margin-bottom:2px; cursor:pointer; font:inherit; color:var(--text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.conv:hover { background:#eceef5; } .conv.active { background:#e3e7fb; color:var(--accent); font-weight:600; }
.conv .d { display:block; font-size:11.5px; color:var(--muted); font-weight:400; }
.side-foot { padding:10px 16px 14px; border-top:1px solid var(--line); display:flex; flex-direction:column; gap:5px; font-size:13.5px; } .side-foot a { color:var(--accent); text-decoration:none; } .side-foot b { font-size:14px; }
.topnav { display:flex; gap:4px; align-items:center; margin-left:8px; overflow:hidden; } .topnav a { color:var(--text); text-decoration:none; font-size:13.5px; padding:6px 9px; border-radius:8px; white-space:nowrap; } .topnav a:hover { background:var(--soft); }
.topnav a.cta { background:var(--accent); color:#fff; font-weight:600; } .topnav a.cta:hover { background:#0a2be0; } .topnav a.phone, .topnav a.mail { color:var(--muted); }
.cols { flex:1; display:flex; min-height:0; }
.maincol { flex:1; min-width:0; display:flex; flex-direction:column; overflow:auto; }
.panel { width:38%; max-width:560px; border-left:1px solid var(--line); display:flex; flex-direction:column; background:var(--soft); min-height:0; }
.panel-head { display:flex; justify-content:space-between; gap:8px; padding:10px 14px; font-size:13.5px; border-bottom:1px solid var(--line); background:#fff; } .panel-head span { color:var(--muted); font-size:12.5px; }
#pmap { flex:1; } .legend { font-size:11.5px; color:var(--muted); padding:6px 14px; background:#fff; border-top:1px solid var(--line); }
.recent { margin-top:26px; } .recent .side-title { text-align:left; padding-left:0; } .zones { display:flex; flex-wrap:wrap; gap:6px; justify-content:center; margin-top:8px; } .zones span { font-size:12px; color:var(--muted); border:1px solid var(--line); border-radius:6px; padding:2px 8px; }
#side-close { display:none; }
.side-nav { display:none; flex-direction:column; padding:4px 12px 10px; gap:2px; } .side-nav a { color:var(--text); text-decoration:none; font-size:14px; padding:7px 8px; border-radius:8px; } .side-nav a.res-call { color:var(--accent); font-weight:600; }
.mlogo, .mcta { display:none; } .mlogo img { height:22px; display:block; }
/* main */
.app { flex:1; min-width:0; display:flex; flex-direction:column; height:100vh; overflow:hidden; }
.top { display:flex; align-items:center; gap:10px; padding:10px 18px; border-bottom:1px solid var(--line); background:#fff; z-index:5; flex:0 0 auto; }
#side-open { display:none; }
.actions { margin-left:auto; display:flex; gap:8px; align-items:center; }
select, .ghost { border:1px solid var(--line); background:#fff; color:var(--text); border-radius:8px; padding:6px 10px; font:inherit; cursor:pointer; text-decoration:none; }
.ghost.icon { width:36px; height:36px; padding:0; display:inline-grid; place-items:center; }
.seg { display:inline-flex; border:1px solid var(--line); border-radius:8px; overflow:hidden; }
.seg a { padding:6px 14px; text-decoration:none; color:var(--muted); font-size:14px; font-weight:500; white-space:nowrap; } .seg a.on { background:var(--accent); color:#fff; }
#main { flex:1; width:100%; max-width:980px; margin:0 auto; padding:18px 16px 24px; }
.empty { text-align:center; padding:44px 8px 20px; }
.empty h1 { font-size:30px; margin:0 0 10px; }
.empty p { color:var(--muted); max-width:640px; margin:0 auto 22px; }
.chips { display:flex; flex-wrap:wrap; gap:8px; justify-content:center; }
.chips button { border:1px solid var(--line); background:#fff; color:var(--text); border-radius:20px; padding:8px 14px; font:inherit; cursor:pointer; text-align:left; }
.chips button:hover { border-color:var(--accent); }
.resources { display:grid; grid-template-columns:repeat(auto-fit, minmax(210px, 1fr)); gap:10px; max-width:900px; margin:34px auto 0; text-align:left; }
.resources a { display:block; border:1px solid var(--line); background:#fff; border-radius:12px; padding:12px 14px; text-decoration:none; color:var(--text); }
.resources a:hover { border-color:var(--accent); } .resources b { display:block; font-size:14.5px; margin-bottom:3px; } .resources span { font-size:12.5px; color:var(--muted); line-height:1.35; }
.chat { display:flex; flex-direction:column; gap:14px; }
.msg { max-width:100%; }
.msg.user { align-self:flex-end; background:var(--user); border-radius:16px 16px 4px 16px; padding:10px 14px; max-width:80%; white-space:pre-wrap; }
.msg.bot { align-self:stretch; }
.status { display:flex; align-items:center; gap:8px; color:var(--muted); font-size:14px; margin:4px 0 8px; }
.status .dot { width:8px; height:8px; border-radius:50%; background:var(--accent2); animation:pulse 1.2s infinite; }
@keyframes pulse { 0%,100%{opacity:.3} 50%{opacity:1} }
/* thinking */
.thinking { border-radius:12px; padding:4px 14px; margin-bottom:8px; font-size:13px; color:var(--muted); }
.thinking[open] { background:var(--soft); border:1px dashed var(--line); padding:8px 14px; }
.thinking summary { cursor:pointer; color:var(--muted); font-weight:500; font-size:12.5px; list-style:none; }
.thinking summary::before { content:"▸ "; } .thinking[open] summary::before { content:"▾ "; }
.thinking ol { margin:6px 0 0; padding-left:18px; } .thinking li { margin:3px 0; line-height:1.4; }
.thinking li.st-intent_done { color:var(--text); font-weight:600; } .thinking li.st-crawl { color:var(--accent); } .thinking li.st-zone_fail, .thinking li.st-notify { color:var(--warn); } .thinking li.st-search_done { color:var(--ok); }
.thinking li .fl { display:inline-block; font-size:11.5px; border:1px solid var(--line); border-radius:6px; padding:1px 6px; margin:2px 4px 0 0; background:#fff; color:var(--muted); }
/* mail box */
.mailbox { background:#fff8ec; border:1px solid #f0d9a8; border-radius:12px; padding:10px 14px; margin:6px 0 10px; font-size:13.5px; display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.mailbox input { flex:1; min-width:180px; border:1px solid var(--line); border-radius:8px; padding:7px 10px; font:inherit; }
.mailbox button { border:0; background:var(--accent); color:#fff; border-radius:8px; padding:8px 12px; font:inherit; cursor:pointer; }
.mailbox .ok { color:var(--ok); font-weight:600; }
/* answer */
.answer { background:#fff; border:1px solid var(--line); border-radius:12px; padding:14px 16px; white-space:pre-wrap; line-height:1.55; }
.answer a.n, .answer span.n { display:inline-grid; place-items:center; min-width:22px; height:22px; padding:0 5px; border-radius:11px; background:var(--accent); color:#fff; font-size:12px; font-weight:700; text-decoration:none; vertical-align:middle; }
.answer a.n:hover { background:#0a2be0; }
.zs { color:var(--muted); font-size:13px; margin:10px 0 0; }
.map { height:320px; border-radius:12px; border:1px solid var(--line); margin-top:12px; overflow:hidden; }
.grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(300px, 1fr)); gap:12px; margin-top:12px; }
.card { background:#fff; border:1px solid var(--line); border-radius:12px; overflow:hidden; display:flex; flex-direction:column; }
.card.hl { border-color:var(--accent); box-shadow:0 0 0 2px rgba(0,27,160,.2); }
.card .img { height:170px; background:#eef0f5; display:grid; place-items:center; position:relative; overflow:hidden; }
.card .img img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; display:none; }
.card .img.has img { display:block; } .card .img.has .noimg { display:none; }
.card .img .days { position:absolute; left:8px; top:8px; font-size:12px; font-weight:700; color:#fff; border-radius:8px; padding:3px 8px; background:var(--muted); }
.card .img .days.ok { background:var(--ok); } .card .img .days.warn { background:#e0842a; } .card .img .days.bad { background:var(--bad); }
.card .img .portal { position:absolute; right:8px; bottom:8px; font-size:11px; background:rgba(255,255,255,.92); color:var(--text); border-radius:6px; padding:2px 7px; }
.noimg { font-size:34px; opacity:.35; }
.card .body { padding:12px 14px; display:flex; flex-direction:column; gap:6px; }
.card .body > * { min-width:0; overflow-wrap:anywhere; }
.head { display:flex; align-items:baseline; gap:8px; }
.rank { color:var(--muted); font-size:13px; }
.head h3 { margin:0; font-size:15.5px; flex:1; min-width:0; line-height:1.3; }
.price { font-weight:700; font-size:17px; } .price .np { font-weight:400; color:var(--muted); font-size:13px; }
.price .vs { font-weight:600; font-size:13px; } .price .vs.lo { color:var(--ok); } .price .vs.hi { color:var(--bad); }
.facts { color:var(--muted); font-size:13px; }
.badges { display:flex; flex-wrap:wrap; gap:6px; }
.badge { font-size:11.5px; border:1px solid var(--line); border-radius:6px; padding:2px 7px; color:var(--muted); }
.badge.warn { color:var(--warn); border-color:var(--warn); } .badge.priv { color:#fff; background:var(--ok); border-color:var(--ok); font-weight:600; } .badge.auction { color:#fff; background:var(--warn); border-color:var(--warn); font-weight:600; }
.contact { font-size:13px; color:var(--ok); font-weight:600; } .contact:empty { display:none; } .contact a { color:inherit; }
.links { display:flex; gap:12px; font-size:13px; } .links a { color:var(--accent); text-decoration:none; font-weight:600; } .links a:hover { text-decoration:underline; }
/* composer + filtri */
.composer { position:sticky; bottom:0; background:#fff; padding:8px 16px 12px; border-top:1px solid var(--line); }
.filters { max-width:980px; margin:0 auto 8px; display:flex; gap:6px; flex-wrap:wrap; align-items:center; }
.filters input, .filters select { border:1px solid var(--line); border-radius:8px; padding:6px 9px; font:inherit; font-size:13px; background:#fff; color:var(--text); }
.filters #f_zone { flex:1; min-width:150px; } .filters #f_max { width:130px; }
.filters .chk { display:inline-flex; align-items:center; gap:5px; font-size:13px; color:var(--muted); border:1px solid var(--line); border-radius:8px; padding:5px 9px; cursor:pointer; } .filters .chk input { margin:0; }
#form { max-width:980px; margin:0 auto; display:flex; gap:8px; align-items:flex-end; background:#fff; border:1px solid var(--line); border-radius:14px; padding:8px 8px 8px 14px; box-shadow:0 6px 24px rgba(0,27,160,.06); }
#q { flex:1; border:0; outline:0; background:transparent; color:var(--text); font:inherit; resize:none; max-height:160px; }
#send { border:0; background:var(--accent); color:#fff; width:38px; height:38px; border-radius:10px; cursor:pointer; font-size:16px; }
#send:disabled { opacity:.5; cursor:default; }
.fine { max-width:980px; margin:8px auto 0; font-size:11.5px; color:var(--muted); text-align:center; }
.ftoggle { display:none; border:1px solid var(--line); background:#fff; width:38px; height:38px; border-radius:10px; cursor:pointer; font-size:16px; color:var(--muted); } .ftoggle.on { border-color:var(--accent); color:var(--accent); }
.err { color:#c0392b; }
[hidden] { display:none !important; }
@media (max-width:1400px) { .topnav a.mail { display:none; } }
@media (max-width:1150px) { .panel { display:none; } .topnav a.phone { display:none; } }
@media (max-width:900px) {
  .side { position:fixed; left:0; top:0; z-index:30; transform:translateX(-100%); transition:transform .2s; box-shadow:6px 0 24px rgba(0,0,0,.12); }
  .side.open { transform:none; } #side-close, #side-open { display:inline-grid; }
  .top { padding:8px 10px; flex-wrap:wrap; gap:8px; } .topnav { display:none; } .side-nav { display:flex; } .side-foot { display:none; }
  .mlogo { display:block; } .mcta { display:inline-block; background:var(--accent); color:#fff; font-weight:600; font-size:13px; padding:7px 11px; border-radius:8px; text-decoration:none; margin-left:auto; }
  .seg { order:10; width:100%; } .seg a { flex:1; text-align:center; padding:7px 6px; font-size:13px; }
  .zones { display:none; }
  .filters { display:none; } .filters.open { display:flex; } .ftoggle { display:inline-grid; place-items:center; }
  .empty h1 { font-size:22px; } .empty p { font-size:14px; } .chips button { font-size:13.5px; padding:7px 12px; } .resources { margin-top:20px; }
  #main { padding:12px 10px 20px; } .msg.user { max-width:92%; } .empty h1 { font-size:24px; } .empty { padding:24px 4px 12px; }
  .grid { grid-template-columns:1fr; } .card .img { height:150px; } .map { height:240px; }
  .composer { padding:6px 10px 10px; } .fine { font-size:10.5px; line-height:1.3; margin-top:6px; }
  .filters #f_zone { min-width:120px; }
}
