:root { font-family: "Segoe UI", Arial, sans-serif; color: #20333d; background: #f3f6f6; font-synthesis: none; }
* { box-sizing: border-box; }
body { margin: 0; }
.web-loader { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; min-height: 240px; padding: 2rem; color: #245968; text-align: center; }
.web-loader-spinner { display: inline-block; width: 42px; height: 42px; border: 4px solid #24596826; border-top-color: #245968; border-radius: 50%; animation: web-loader-spin .8s linear infinite; }
.web-loader-logo { display: block; max-width: min(260px, 60vw); max-height: 140px; object-fit: contain; }
@keyframes web-loader-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .web-loader-spinner { animation: none; } }
button, input, select { font: inherit; }
button { cursor: pointer; border: 0; border-radius: 9px; padding: .7rem 1rem; font-weight: 600; }
button:disabled { opacity: .45; cursor: default; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #ed930b; outline-offset: 3px; }
.primary { background: #245968; color: white; }
.primary:hover { background: #194450; }
.secondary { background: #eaf0f1; color: #234855; }
#viewer { max-width: 1500px; margin: auto; padding: clamp(1rem, 3vw, 3rem); }
.counter { font-weight: 700; font-size: 1.1rem; position: sticky; top: 0; background: #f3f6f6; padding: .8rem 0; z-index: 1; }
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; padding: 1.4rem; border-radius: 18px; background: white; box-shadow: 0 5px 25px #20333d09; align-items: end; }
.filter-field { display: flex; flex-direction: column; gap: .4rem; font-size: .85rem; font-weight: 600; }
.filter-field input, .filter-field select { width: 100%; min-width: 0; padding: .7rem; border: 1px solid #cdd9de; border-radius: 8px; background: white; color: #20333d; }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.3rem; padding: 1.3rem 0; font-size: .85rem; }
.typology { display: inline-flex; align-items: center; gap: .45rem; }
.typology-dot { display: inline-block; flex: 0 0 auto; width: .7rem; height: .7rem; border-radius: 50%; }
.badge { display: inline-block; padding: .35rem .65rem; border-radius: 20px; font-size: .8rem; font-weight: 700; white-space: nowrap; }
.available { background: #e8f5ed; color: #2e8b57; }
.reserved { background: #fff3db; color: #946100; border: 1px solid #d9910050; }
.sold .badge, .badge.sold { background: #e3e7e9; color: #505b62; }
.table-scroll { overflow-x: auto; border-radius: 16px; background: white; box-shadow: 0 5px 25px #20333d09; }
table { border-collapse: collapse; width: 100%; text-align: left; font-size: .9rem; }
th, td { padding: 1rem .8rem; border-bottom: 1px solid #edf1f2; white-space: nowrap; }
thead { background: #eaf0f1; color: #506571; }
th { font-weight: 600; }
caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.clickable { cursor: pointer; }
.clickable:hover { background: #f0f7f7; }
.sold { background: #edf0f1; color: #657079; }
.sold .typology-dot { opacity: .55; }
.lot-cards { display: none; }
.empty { padding: 3rem; background: white; border-radius: 15px; text-align: center; }
.error { color: #a02c2c; font-weight: 600; line-height: 1.6; }
.error:empty { display: none; }
dialog { border: 0; padding: 0; border-radius: 20px; box-shadow: 0 20px 90px #10262d60; color: #20333d; }
dialog::backdrop { background: #10262d80; backdrop-filter: blur(3px); }
.lot-dialog { width: min(760px, calc(100vw - 2rem)); max-height: calc(100dvh - 2rem); }
.dialog-header { position: sticky; top: 0; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.2rem 1.5rem; background: white; border-bottom: 1px solid #e2eaed; z-index: 1; }
.dialog-header h2 { margin: 0; font-size: 1.3rem; overflow-wrap: anywhere; }
.lot-body { padding: 1.5rem; }
.lot-body > .badge { margin-left: 1rem; }
.details { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .8rem; margin: 1.3rem 0; }
.details div { background: #f1f6f6; border-radius: 12px; padding: 1rem; }
dt { color: #536771; font-size: .8rem; }
dd { margin: .4rem 0 0; font-weight: 600; }
.annexes, .surface-details { margin: 1.5rem 0; }
h3 { font-size: 1rem; }
.annex { display: inline-block; margin: 0 .5rem .5rem 0; padding: .6rem 1rem; background: #f1f6f6; border-radius: 9px; }
.surface-details th, .surface-details td { white-space: normal; overflow-wrap: anywhere; }
.lot-navigation { display: flex; justify-content: space-between; gap: 1rem; padding: 1rem 1.5rem; background: #f5f8f8; }
.pdf-dialog { width: min(1200px, calc(100vw - 2rem)); height: calc(100dvh - 2rem); }
.pdf-dialog[open] { display: flex; flex-direction: column; }
.pdf-dialog iframe { border: 0; width: 100%; flex: 1; min-height: 0; background: #eaf0f1; }
.pdf-help { font-size: .8rem; padding: 0 1.5rem; }
@media (max-width: 700px) {
  #viewer { padding: 1rem; }
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 1rem; gap: .8rem; }
  .filter-field:first-child { grid-column: 1 / -1; }
  .table-scroll { display: none; }
  .lot-cards { display: grid; gap: 1rem; }
  .lot-card { background: white; border-radius: 16px; padding: 1.2rem; box-shadow: 0 5px 25px #20333d09; }
  .lot-card.sold { background: #e7ebed; }
  .lot-card h2 { margin: 0 0 .8rem; font-size: 1.2rem; overflow-wrap: anywhere; }
  .lot-card > .badge { float: right; }
  .card-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
  .lot-card button { width: 100%; }
  .dialog-header { padding: 1rem; }
  .lot-body { padding: 1rem; }
  .lot-navigation { padding: 1rem; }
  .lot-navigation button { font-size: .8rem; }
}
