/* SIONO 360 — panel de administración */
:root {
  /* Tokens del manual de marca SIONO (tema azul) */
  --azul-siono: #1a324f;
  --azul-noche: #0f1f33;
  --azul-medio: #223f63;
  --arena: #c4b5a7;
  --arena-claro: #eae3db;
  --arena-texto: #7a6a5b;
  --marfil: #faf8f5;
  --ink-muted: #c9d2dc;
  --line-token: #3a5577;
  /* Los mismos tonos en RGB (para transparencias) y el texto sobre el arena: el dominio propio de una inmobiliaria los cambia */
  --arena-rgb: 196, 181, 167;
  --noche-rgb: 15, 31, 51;
  --on-arena: var(--azul-siono);
  /* Alias usados en el resto de la hoja */
  --bg: var(--azul-siono);
  --bg-2: var(--azul-noche);
  --panel: var(--azul-medio);
  --panel-2: #29496f;
  --line: var(--line-token);
  --line-2: var(--line-token);
  --text: #ffffff;
  --muted: var(--ink-muted);
  --beige: var(--arena);
  --beige-2: var(--arena);
  --ok: #4fc98c;
  --warn: #e8a93a;
  --bad: #e0625c;
  --radius: 8px;
  --serif: 'Cormorant Garamond', Cormorant, Georgia, serif;
  --sans: Montserrat, 'Helvetica Neue', Arial, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 14px/1.5 var(--sans);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.gold { color: var(--beige); font-weight: 600; }
.row { display: flex; align-items: center; }
.gap { gap: 10px; }
.end { justify-content: flex-end; }
.ml-auto { margin-left: auto; }
.mt { margin-top: 18px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.eyebrow {
  margin: 0 0 8px; font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--beige); font-weight: 600;
}
kbd {
  font: 600 12px var(--sans); padding: 1px 6px; border-radius: 5px;
  background: rgba(255, 255, 255, .1); border: 1px solid var(--line-2);
}

/* ---------- Marca ---------- */
.brand-script {
  font-family: var(--serif); font-style: italic; font-weight: 600;
  letter-spacing: .01em; color: #fff; line-height: 1;
}
.brand-lockup { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-bottom: 26px; }
.brand-lockup .brand-script { font-size: 54px; }
.brand-sub { font-size: 10.5px; letter-spacing: .32em; text-transform: uppercase; color: var(--beige); }
.brand-mini { display: flex; align-items: baseline; gap: 8px; text-decoration: none; }
.brand-mini .brand-script { font-size: 28px; }
.tag {
  font-size: 12px; font-weight: 700; letter-spacing: .14em; color: var(--bg);
  background: var(--beige); padding: 2px 7px; border-radius: 99px;
}
.display {
  font-family: var(--serif); font-weight: 500; font-size: clamp(34px, 5vw, 52px);
  line-height: 1.02; margin: 0; letter-spacing: -.01em;
}
.display em { color: var(--beige); font-style: italic; }

/* ---------- Botones ---------- */
.btn {
  --h: 40px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--h); padding: 0 18px; border-radius: 999px; border: 1px solid transparent;
  font: 600 13px var(--sans); letter-spacing: .01em; cursor: pointer; text-decoration: none;
  transition: transform .25s var(--ease), background .25s, border-color .25s, box-shadow .25s, color .25s;
  white-space: nowrap; color: var(--text); background: none;
}
.btn:active { transform: scale(.97); }
.btn.lg { --h: 48px; padding: 0 26px; font-size: 14px; }
.btn.sm { --h: 34px; padding: 0 14px; font-size: 12.5px; }
.btn.xs { --h: 28px; padding: 0 12px; font-size: 12px; }
.btn.primary {
  background: linear-gradient(135deg, #e6d3b1, var(--beige) 45%, var(--beige-2));
  color: #111827; box-shadow: 0 6px 24px -8px rgba(216, 195, 160, .55);
}
.btn.primary:hover { transform: translateY(-1px); box-shadow: 0 10px 30px -8px rgba(216, 195, 160, .7); }
.btn.ghost { border-color: var(--line-2); background: var(--panel); }
.btn.ghost:hover { border-color: rgba(216, 195, 160, .5); background: var(--panel-2); }
.btn.link { padding: 0 6px; color: var(--muted); }
.btn.link:hover { color: var(--text); }
.btn.danger-ghost { color: #ff9c99; border-color: rgba(239, 100, 97, .3); }
.btn.danger-ghost:hover { background: rgba(239, 100, 97, .12); }
.btn:focus-visible, .tool:focus-visible, .tab:focus-visible { outline: 2px solid var(--beige); outline-offset: 2px; }
.plus { font-size: 20px; font-weight: 400; line-height: 0; }

/* ---------- Formularios ---------- */
.field { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.field > span { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
input:not([type=checkbox]):not([type=file]), select, textarea {
  width: 100%; font: 500 14px var(--sans); color: var(--text);
  background: rgba(255, 255, 255, .04); border: 1px solid var(--line-2); border-radius: 10px;
  padding: 10px 12px; transition: border-color .2s, background .2s, box-shadow .2s;
}
textarea { resize: vertical; min-height: 70px; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--beige); background: rgba(255, 255, 255, .06);
  box-shadow: 0 0 0 3px rgba(216, 195, 160, .15);
}
select option { background: var(--bg-2); }
.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 500; }
.switch input { position: absolute; opacity: 0; }
.switch .track {
  width: 40px; height: 22px; border-radius: 99px; background: var(--line-2); position: relative; transition: background .25s; flex: none;
}
.switch .track::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; transition: transform .25s var(--ease);
}
.switch input:checked + .track { background: var(--beige-2); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { outline: 2px solid var(--beige); outline-offset: 2px; }

.alert { padding: 12px 16px; border-radius: 12px; font-weight: 500; margin: 0 0 16px; }
.alert.err { background: rgba(239, 100, 97, .12); border: 1px solid rgba(239, 100, 97, .35); color: #ffb3b1; }
.alert.ok { background: rgba(62, 207, 142, .1); border: 1px solid rgba(62, 207, 142, .35); color: #9ff0c8; }

/* ---------- Inicio de sesión ---------- */
body.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; overflow: hidden; }
.auth-bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; }
.auth-bg .grid {
  position: absolute; inset: -50%;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  transform: perspective(800px) rotateX(62deg) translateY(-10%);
  mask-image: radial-gradient(ellipse at center, #000 10%, transparent 60%);
  animation: gridMove 18s linear infinite;
}
@keyframes gridMove { to { background-position: 0 64px, 64px 0; } }
.orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .5; }
.orb.o1 { width: 520px; height: 520px; background: #1f3564; top: -160px; left: -120px; animation: float 16s ease-in-out infinite; }
.orb.o2 { width: 420px; height: 420px; background: #6a5535; bottom: -160px; right: -80px; opacity: .35; animation: float 20s ease-in-out infinite reverse; }
@keyframes float { 50% { transform: translate(40px, 30px) scale(1.08); } }
.auth-card {
  position: relative; z-index: 1; width: 100%; max-width: 400px; padding: 40px 32px;
  background: rgba(13, 21, 38, .72); border: 1px solid var(--line-2); border-radius: 24px;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .6);
}
.auth-card h1 { font-family: var(--sans); font-weight: 700; font-size: 28px; letter-spacing: -.015em; margin: 0 0 6px; text-align: center; }
.auth-card > p { text-align: center; margin: 0 0 22px; }

/* ---------- Estructura del panel ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px;
  padding: 12px 24px; background: rgba(8, 13, 24, .8); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.top-actions { margin-left: auto; display: flex; gap: 8px; }
.container { max-width: 1180px; margin: 0 auto; padding: 40px 24px 80px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 32px; flex-wrap: wrap; }

.tour-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.tour-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 20px; overflow: hidden;
  transition: transform .4s var(--ease), border-color .3s, box-shadow .4s;
}
.tour-card:hover { transform: translateY(-4px); border-color: rgba(216, 195, 160, .35); box-shadow: 0 24px 50px -24px rgba(0, 0, 0, .7); }
.tour-cover { display: block; position: relative; aspect-ratio: 2 / 1; overflow: hidden; background: var(--bg-2); }
.tour-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.tour-card:hover .tour-cover img { transform: scale(1.08) translateX(-3%); }
.cover-empty { display: grid; place-items: center; height: 100%; color: var(--muted); font-size: 13px; }
.pill {
  position: absolute; left: 12px; bottom: 12px; font-size: 12px; font-weight: 600; padding: 4px 10px;
  border-radius: 99px; background: rgba(8, 13, 24, .7); backdrop-filter: blur(8px); border: 1px solid var(--line-2);
}
.tour-body { padding: 18px 18px 16px; }
.tour-body h3 { margin: 0 0 2px; font-size: 17px; font-weight: 600; }
.tour-body p { margin: 0 0 14px; }

.empty { text-align: center; padding: 70px 20px; border: 1px dashed var(--line-2); border-radius: 24px; background: var(--panel); }
.empty h2 { font-family: var(--serif); font-weight: 500; font-size: 30px; margin: 22px 0 6px; }
.empty p { max-width: 440px; margin: 0 auto 24px; }
.empty-orb {
  width: 110px; height: 110px; margin: 0 auto; border-radius: 50%; position: relative; display: grid; place-items: center;
  background: radial-gradient(circle at 30% 30%, rgba(216, 195, 160, .35), rgba(22, 35, 63, .6) 60%);
  border: 1px solid rgba(216, 195, 160, .4);
}
.empty-orb::before, .empty-orb::after {
  content: ''; position: absolute; inset: -1px; border-radius: 50%; border: 1px solid rgba(216, 195, 160, .45);
  animation: ringY 5s linear infinite;
}
.empty-orb::after { animation-duration: 7s; animation-direction: reverse; transform: rotateX(70deg); }
@keyframes ringY { from { transform: rotateY(0) rotateX(0); } to { transform: rotateY(360deg) rotateX(0); } }
.empty-orb span { font-family: var(--serif); font-size: 26px; font-style: italic; color: var(--beige); }

/* ---------- Modales ---------- */
dialog.modal {
  width: min(460px, calc(100vw - 32px)); padding: 28px; border-radius: 22px; color: var(--text);
  background: var(--bg-2); border: 1px solid var(--line-2); box-shadow: 0 40px 100px -20px rgba(0, 0, 0, .8);
}
dialog.modal::backdrop { background: rgba(3, 6, 12, .65); backdrop-filter: blur(6px); }
dialog.modal[open] { animation: pop .35s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.97); } }
dialog.modal h2 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 26px; }

/* ---------- Aviso flotante ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 100; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  padding: 11px 18px; border-radius: 12px; font-weight: 600; font-size: 13px;
  background: #1a2542; border: 1px solid var(--line-2); box-shadow: 0 20px 40px -10px rgba(0, 0, 0, .6);
  transition: opacity .3s, transform .35s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.ok { border-color: rgba(62, 207, 142, .45); }
.toast.err { border-color: rgba(239, 100, 97, .5); color: #ffc0be; }

/* ---------- Animación de entrada ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease) var(--d, 0ms), transform .8s var(--ease) var(--d, 0ms); }
.reveal.in { opacity: 1; transform: none; }

/* =================================================================
   EDITOR
   ================================================================= */
body.editor { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
body.editor .topbar { position: relative; padding: 10px 16px; }
.ed-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ed-title strong { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.save-state { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 99px; background: var(--panel-2); color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.save-state::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.save-state[data-state=busy]::before { background: var(--warn); animation: blink 1s infinite; }
.save-state[data-state=err] { color: #ffb3b1; }
.save-state[data-state=err]::before { background: var(--bad); }
@keyframes blink { 50% { opacity: .2; } }

.ed-layout { flex: 1; min-height: 0; display: grid; grid-template-columns: 300px 1fr 300px; }
.ed-side, .ed-inspector { background: var(--bg-2); overflow-y: auto; min-height: 0; }
.ed-side { border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.ed-inspector { border-left: 1px solid var(--line); padding: 18px 16px; }
.tabs { display: flex; padding: 10px 10px 0; gap: 4px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--bg-2); z-index: 2; }
.tab {
  flex: 1; background: none; border: 0; color: var(--muted); font: 600 12.5px var(--sans); padding: 10px 6px 12px; cursor: pointer;
  border-bottom: 2px solid transparent; transition: color .2s, border-color .2s;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--beige); }
.tab-panel { display: none; padding: 16px; }
.tab-panel.active { display: block; animation: fadeIn .35s var(--ease); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } }

.dropzone {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px 12px; text-align: center; cursor: pointer;
  border: 1.5px dashed rgba(216, 195, 160, .4); border-radius: 16px; background: rgba(216, 195, 160, .04);
  transition: background .25s, border-color .25s, transform .25s var(--ease);
}
.dropzone:hover, .dropzone.over { background: rgba(216, 195, 160, .1); border-color: var(--beige); }
.dropzone.over { transform: scale(1.02); }
.dz-icon { font-size: 22px; color: var(--beige); line-height: 1; }
.upload-queue { display: flex; flex-direction: column; gap: 8px; margin: 12px 0 0; }
.uq-item { font-size: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; }
.uq-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uq-st { color: var(--muted); }
.uq-item .bar { grid-column: 1 / -1; height: 3px; background: var(--line); border-radius: 3px; overflow: hidden; }
.uq-item .bar i { display: block; height: 100%; width: 0; background: var(--beige); transition: width .3s; }
.uq-item.done .bar i { background: var(--ok); }
.uq-item.fail .bar i { background: var(--bad); }
.uq-item.fail .uq-st { color: #ffb3b1; }

.scene-list { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.scene-item {
  display: grid; grid-template-columns: 76px 1fr; gap: 4px 10px; padding: 8px; border-radius: 12px; cursor: pointer;
  border: 1px solid transparent; background: var(--panel); transition: background .2s, border-color .2s;
}
.scene-item:hover { background: var(--panel-2); }
.scene-item.active { border-color: rgba(216, 195, 160, .55); background: rgba(216, 195, 160, .08); }
.scene-item img { width: 76px; height: 38px; object-fit: cover; border-radius: 7px; grid-row: span 2; }
.si-body { min-width: 0; display: flex; flex-direction: column; }
.si-body strong { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.si-actions { display: flex; gap: 2px; opacity: .45; transition: opacity .2s; }
.scene-item:hover .si-actions, .scene-item.active .si-actions { opacity: 1; }
.si-actions button {
  width: 24px; height: 22px; border: 0; border-radius: 6px; background: rgba(255, 255, 255, .06); color: var(--text);
  cursor: pointer; font-size: 12px; line-height: 1;
}
.si-actions button:hover:not(:disabled) { background: rgba(255, 255, 255, .14); }
.si-actions button:disabled { opacity: .3; cursor: default; }
.si-actions .danger:hover { background: rgba(239, 100, 97, .3) !important; }

.slug-row { display: flex; flex-direction: column; gap: 4px; }
.slug-row .muted { word-break: break-all; }
#embed-code { font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; }

/* Visor del editor */
.ed-stage { position: relative; min-width: 0; background: #000; }
.pano { position: absolute; inset: 0; }
.pano.placing, .pano.placing .pnlm-dragfix, .pano.placing .pnlm-grab { cursor: crosshair !important; }
.pano.lot-hover .pnlm-dragfix, .pano.lot-hover .pnlm-grab { cursor: pointer !important; }
.tool-bar {
  position: absolute; z-index: 6; top: 14px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 4px; padding: 5px; border-radius: 999px;
  background: rgba(8, 13, 24, .72); border: 1px solid var(--line-2); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.tool {
  display: flex; align-items: center; gap: 7px; border: 0; background: none; color: var(--text); cursor: pointer;
  font: 600 12.5px var(--sans); padding: 8px 14px; border-radius: 999px; transition: background .2s, color .2s;
}
.tool:hover { background: rgba(255, 255, 255, .08); }
.tool.active { background: var(--beige); color: #111827; }
.ic { width: 16px; height: 16px; display: inline-block; background: currentColor; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.ic-arrow { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 19V5M5 12l7-7 7 7'/%3E%3C/svg%3E"); }
.ic-info { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v6M12 7.5v.01'/%3E%3C/svg%3E"); }
.ic-lot { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linejoin='round'%3E%3Cpath d='M4 7l7-3 9 4-2 11-12 1z'/%3E%3C/svg%3E"); }
.mode-hint {
  position: absolute; z-index: 6; top: 66px; left: 50%; transform: translateX(-50%); max-width: calc(100% - 32px);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center;
  padding: 8px 10px 8px 16px; border-radius: 14px; font-size: 12.5px;
  background: rgba(22, 35, 63, .88); border: 1px solid rgba(216, 195, 160, .35); backdrop-filter: blur(10px);
  animation: fadeIn .3s var(--ease);
}
.stage-empty { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 16px; color: var(--muted); background: radial-gradient(ellipse at center, #111b31, #05080f); }

/* Inspector */
.insp-block + .insp-block:not(:empty) { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.insp-block .field { margin-bottom: 12px; }
.btn-col { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.btn-col .btn { justify-content: flex-start; }
.mini-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.mini-list li {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 9px; cursor: pointer; font-size: 13px;
  background: var(--panel); border: 1px solid transparent; transition: background .2s, border-color .2s;
}
.mini-list li:hover { background: var(--panel-2); }
.mini-list li.on { border-color: rgba(216, 195, 160, .5); }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.dot.st-disponible, .chip.st-disponible i { background: var(--ok); }
.dot.st-reservado, .chip.st-reservado i { background: var(--warn); }
.dot.st-vendido, .chip.st-vendido i { background: var(--bad); }
.lot-summary { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 3px 9px; border-radius: 99px; background: var(--panel-2); }
.chip i { width: 7px; height: 7px; border-radius: 50%; }
.status-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 12px; background: var(--panel); margin-bottom: 12px; }
.seg { border: 0; background: none; color: var(--muted); font: 600 12px var(--sans); padding: 8px 4px; border-radius: 9px; cursor: pointer; transition: background .2s, color .2s; }
.seg:hover { color: var(--text); }
.seg.on.st-disponible { background: rgba(62, 207, 142, .2); color: #8ff0c1; }
.seg.on.st-reservado { background: rgba(242, 184, 75, .2); color: #ffd98f; }
.seg.on.st-vendido { background: rgba(239, 100, 97, .2); color: #ffaaa8; }

@media (max-width: 1100px) {
  .ed-layout { grid-template-columns: 260px 1fr; }
  .ed-inspector { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); max-height: 40vh; }
  body.editor { height: auto; min-height: 100vh; overflow: auto; }
  .ed-layout { grid-template-rows: 70vh auto; }
}
@media (max-width: 720px) {
  .ed-layout { grid-template-columns: 1fr; grid-template-rows: auto 60vh auto; }
  .ed-side { border-right: 0; }
  .topbar { padding: 10px 12px; gap: 10px; }
  .container { padding: 28px 16px 60px; }
  .tool { padding: 8px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Portada ---------- */
.home-hero { position: relative; z-index: 1; max-width: 720px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.home-hero .display { font-size: clamp(40px, 7vw, 72px); }
.home-hero p.muted { font-size: 16px; max-width: 540px; margin: 0; }
.home-hero .empty-orb { margin-bottom: 10px; }


/* =================================================================
   Ajustes del manual de marca SIONO
   ================================================================= */
.eyebrow { font-size: 12px; font-weight: 500; letter-spacing: .3em; color: var(--arena); }
.display { font-family: var(--sans); font-weight: 700; letter-spacing: -.03em; line-height: 1.06; font-size: clamp(32px, 4.4vw, 48px); }
.bajada { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 26px; line-height: 1.25; color: var(--ink-muted); margin: 6px 0 0; }
.descripcion { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 20px; line-height: 1.35; color: var(--ink-muted); }

.btn { border-radius: var(--radius); }
.btn.primary { background: var(--arena); color: var(--on-arena); box-shadow: none; }
.btn.primary:hover { background: var(--arena); filter: brightness(1.06); box-shadow: 0 8px 22px -12px rgba(0, 0, 0, .6); }
.btn.ghost { background: transparent; border-color: var(--ink-muted); }
.btn.ghost:hover { background: rgba(255, 255, 255, .06); border-color: #fff; }
.btn.danger-ghost { color: #ffc9c6; border-color: rgba(224, 98, 92, .6); }
.btn:focus-visible, .tool:focus-visible, .tab:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

input:not([type=checkbox]):not([type=file]), select, textarea { background: var(--azul-noche); border-color: var(--ink-muted); border-radius: var(--radius); }
input:focus, select:focus, textarea:focus { border-color: #fff; background: var(--azul-noche); box-shadow: 0 0 0 3px rgba(var(--arena-rgb), .25); }
select option { background: var(--azul-noche); }
.switch input:checked + .track { background: var(--arena); }
.switch input:checked + .track::after { background: var(--azul-siono); }

/* Logo e isotipo (nunca se escribe "SIONO" con una fuente) */
.logo { display: block; height: auto; }
.logo-login { width: 190px; margin: 0 auto 28px; }
.logo-top { height: 30px; width: auto; }
.brand-mini { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.tag { border-radius: 4px; background: var(--arena); color: var(--azul-siono); letter-spacing: .2em; padding: 3px 7px 3px 9px; }
.isotipo-deco {
  position: fixed; z-index: 0; pointer-events: none; opacity: 0;
  width: min(78vh, 720px); right: max(-18vh, -180px); bottom: -14vh;
  animation: decoIn 1.6s var(--ease) .2s forwards;
}
@keyframes decoIn { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }

body.auth { background: var(--azul-siono); }
.auth-card { background: var(--azul-noche); border: 1px solid var(--line-token); border-radius: var(--radius); box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .7); backdrop-filter: none; -webkit-backdrop-filter: none; }
.auth-card h1 { font-family: var(--sans); font-weight: 600; font-size: 24px; letter-spacing: -.01em; }
.auth-card > p { font-family: var(--serif); font-style: italic; font-size: 19px; line-height: 1.35; color: var(--ink-muted); }

.topbar { background: var(--azul-noche); border-bottom-color: var(--line-token); backdrop-filter: none; -webkit-backdrop-filter: none; }
.tour-card { background: var(--azul-medio); border: 0; border-radius: var(--radius); }
.tour-card:hover { border-color: transparent; box-shadow: 0 22px 44px -26px rgba(0, 0, 0, .8); }
.tour-cover { border-radius: var(--radius) var(--radius) 0 0; }
.pill { border-radius: 4px; background: var(--azul-noche); border: 0; letter-spacing: .02em; }
.tour-body h3 { font-weight: 600; letter-spacing: -.01em; }
.empty { background: var(--azul-medio); border: 0; border-radius: var(--radius); }
.empty h2 { font-family: var(--sans); font-weight: 600; font-size: 26px; letter-spacing: -.01em; }
.empty p.muted { font-family: var(--serif); font-style: italic; font-size: 20px; line-height: 1.35; }
.empty-mark { width: 96px; margin: 0 auto; display: block; animation: breathe 3.2s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .55; transform: scale(.96); } }

dialog.modal { background: var(--azul-noche); border-color: var(--line-token); border-radius: var(--radius); }
dialog.modal h2 { font-family: var(--sans); font-weight: 600; font-size: 22px; letter-spacing: -.01em; }
dialog.modal::backdrop { background: rgba(var(--noche-rgb), .75); }
.toast { background: var(--azul-noche); border-radius: var(--radius); }

/* Editor */
.ed-side, .ed-inspector, .tabs { background: var(--azul-noche); }
.tab.active { border-bottom-color: var(--arena); }
.dropzone { border-radius: var(--radius); border-color: var(--arena); background: rgba(var(--arena-rgb), .06); }
.scene-item, .mini-list li, .uq-item { border-radius: var(--radius); background: var(--azul-siono); }
.scene-item:hover, .mini-list li:hover { background: var(--azul-medio); }
.scene-item.active { background: var(--azul-medio); border-color: var(--arena); }
.scene-item img { border-radius: 4px; }
.si-actions button { border-radius: 4px; }
.tool-bar { border-radius: var(--radius); background: rgba(var(--noche-rgb), .85); border-color: var(--line-token); }
.tool { border-radius: 6px; }
.tool.active { background: var(--arena); color: var(--azul-siono); }
.mode-hint { border-radius: var(--radius); background: rgba(var(--noche-rgb), .92); border-color: var(--arena); }
.status-seg, .seg { border-radius: var(--radius); }
.status-seg { background: var(--azul-siono); }
.stage-empty { background: var(--azul-siono); }
.stage-empty p { font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--ink-muted); }
.save-state { border-radius: 4px; background: var(--azul-siono); }
.home-hero .display { font-size: clamp(38px, 6vw, 64px); }
.home-hero .bajada { max-width: 560px; }
.home-hero .logo { width: 220px; margin-bottom: 18px; }
.auth-card > p.eyebrow { font: 500 12px/1.3 var(--sans); letter-spacing: .3em; color: var(--arena); margin: 0 0 18px; }

/* =================================================================
   Cuentas, equipo, lotes y actividad
   ================================================================= */
.container.wide { max-width: 1320px; }
.container.narrow { max-width: 820px; }
.center { text-align: center; }
.wrap { flex-wrap: wrap; }
.warn-text { color: var(--warn); }
.eyebrow a { color: inherit; text-decoration: none; border-bottom: 1px solid rgba(var(--arena-rgb), .4); }
.eyebrow a:hover { border-color: var(--arena); }

/* Navegación principal */
.main-nav { display: flex; gap: 2px; margin-left: 18px; overflow-x: auto; scrollbar-width: none; }
.main-nav::-webkit-scrollbar { display: none; }
.main-nav a {
  padding: 8px 14px; border-radius: var(--radius); text-decoration: none; font-weight: 600; font-size: 13px;
  color: var(--ink-muted); white-space: nowrap; transition: background .2s, color .2s;
}
.main-nav a:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.main-nav a.on { color: var(--azul-siono); background: var(--arena); }
.who { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; margin-right: 6px; }
.who strong { font-size: 13px; }
.who small { font-size: 12px; color: var(--ink-muted); }

/* Acceso */
/* Botón oficial de Google (redondeado), debajo del formulario y de su mismo ancho */
.google-wrap { display: flex; justify-content: center; width: 100%; min-height: 44px; margin: 2px 0 8px; }
.google-wrap iframe { border-radius: 99px !important; }
.or { display: flex; align-items: center; gap: 12px; margin: 14px 0; color: var(--ink-muted); font-size: 12px; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line-token); }

/* Paneles y tablas */
.panel { background: var(--azul-medio); border-radius: var(--radius); padding: 24px; margin-bottom: 18px; }
.panel h2 { margin: 0 0 14px; font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.table-card { background: var(--azul-medio); border-radius: var(--radius); overflow: hidden; margin-bottom: 18px; }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data th {
  text-align: left; font-size: 12px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--arena);
  padding: 14px 16px; border-bottom: 1px solid var(--line-token); white-space: nowrap;
}
table.data td { padding: 13px 16px; border-bottom: 1px solid rgba(58, 85, 119, .55); vertical-align: top; }
table.data tr:last-child td { border-bottom: 0; }
table.data tr.off td { opacity: .5; }
table.data tr.clickable { cursor: pointer; transition: background .15s; }
table.data tr.clickable:hover td { background: rgba(255, 255, 255, .04); }
/* Botones de acción: si no entran en una línea bajan a la siguiente (nunca se cortan por el borde de la tabla) */
table.data .actions { text-align: right; white-space: normal; }
table.data .actions > * { margin: 0 0 6px 6px; vertical-align: top; }
table.data .actions form { display: inline-block; }
table.data .actions .btn { white-space: nowrap; }
table.data.compact td { padding: 10px 0; }
.role-tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 4px; background: var(--azul-siono); color: var(--ink-muted); }
.role-tag.r-inmobiliaria { background: rgba(var(--arena-rgb), .2); color: var(--arena); }
.role-tag.r-superadmin { background: var(--arena); color: var(--azul-siono); }
.role-tag.r-cobranzas { background: rgba(62, 207, 142, .12); color: #9ff0c8; }
.role-tag.r-contabilidad { background: rgba(120, 170, 255, .14); color: #b9d0ff; }
.role-tag.r-legal { background: rgba(232, 169, 58, .14); color: #f6d08f; }
.role-tag.r-supervisor { background: rgba(196, 140, 255, .15); color: #dcc2ff; }

/* Invitación */
.invite-box { background: rgba(var(--arena-rgb), .1); border: 1px solid var(--arena); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 18px; }
.invite-box p { margin: 0 0 10px; }
.copy-row { display: flex; gap: 8px; flex-wrap: wrap; }
.copy-row input { flex: 1 1 320px; font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; }

/* Lotes */
.lot-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--azul-medio); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 2px; }
.stat-n { font-size: 30px; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; }
.stat-l { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-muted); }
.stat-bar { height: 4px; border-radius: 2px; background: var(--azul-siono); margin-top: 10px; overflow: hidden; }
.stat-bar i { display: block; height: 100%; border-radius: inherit; transition: width .6s var(--ease); }
.stat.st-disponible .stat-n { color: #8fe6bb; } .stat.st-disponible .stat-bar i { background: var(--ok); }
.stat.st-reservado .stat-n { color: #f6cf85; } .stat.st-reservado .stat-bar i { background: var(--warn); }
.stat.st-vendido .stat-n { color: #f0a19d; } .stat.st-vendido .stat-bar i { background: var(--bad); }
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar input[type=search] { flex: 1 1 240px; max-width: 360px; }
.toolbar.filters select, .toolbar.filters input { width: auto; flex: 0 1 auto; }
.date-f { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-muted); }
.filter-seg { display: flex; gap: 4px; padding: 4px; border-radius: var(--radius); background: var(--azul-medio); flex-wrap: wrap; }
.filter-seg button { border: 0; background: none; color: var(--ink-muted); font: 600 12.5px var(--sans); padding: 8px 14px; border-radius: 6px; cursor: pointer; }
.filter-seg button:hover { color: #fff; }
.filter-seg button.on { background: var(--arena); color: var(--azul-siono); }
dialog.modal.wide { width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 40px); overflow-y: auto; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.client-box { border: 1px solid var(--line-token); border-radius: var(--radius); padding: 14px 16px 12px; margin: 0; display: flex; flex-direction: column; gap: 12px; transition: opacity .2s; }
.client-box legend { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--arena); padding: 0 6px; }
.client-box.dim { opacity: .45; }
.alert.warn { background: rgba(232, 169, 58, .12); border: 1px solid rgba(232, 169, 58, .45); color: #f6cf85; }
.alert.warn.info, .alert.info { background: rgba(var(--arena-rgb), .1); border-color: rgba(var(--arena-rgb), .35); color: var(--arena); }
.alert.small { font-size: 12.5px; padding: 9px 12px; }
.history summary { cursor: pointer; font-weight: 600; font-size: 13px; color: var(--ink-muted); }
.history ol { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 13px; max-height: 220px; overflow-y: auto; }
.history li { padding: 8px 10px; border-radius: 6px; background: var(--azul-siono); }
input:disabled, textarea:disabled, select:disabled, .seg:disabled { opacity: .55; cursor: not-allowed; }

/* Actividad */
.act-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; background: var(--ink-muted); }
.act-dot.a-lot { background: var(--arena); }
.act-dot.a-login, .act-dot.a-logout { background: #6f8fb8; }
.act-dot.a-user, .act-dot.a-company { background: #b49ad8; }
.act-dot.a-tour, .act-dot.a-scene { background: var(--ok); }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 10px 0 30px; }
.howto { margin-top: 16px; font-size: 13.5px; }
.howto summary { cursor: pointer; font-weight: 600; color: var(--arena); }
.howto ol { padding-left: 20px; line-height: 1.7; color: var(--ink-muted); }
.howto code { background: var(--azul-noche); padding: 2px 6px; border-radius: 4px; color: #fff; }

@media (max-width: 900px) {
  .topbar { flex-wrap: wrap; }
  .main-nav { order: 3; width: 100%; margin: 6px 0 0; }
  .who { display: none; }
  .lot-stats { grid-template-columns: repeat(2, 1fr); }
  /* Tablas como tarjetas en el celular */
  table.data thead { display: none; }
  table.data, table.data tbody, table.data tr, table.data td { display: block; width: 100%; }
  table.data tr { padding: 12px 14px; border-bottom: 1px solid var(--line-token); }
  table.data td { border: 0; padding: 3px 0; display: flex; gap: 10px; }
  table.data td[data-label]::before { content: attr(data-label); flex: 0 0 96px; font-size: 10.5px; letter-spacing: .15em; text-transform: uppercase; color: var(--arena); padding-top: 2px; }
  table.data .actions { text-align: left; padding-top: 8px; flex-wrap: wrap; gap: 8px; }
  table.data .actions > * { margin: 0; }
  table.data td { overflow-wrap: anywhere; } /* correos largos: bajan de línea en vez de salirse */
  .grid-2 { grid-template-columns: 1fr; }
}

/* Marca de la inmobiliaria */
.ok-text { color: #8fe6bb; }
.brand-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.logo-drop { display: grid; grid-template-columns: 200px 1fr; gap: 16px; align-items: center; }
.logo-current { height: 110px; border-radius: var(--radius); display: grid; place-items: center; padding: 14px; border: 1px solid var(--line-token); }
.logo-current img { max-width: 100%; max-height: 80px; object-fit: contain; }
.color-row { display: flex; gap: 8px; }
.color-row input[type=color] { width: 48px; height: 42px; padding: 3px; border-radius: var(--radius); border: 1px solid var(--ink-muted); background: var(--azul-noche); cursor: pointer; flex: none; }
.color-row input:not([type=color]) { font-family: ui-monospace, Menlo, monospace; text-transform: uppercase; }
.brand-preview {
  --p-accent: var(--arena); --p-dark: var(--azul-noche); --p-ink: var(--azul-siono);
  position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(180deg, #6f9fd2 0%, #a9c6e0 45%, #9a8a6a 46%, #6c5f45 100%) center / cover;
}
.brand-preview::after { content: ''; position: absolute; inset: 0; background: linear-gradient(transparent 55%, rgba(0, 0, 0, .25)); }
.bp-card { position: absolute; z-index: 1; top: 14px; left: 14px; padding: 12px 16px; border-radius: 8px; background: color-mix(in srgb, var(--p-dark) 75%, transparent); backdrop-filter: blur(10px); display: flex; flex-direction: column; gap: 2px; max-width: 60%; }
.bp-card img { max-height: 30px; max-width: 150px; object-fit: contain; object-position: left; margin-bottom: 4px; }
.bp-client { font-size: 9px; letter-spacing: .3em; text-transform: uppercase; color: var(--p-accent); }
.bp-card strong { font-size: 16px; }
.bp-card em { font-family: var(--serif); font-size: 16px; color: var(--ink-muted); }
.bp-hs { position: absolute; z-index: 1; left: 38%; top: 58%; width: 40px; height: 40px; border-radius: 50%; border: 2px solid #fff; background: color-mix(in srgb, var(--p-accent) 55%, transparent); box-shadow: 0 0 0 6px color-mix(in srgb, var(--p-accent) 35%, transparent); }
.bp-sheet { position: absolute; z-index: 1; right: 14px; bottom: 14px; width: 46%; padding: 14px; border-radius: 8px; background: color-mix(in srgb, var(--p-dark) 90%, transparent); display: flex; flex-direction: column; gap: 6px; }
.bp-badge { align-self: flex-start; font-size: 9px; letter-spacing: .2em; text-transform: uppercase; padding: 3px 8px; border-radius: 4px; background: rgba(79, 201, 140, .18); color: #8fe6bb; }
.bp-sheet strong { font-size: 20px; }
.bp-cta { text-align: center; padding: 9px; border-radius: 8px; font-weight: 600; font-size: 12px; background: var(--p-accent); color: var(--p-ink); }
.bp-credit { position: absolute; z-index: 1; left: 14px; bottom: 12px; font-size: 8px; color: rgba(255, 255, 255, .45); }
/* Vista previa del acceso de cliente (estilo mixto con los 4 colores) */
.cp-preview { border-radius: 14px; overflow: hidden; background: var(--light); color: var(--text); border: 1px solid rgba(255, 255, 255, .12); font-family: var(--sans); max-width: 420px; }
.cp-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; background: var(--dark); }
.cp-logo { height: 24px; width: auto; max-width: 140px; object-fit: contain; }
.cp-name { color: #fff; font-size: 14px; }
.cp-link { color: var(--accent2-od); font-size: 11px; font-weight: 600; }
.cp-body { padding: 14px; }
.cp-card { background: #fff; border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 9px; box-shadow: 0 12px 30px -22px rgba(var(--dark-rgb), .5); }
.cp-eyebrow { margin: 0; font-size: 9px; font-weight: 600; letter-spacing: .26em; text-transform: uppercase; color: var(--accent-text); }
.cp-lot { font-size: 17px; color: var(--text); margin-top: -4px; }
.cp-prog { background: var(--dark2); color: #fff; border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 9px; }
.cp-prog p { margin: 0; font-size: 12px; } .cp-prog b { font-size: 17px; } .cp-prog span { opacity: .7; }
.cp-prog i { display: block; height: 7px; border-radius: 4px; background: rgba(255, 255, 255, .14); overflow: hidden; }
.cp-prog em { display: block; height: 100%; border-radius: inherit; background: var(--accent2-od); }
.cp-btn { text-align: center; padding: 9px; border-radius: 99px; font-weight: 600; font-size: 11.5px; background: var(--accent); color: var(--accent-ink); }
.cp-btn.ghost { background: #fff; color: var(--text); box-shadow: inset 0 0 0 1px rgba(var(--dark2-rgb), .25); }
@media (max-width: 900px) { .brand-layout { grid-template-columns: 1fr; } .logo-drop { grid-template-columns: 1fr; } }

/* Ojito de contraseña */
.pw-wrap { position: relative; display: block; width: 100%; }
.pw-wrap input { padding-right: 46px !important; }
.pw-eye {
  position: absolute; top: 50%; right: 6px; transform: translateY(-50%); width: 34px; height: 34px;
  display: grid; place-items: center; border: 0; border-radius: 6px; background: none; color: var(--ink-muted); cursor: pointer;
  transition: color .2s, background .2s;
}
.pw-eye:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.pw-eye.on { color: var(--arena); }
.pw-eye:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.pw-eye svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.pw-match { font-size: 12px; min-height: 1em; }
.pw-match.ok { color: #8fe6bb; }
.pw-match.bad { color: #ffaaa8; }
.auth-card > p.small { font: 12.5px/1.5 var(--sans); font-style: normal; margin-top: 16px; }

/* Importar plano PDF */
.ic-plano { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.1' stroke-linejoin='round'%3E%3Cpath d='M3 6l6-3 6 3 6-3v15l-6 3-6-3-6 3V6Z'/%3E%3Cpath d='M9 3v15M15 6v15'/%3E%3C/svg%3E"); }
dialog.plano-modal { width: min(1280px, calc(100vw - 24px)); max-width: none; max-height: calc(100vh - 24px); padding: 18px 20px; overflow: hidden; display: none; flex-direction: column; }
dialog.plano-modal[open] { display: flex; }
.plano-head { display: flex; align-items: center; gap: 18px; margin-bottom: 14px; flex-wrap: wrap; }
.plano-head h2 { font-size: 20px; margin: 0; }
.plano-head [data-close] { margin-left: auto; }
.plano-steps { list-style: none; display: flex; gap: 6px; margin: 0; padding: 0; flex-wrap: wrap; }
.plano-steps li { font-size: 12px; color: var(--ink-muted); display: flex; align-items: center; gap: 6px; padding: 5px 10px 5px 5px; border-radius: 99px; background: var(--azul-siono); }
.plano-steps li b { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--azul-medio); font-size: 12px; }
.plano-steps li.on { color: #fff; } .plano-steps li.on b { background: var(--arena); color: var(--azul-siono); }
.plano-steps li.done b { background: var(--ok); color: var(--azul-noche); }
#plano-body { min-height: 0; flex: 1; display: flex; flex-direction: column; }
.plano-drop { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 60px 20px; border: 1.5px dashed var(--arena); border-radius: var(--radius); cursor: pointer; background: rgba(var(--arena-rgb), .05); }
.plano-drop.over, .plano-drop:hover { background: rgba(var(--arena-rgb), .12); }
.plano-main { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; min-height: 0; flex: 1; }
.plano-canvas-wrap { position: relative; background: #fff; border-radius: var(--radius); overflow: auto; max-height: calc(100vh - 140px); display: flex; justify-content: center; }
.plano-canvas-wrap canvas#pl-canvas { display: block; max-width: 100%; max-height: calc(100vh - 140px); width: auto; height: auto; cursor: crosshair; touch-action: none; }
.pl-loupe { position: absolute; width: 180px; height: 180px; border-radius: 50%; border: 3px solid var(--arena); box-shadow: 0 10px 30px rgba(0, 0, 0, .5); pointer-events: none; z-index: 2; }
.plano-side { overflow-y: auto; max-height: calc(100vh - 140px); display: flex; flex-direction: column; gap: 12px; }
.plano-side h3 { margin: 4px 0 0; font-size: 16px; }
.plano-side p { margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-btn { border: 1px solid var(--line-token); background: none; color: var(--ink-muted); font: 600 12px var(--sans); padding: 6px 10px; border-radius: 6px; cursor: pointer; }
.chip-btn.on { background: rgba(79, 201, 140, .18); border-color: var(--ok); color: #bff2d8; }
.pl-count { font-size: 14px; }
.pl-count b { font-size: 22px; color: var(--arena); }
.pl-pts { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.pl-pts li { display: flex; align-items: center; gap: 8px; padding: 6px 8px; background: var(--azul-siono); border-radius: 6px; font-size: 13px; }
.pt-n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #e8a93a; color: var(--azul-noche); font-weight: 700; font-size: 12px; }
.pl-pts li .btn { margin-left: auto; }
.pl-hint { display: flex; gap: 12px; align-items: center; text-align: left; font-size: 13px; line-height: 1.45; }
.pl-hint canvas { width: 92px; height: 92px; border-radius: 6px; flex: none; border: 2px solid #e8a93a; }
.mode-hint:has(.pl-hint) { padding: 10px 14px; max-width: min(560px, calc(100% - 32px)); }
.pnlm-hotspot-base.hs-calib { width: 28px; height: 28px; border-radius: 50%; background: #e8a93a; border: 3px solid var(--azul-noche); color: var(--azul-noche); font: 700 13px Montserrat, sans-serif; display: grid; place-items: center; margin: -14px 0 0 -14px; pointer-events: none; }
@media (max-width: 900px) { .plano-main { grid-template-columns: 1fr; } }

/* Plano actual en el asistente de importación */
.pl-current { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; padding: 14px 16px; border-radius: 8px; border: 1px solid rgba(224, 98, 92, .35); background: rgba(224, 98, 92, .07); }
.pl-current .btn { flex: none; }
@media (max-width: 560px) { .pl-current { flex-direction: column; align-items: stretch; } }

/* Manzanas en el asistente del plano: letra editable */
.chip-wrap { display: inline-flex; align-items: stretch; }
.chip-wrap .chip-btn { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.chip-edit { border: 1px solid var(--line-token); border-left: 0; background: none; color: var(--ink-muted); font-size: 12px; padding: 0 8px; border-radius: 0 6px 6px 0; cursor: pointer; }
.chip-edit:hover, .chip-edit:focus-visible { color: var(--arena); background: rgba(var(--arena-rgb), .12); }
.chip-btn.warn { border-color: #e8a93a; color: #f6cf85; }

/* Plano georreferenciado (PNG + JSON) */
.pl-geo { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 14px; padding: 14px 16px; border-radius: 8px; border: 1px solid rgba(var(--arena-rgb), .45); background: rgba(var(--arena-rgb), .08); }
.pl-geo .btn { flex: none; }
@media (max-width: 560px) { .pl-geo { flex-direction: column; align-items: stretch; } }
.sitio-modal { width: min(560px, calc(100vw - 32px)); }
.sitio-modal .plano-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.err-text { color: #e0625c; }
.sitio-panel {
  position: fixed; z-index: 40; left: 16px; bottom: 16px; width: min(400px, calc(100vw - 32px)); max-height: calc(100vh - 8px); overflow-y: auto;
  padding: 14px 16px 16px; border-radius: var(--radius, 8px); display: grid; gap: 10px;
  background: rgba(var(--noche-rgb), .94); border: 1px solid rgba(var(--arena-rgb), .45); color: #fff;
  box-shadow: 0 18px 50px -12px rgba(0, 0, 0, .7); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.sitio-panel .sp-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sitio-panel .field { margin: 0; }
.sitio-panel .field span { font-size: 12px; }
.sitio-panel input[type=range] { width: 100%; }
.sitio-panel .sp-grid { display: grid; gap: 6px; }
.sitio-panel .sp-move { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.sitio-panel .sp-move .btn { min-width: 34px; touch-action: none; user-select: none; }
.sitio-panel .row.end { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.sitio-panel .icon-btn, .sitio-modal .icon-btn { background: none; border: 0; color: inherit; cursor: pointer; font-size: 16px; padding: 4px 8px; }
.sitio-panel .sp-head { cursor: grab; user-select: none; touch-action: none; margin: -4px -6px 0; padding: 4px 6px; border-radius: 6px; }
.sitio-panel .sp-head:hover { background: rgba(var(--arena-rgb), .1); }
.sitio-panel .sp-head b { flex: 1; }
.sitio-panel .sp-grip { opacity: .6; font-size: 14px; }
.sitio-panel.dragging { opacity: .88; }
.sitio-panel.dragging .sp-head { cursor: grabbing; }
.sitio-panel .sp-body { display: grid; gap: 10px; }
.sitio-panel .sp-body[hidden] { display: none; }
/* Botones del panel derecho: el texto nunca se sale, pasa a la línea siguiente */
.btn-col .btn, .ed-inspector .btn, .sitio-panel .btn { height: auto; min-height: var(--h); padding-top: 8px; padding-bottom: 8px; white-space: normal; line-height: 1.3; text-align: left; overflow-wrap: anywhere; }
.btn-col .btn { width: 100%; }

/* ---------- Plano del proyecto: selector, asistente y rutas ---------- */
.choice { display: grid; gap: 4px; text-align: left; width: 100%; padding: 16px 18px; border-radius: 8px; cursor: pointer; color: inherit;
  background: rgba(255, 255, 255, .03); border: 1px solid rgba(var(--arena-rgb), .3); font: inherit; }
.choice b { font-size: 15px; }
.choice span { font-size: 12.5px; opacity: .75; line-height: 1.4; }
.choice.main { border-color: var(--arena); background: rgba(var(--arena-rgb), .1); }
.choice:hover { background: rgba(var(--arena-rgb), .16); }
.choice-more { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-top: 4px; }
.link-btn { background: none; border: 0; padding: 4px 0; color: var(--arena); text-decoration: underline; cursor: pointer; font: inherit; font-size: 13px; }

dialog.crear-modal { width: min(1280px, calc(100vw - 24px)); max-width: none; height: min(860px, calc(100vh - 24px)); max-height: none; padding: 0; display: none; overflow: hidden; }
dialog.crear-modal[open] { display: flex; flex-direction: column; }
.cr-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; border-bottom: 1px solid rgba(201, 210, 220, .15); flex-wrap: wrap; }
.cr-head h2 { margin: 0; font-size: 18px; }
.cr-head .plano-steps { margin: 0; flex: 1; justify-content: center; }
.cr-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 340px 1fr; }
.cr-side { overflow-y: auto; padding: 16px 18px; border-right: 1px solid rgba(201, 210, 220, .15); display: flex; flex-direction: column; gap: 12px; }
.cr-stage { position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; background: #e9edf2; }
.cr-pv, .cr-map { position: relative; flex: 1; min-height: 0; }
.cr-pv.half, .cr-map.half { flex: 1 1 50%; }
.cr-map + .cr-pv.half { border-top: 2px solid var(--azul-noche); }
.pv-canvas { position: absolute; inset: 0; touch-action: none; cursor: grab; }
.pv-canvas:active { cursor: grabbing; }
.cr-empty { margin: auto; color: #5b6b7d; font-size: 14px; padding: 24px; text-align: center; }
.cr-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-top: 1px solid rgba(201, 210, 220, .15); }
.cr-actions { display: flex; gap: 8px; flex: none; }
.req { margin: 0; padding-left: 18px; display: grid; gap: 12px; }
.req li { line-height: 1.35; }
.req li.ok b::after { content: ' ✓'; color: #3fbf7f; }
.tag { display: inline-block; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; padding: 2px 6px; border-radius: 4px; background: rgba(224, 98, 92, .18); color: #ffb3ae; vertical-align: 1px; }
.tag.soft { background: rgba(63, 191, 127, .16); color: #9be3bf; }
.small-drop { padding: 14px; min-height: 0; flex-direction: row; gap: 10px; justify-content: flex-start; }
.small-drop .dz-icon { font-size: 18px; }
.seg-tabs { display: flex; border: 1px solid rgba(var(--arena-rgb), .45); border-radius: 8px; overflow: hidden; }
.seg-tabs button { flex: 1; padding: 8px 10px; background: none; border: 0; color: inherit; cursor: pointer; font: 600 12.5px var(--sans, sans-serif); }
.seg-tabs button.on { background: var(--arena); color: var(--azul-siono); }
.field.inline { display: flex; align-items: center; gap: 10px; }
.field.inline select { width: auto; }
.pts { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.pts li { display: flex; align-items: center; gap: 6px; }
.pts li b { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--arena); color: var(--azul-siono); font-size: 12px; flex: none; }
.pts input { flex: 1; min-width: 0; padding: 7px 9px; font-size: 12.5px; }
.pt-st { width: 14px; text-align: center; }
.geo-ok { padding: 10px 12px; border-radius: 8px; background: rgba(63, 191, 127, .1); border: 1px solid rgba(63, 191, 127, .35); font-size: 12.5px; display: grid; gap: 8px; }
.bar { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--arena); transition: width .3s; }
.flags { display: flex; gap: 6px; flex-wrap: wrap; font-size: 12px; }
.flags span { padding: 3px 8px; border-radius: 99px; }
.f-ok { background: rgba(63, 191, 127, .18); } .f-warn { background: rgba(232, 169, 58, .2); } .f-bad { background: rgba(224, 98, 92, .2); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.dot.ok { background: #3fbf7f; } .dot.warn { background: #e8a93a; } .dot.bad { background: #e0625c; }
.lot-form { display: grid; gap: 8px; padding: 12px; border-radius: 8px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(201, 210, 220, .15); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.warn-text { color: #f2c46d; } .ok-text { color: #8fe6bb; }
.summary { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
@media (max-width: 860px) { .cr-body { grid-template-columns: 1fr; grid-template-rows: auto 1fr; } .cr-side { max-height: 40vh; border-right: 0; } }

.ru-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ru-list li { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; background: rgba(255, 255, 255, .04); }
.ru-list li > i { width: 18px; height: 5px; border-radius: 3px; flex: none; }
.ru-list li span { flex: 1; min-width: 0; font-size: 13px; display: grid; }
.ru-list small { opacity: .65; font-size: 12px; }
.ru-colors { display: flex; gap: 8px; }
.ru-colors button { width: 26px; height: 26px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .3); cursor: pointer; }
.ru-colors button.on { border-color: #fff; box-shadow: 0 0 0 2px var(--azul-siono), 0 0 0 4px var(--arena); }
.ru-search { display: flex; gap: 6px; }
.ru-search input { flex: 1; min-width: 0; }
.ru-res { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ru-res button { width: 100%; text-align: left; background: rgba(255, 255, 255, .05); border: 1px solid rgba(201, 210, 220, .15); color: inherit; border-radius: 6px; padding: 7px 9px; cursor: pointer; font-size: 12.5px; }
.ru-res button:hover { background: rgba(var(--arena-rgb), .15); }
.ru-dest { padding: 5px 10px; border-radius: 6px; background: var(--azul-noche); color: #fff; font: 600 12px var(--sans, sans-serif); border: 1px solid var(--arena); }
.ru-pt { min-width: 22px; height: 22px; padding: 0 5px; border-radius: 11px; display: grid; place-items: center; background: #fff; color: var(--azul-noche); font: 700 11px var(--sans, sans-serif); border: 2px solid var(--azul-noche); cursor: grab; }
.ru-pt.start { background: var(--arena); }
.cr-side .field.inline { flex-direction: row; align-items: center; justify-content: flex-start; }
.cr-side .field, .cr-side .lot-form .field { flex: none; }
.cr-side > *, .cr-side .lot-form > * { flex-shrink: 0; }

/* Recordatorio semanal de respaldo (solo SIONO) */
.backup-nag { display: flex; flex-wrap: wrap; gap: 6px 12px; justify-content: center; align-items: center; padding: 8px 16px; font-size: 13px;
  background: rgba(232, 169, 58, .12); border-bottom: 1px solid rgba(232, 169, 58, .35); color: #f6cf85; text-align: center; }
.backup-nag a { color: #fff; font-weight: 600; text-decoration: underline; }

/* ---------- Logo SIONO 360° (firma + sello con el mundito) ---------- */
.siono-lockup { --bl: 10.5px; font-size: var(--bl); display: inline-flex; align-items: center; gap: 1.15em; line-height: 1; white-space: nowrap; }
.siono-lockup .bl-wm { height: 2.86em; width: auto; display: block; }
.bl-seal { display: inline-flex; align-items: center; gap: .67em; height: 2.3em; padding: 0 1.05em 0 .78em; border: 1px solid rgba(var(--arena-rgb), .6); border-radius: 99px;
  transition: border-color .4s, background-color .4s; }
.bl-globe { width: 1.25em; height: 1.25em; overflow: visible; }
.bl-globe * { stroke: var(--arena); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.bl-num { font-family: Montserrat, 'Helvetica Neue', Arial, sans-serif; font-weight: 600; font-size: 1em; letter-spacing: .22em; margin-right: -.22em; color: #eae3db; }
/* Meridianos: quietos muestran el globo; al pasar el cursor giran como un mundo */
.bl-m1, .bl-m2 { transform-box: fill-box; transform-origin: center; }
.bl-m1 { transform: scaleX(.42); }
.bl-m2 { opacity: 0; }
@keyframes blSpin { from { transform: scaleX(1); } to { transform: scaleX(-1); } }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  a:hover .bl-m1, .siono-lockup:hover .bl-m1 { animation: blSpin 1.5s linear infinite; }
  a:hover .bl-m2, .siono-lockup:hover .bl-m2 { opacity: 1; animation: blSpin 1.5s linear -.75s infinite; }
  a:hover .bl-seal, .siono-lockup:hover .bl-seal { border-color: rgba(var(--arena-rgb), .95); background: rgba(var(--arena-rgb), .08); }
}
.siono-lockup.bl-lg { --bl: 15px; }
.siono-lockup.bl-xl { --bl: 18px; }
@media (max-width: 560px) { .siono-lockup { --bl: 9px; } .siono-lockup.bl-lg { --bl: 13px; } .siono-lockup.bl-xl { --bl: 14px; } }
.logo-login { display: flex; justify-content: center; margin: 0 auto 22px; width: auto; }
.home-logo { display: inline-flex; margin-bottom: 22px; text-decoration: none; }
.home-projects { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; }
.home-projects > span { font-size: 13px; font-weight: 600; color: var(--muted); }

/* ---------- Lotes: plan de pago, pagos, documentos y acceso del cliente ---------- */
dialog.modal.lot-modal { width: min(760px, calc(100vw - 32px)); padding: 0; }
.lot-modal #lot-form { padding: 22px 24px 24px; gap: 14px; }
.lot-modal .close-x { margin-left: auto; }
.lot-tabs { margin: 0 -24px; padding: 0 14px; position: static; background: transparent; }
.lot-tabs .tab[disabled], .lot-tabs .tab.locked { opacity: .4; cursor: not-allowed; }
#tabs-hint { margin: 10px 0 0; }
.ltab { display: none; flex-direction: column; gap: 12px; }
.ltab.active { display: flex; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.plan-box { gap: 10px; }
.pay-col { min-width: 110px; }
.pay-mini { display: inline-block; vertical-align: middle; width: 64px; height: 6px; border-radius: 3px; background: var(--azul-siono); overflow: hidden; margin-right: 8px; }
.pay-mini i { display: block; height: 100%; background: var(--arena); border-radius: inherit; }
.pay-summary { border: 1px solid var(--line-token); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.pay-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.pay-big { font-size: 24px; font-weight: 600; letter-spacing: -.01em; }
.pay-bar { display: block; height: 8px; border-radius: 4px; background: var(--azul-siono); overflow: hidden; }
.pay-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--arena), #e3d2bc); border-radius: inherit; transition: width .6s var(--ease); }
.pay-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 16px; margin: 4px 0 0; }
.pay-facts div { display: flex; flex-direction: column; gap: 2px; }
.pay-facts dt { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.pay-facts dd { margin: 0; font-weight: 600; font-size: 14px; }
.pay-facts .bad dd { color: #ffaaa8; }
.sched summary { cursor: pointer; font-weight: 600; font-size: 13px; color: var(--ink-muted); }
.sched-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 4px; max-height: 260px; overflow: auto; }
.sched-list li { display: grid; grid-template-columns: 1fr 1fr 1fr 1.2fr; gap: 8px; padding: 7px 10px; border-radius: 8px; background: var(--azul-siono); font-size: 13px; }
.sched-list .q-pagada .q-state { color: #8ff0c1; } .sched-list .q-vencida .q-state { color: #ffaaa8; } .sched-list .q-parcial .q-state { color: #ffd98f; } .sched-list .q-pendiente .q-state { color: var(--muted); }
.rec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rec-head h3 { margin: 0; font-size: 15px; font-weight: 600; }
.rec-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rec-list li { display: grid; grid-template-columns: 1fr auto; gap: 2px 14px; align-items: center; padding: 10px 14px; border-radius: var(--radius); background: var(--azul-siono); }
.rec-list li.muted { background: none; padding: 6px 0; }
.rec-main { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rec-amt { font-weight: 600; }
.rec-sub { grid-column: 1; font-size: 12.5px; }
.rec-act { grid-row: 1 / span 2; grid-column: 2; display: flex; align-items: center; gap: 6px; }
.rec-form { border: 1px solid var(--line-token); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.rec-form input[type=file] { padding: 8px; font-size: 12.5px; }
.acc-card { margin-top: 12px; padding: 14px 16px; border-radius: var(--radius); background: var(--azul-siono); display: flex; flex-direction: column; gap: 10px; }
.acc-msg { width: 100%; font: 13px/1.5 var(--sans); background: var(--azul-noche); color: var(--text); border: 1px solid var(--line-token); border-radius: 8px; padding: 10px 12px; resize: vertical; }
@media (max-width: 640px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .lot-tabs { overflow-x: auto; }
  .sched-list li { grid-template-columns: 1fr 1fr; }
  .rec-list li { grid-template-columns: 1fr; }
  .rec-act { grid-row: auto; grid-column: 1; margin-top: 6px; }
}
.lot-modal .icon-btn, .rec-list .icon-btn { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 15px; padding: 4px 8px; border-radius: 6px; }
.lot-modal .icon-btn:hover, .rec-list .icon-btn:hover { color: #ffaaa8; background: rgba(239, 100, 97, .12); }
.portal-url { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-weight: 600; font-size: 15px; margin: 0 0 12px; }
.code-snippet { width: 100%; font: 12px/1.5 ui-monospace, monospace; background: var(--azul-noche); color: var(--text); border: 1px solid var(--line-token); border-radius: 8px; padding: 10px 12px; resize: vertical; margin-bottom: 10px; }

/* Teléfonos: código de país + número */
.phone-field { display: flex; gap: 8px; align-items: stretch; }
.phone-field select { flex: 0 0 auto; width: 9.5em; min-width: 0; padding-right: 26px; }
.phone-field input { flex: 1 1 0; min-width: 0; }
@media (max-width: 480px) { .phone-field select { width: 7.5em; } }

/* ---------- Auditoría UI/UX: legibilidad y uso táctil ---------- */
small { font-size: max(12px, .85em); }
.role-tag.r-inmobiliaria { color: #eae3db; }
/* Celular: campos de 16 px para que el iPhone no haga zoom al escribir */
@media (max-width: 640px) {
  input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=color]), select, textarea { font-size: 16px; }
}
/* Pantallas táctiles: todo lo que se toca mide al menos 44 px */
@media (pointer: coarse) {
  .btn, .btn.sm, .btn.xs { --h: 44px; }
  .filter-seg button, .seg, .tabs .tab, .lot-tabs .tab { min-height: 44px; }
  .main-nav a { min-height: 44px; display: inline-flex; align-items: center; }
  .brand-mini { min-height: 44px; }
  .pw-eye { width: 44px; height: 44px; right: 2px; }
  .icon-btn, .lot-modal .icon-btn, .rec-list .icon-btn { min-width: 44px; min-height: 44px; display: inline-grid; place-items: center; }
  input:not([type=checkbox]):not([type=radio]):not([type=file]), select { min-height: 44px; }
  .color-row input[type=color] { width: 48px; height: 44px; }
  details > summary { min-height: 44px; display: flex; align-items: center; }
}
/* Foco con teclado más visible en los campos */
input:focus-visible, select:focus-visible, textarea:focus-visible { box-shadow: 0 0 0 3px rgba(216, 195, 160, .5); }
#pano:focus-visible { outline: 2px solid rgba(255, 255, 255, .75); outline-offset: -4px; }
@media (pointer: coarse) {
  input[type=file] { min-height: 44px; padding: 10px 0; }
  .portal-url a, table.data td a:not(.btn) { display: inline-flex; align-items: center; min-height: 44px; }
}
@media (max-width: 640px) { .code-snippet { font-size: 16px; } }
.colors-grid { align-items: end; }

/* ---------- Marca: tipografías (máximo 2) con su vista previa ---------- */
.fonts-grid { align-items: start; }
.font-field select { width: 100%; }
.font-field input[type=file] { margin-top: 8px; }
.font-sample { margin: 10px 0 0; padding: 12px 14px; min-height: 52px; display: flex; align-items: center; border-radius: var(--radius);
  background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .08); overflow-wrap: anywhere; }
.font-sample-title { font-family: var(--pf-title, var(--sans)); font-weight: var(--pf-title-w, 700); font-size: 22px; line-height: 1.2; }
.font-sample-text { font-family: var(--pf-text, var(--sans)); font-weight: 400; font-size: 15px; line-height: 1.5; color: var(--ink-muted); }
.brand-preview, .cp-preview { font-family: var(--pf-text, var(--sans)); font-synthesis: none; }
.bp-card strong, .bp-sheet strong, .cp-lot, .cp-name { font-family: var(--pf-title, var(--sans)); font-weight: var(--pf-title-w, 600); }
.bp-card em { font-family: var(--pf-accent, var(--serif)); font-style: var(--pf-accent-style, italic); }

/* ---------- Descargar clientes ---------- */
.dl-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.dl-stats div { flex: 1 1 130px; padding: 14px 16px; border-radius: var(--radius); background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .08); }
.dl-stats b { display: block; font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.dl-stats span { font-size: 13px; color: var(--ink-muted); }
.dl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-bottom: 14px; }
.dl-card { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; padding: 20px; border-radius: var(--radius); border: 1px solid rgba(255, 255, 255, .1); background: rgba(255, 255, 255, .025); }
.dl-card h2 { margin: 0; font-size: 18px; }
.dl-list { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 14px; line-height: 1.5; color: var(--ink-muted); }
.dl-list b { color: #fff; font-weight: 600; }
.dl-card .btn { margin-top: auto; }

/* ---------- Documentos del cliente: lista de control ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.doc-check:empty { display: none; }
.doc-check { margin: 4px 0 12px; padding: 12px 14px; border-radius: var(--radius); background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .08); }
.doc-check-head { margin: 0 0 8px; font-weight: 600; font-size: 14px; }
.doc-check ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 8px; }
.doc-check li { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; font-size: 13px; }
.doc-check li.ok { background: rgba(79, 201, 140, .14); color: #a9ecc9; }
.doc-check li.miss { background: rgba(232, 169, 58, .14); color: #f6d08f; }
.doc-badge { display: inline-block; margin-top: 3px; font-size: 12px; font-weight: 600; }
.doc-badge.ok { color: #8fe6bb; }
.doc-badge.warn { color: #f6cf85; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 12px; border-radius: var(--radius); border: 1px solid rgba(255, 255, 255, .12); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--arena); flex: none; }
.check:has(input:checked) { border-color: rgba(var(--arena-rgb), .6); background: rgba(var(--arena-rgb), .07); }

/* ---------- Dominio propio de la inmobiliaria: su logo y sus tipografías ---------- */
.co-lockup { display: inline-flex; align-items: center; }
.co-lockup img { display: block; height: 36px; width: auto; max-width: 190px; object-fit: contain; }
.co-lockup b { font: 600 17px/1.1 var(--font-title, var(--sans)); color: #fff; letter-spacing: 0; }
.co-lockup.bl-lg img { height: 64px; max-width: 260px; margin: 0 auto; }
.co-lockup.bl-lg b { font-size: 26px; }
.logo-login .co-lockup { justify-content: center; width: 100%; }
body.brand-fonts { --sans: var(--font-text); --serif: var(--font-text); font-synthesis: none; }
body.brand-fonts h1, body.brand-fonts h2, body.brand-fonts .display { font-family: var(--font-title); font-weight: var(--title-w, 600); letter-spacing: 0; }
.portal-form { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.portal-form .field { flex: 1 1 260px; margin: 0; }
/* Los textos que en SIONO van en Cormorant cursiva, con la tipografía de textos de la inmobiliaria: rectos y a su tamaño */
body.brand-fonts .bajada { font-style: normal; font-weight: 400; font-size: 18px; line-height: 1.45; }
body.brand-fonts .descripcion, body.brand-fonts .empty p.muted, body.brand-fonts .stage-empty p { font-style: normal; font-weight: 400; font-size: 16px; }
body.brand-fonts .auth-card > p { font-style: normal; font-size: 15px; }
body.brand-fonts .empty h2, body.brand-fonts dialog.modal h2 { font-family: var(--font-title); }

/* ---------- Precios en Excel ---------- */
dialog.modal.prices-modal { width: min(820px, calc(100vw - 32px)); padding: 22px 24px 24px; }
.prices-modal .close-x { margin-left: auto; }
.prices-modal > .stack { gap: 14px; }
.prices-steps { margin: 0; padding: 0; list-style: none; counter-reset: ps; display: grid; gap: 10px; }
.prices-steps li { counter-increment: ps; position: relative; padding: 12px 14px 12px 50px; border: 1px solid var(--line); border-radius: 12px; line-height: 1.5; }
.prices-steps li::before { content: counter(ps); position: absolute; left: 14px; top: 12px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  font-size: 12px; font-weight: 700; background: rgba(var(--arena-rgb), .18); color: var(--arena); }
.prices-steps .btn { margin-top: 8px; display: inline-flex; }
.prices-pick { cursor: pointer; }
.prices-sum { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.prices-sum span { padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line); font-size: 13px; }
.prices-list { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin-bottom: 10px; }
.prices-list summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.prices-list ul { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; max-height: 220px; overflow: auto; }
.prices-list li { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.prices-table { max-height: 46vh; overflow: auto; }
.prices-table td { font-size: 13px; }
@media (max-width: 600px) {
  dialog.modal.prices-modal { padding: 18px 16px 20px; }
  .prices-list li { flex-direction: column; gap: 2px; }
}

/* Aviso bajo un campo cuando lo escrito no sirve (p. ej. enlace que no es de Google Maps) */
.field small.err { color: #e0625c; }

/* Plazo para completar la inicial */
.due-badge { display: inline-block; margin-top: 4px; font-size: 11.5px; color: var(--ink-muted); }
.due-badge.soon { color: #f6d08f; font-weight: 600; }
.due-badge.late { color: #ff9b97; font-weight: 600; }
.idue-hint { display: block; margin: -4px 0 12px; }

/* Precio final acordado (aparte del de lista) */
.final-badge { color: #f6d08f; font-weight: 600; }
.final-field input { border-color: rgba(246, 208, 143, .55); }

/* Campo con error: recuadro rojo que parpadea y aviso corto encima */
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: #ff5a55 !important; box-shadow: 0 0 0 3px rgba(255, 90, 85, .25); animation: fieldBlink .5s ease-in-out 0s 6 alternate; }
@keyframes fieldBlink { from { box-shadow: 0 0 0 2px rgba(255, 90, 85, .15); } to { box-shadow: 0 0 0 6px rgba(255, 90, 85, .55); } }
.field-err { display: block; margin: 0 0 6px; padding: 5px 9px; border-radius: 6px; background: rgba(255, 90, 85, .14); color: #ffb0ad; font-size: 12.5px; font-weight: 600; line-height: 1.35; }
@media (prefers-reduced-motion: reduce) { .field.invalid input, .field.invalid select { animation: none; } }

/* Navegación de la ficha: Documentos → Acceso del cliente */
.step-nav { margin-top: 18px; padding-top: 14px; border-top: 1px solid rgba(58, 85, 119, .55); }

/* Reserva en curso: voucher de la separación y convenio obligatorios */
.res-alert { border: 2px solid #ef6461; background: rgba(239, 100, 97, .14); border-radius: 12px; padding: 16px 18px; margin-bottom: 16px; color: #ffd0ce; animation: fieldBlink 1.1s ease-in-out infinite alternate; }
.res-alert .res-title { display: block; font-size: 15px; color: #ff8f8b; margin-bottom: 4px; }
.res-alert p { margin: 0 0 12px; font-size: 13px; }
.res-alert .res-btn { --h: 52px; width: 100%; font-size: 16px; font-weight: 700; background: #e0453f; border-color: #e0453f; color: #fff; }
.res-alert .res-btn:hover { background: #c93a35; }
.res-alert.shake { animation: resShake .45s ease, fieldBlink 1.1s ease-in-out .45s infinite alternate; }
@keyframes resShake { 0%, 100% { transform: none; } 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.miss-tag { font-size: 12px; font-weight: 700; color: #fff; background: #e0453f; padding: 3px 8px; border-radius: 999px; }
.res-badge { display: inline-block; margin-top: 4px; font-size: 11px; font-weight: 700; color: #fff; background: #e0453f; padding: 2px 7px; border-radius: 999px; }
.res-alert .res-btns { display: grid; gap: 10px; }
.res-alert .res-q { margin: 6px 0 2px; font-size: 13px; color: #ffe1df; }
.res-alert .res-btn.alt { background: transparent; border: 2px solid #ff8f8b; color: #fff; }
.res-alert .res-btn.alt:hover { background: rgba(255, 143, 139, .15); }
.res-alert .res-btns + .res-btns { margin-top: 12px; padding-top: 12px; border-top: 1px dashed rgba(255, 143, 139, .4); }

/* Otro lote para el mismo cliente */
.another-box { margin-top: 18px; padding: 14px 16px; border: 1px dashed rgba(201, 180, 160, .45); border-radius: 12px; background: rgba(201, 180, 160, .06); }
.another-box p { margin: 0 0 10px; font-size: 13px; }
.pick-modal { max-width: 460px; }
.pick-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 55vh; overflow: auto; }
.pick-list button { width: 100%; display: flex; justify-content: space-between; gap: 12px; align-items: center; text-align: left; padding: 11px 14px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .1); background: rgba(255, 255, 255, .03); color: inherit; font: inherit; cursor: pointer; }
.pick-list button:hover { border-color: rgba(201, 180, 160, .6); background: rgba(201, 180, 160, .08); }
.pick-list .muted { font-size: 12px; }

/* ---------- Configurar edificio (departamentos) ---------- */
.bld-sec { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 22px 24px; margin-bottom: 18px; }
.bld-sec h2 { font-size: 18px; margin: 0 0 12px; }
.bld-sec h2 small { font-size: 13px; color: var(--muted); font-weight: 500; }
.bld-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.bld-head h2 { margin: 0; }
.bld-types { display: flex; gap: 10px; flex-wrap: wrap; }
.bld-type { border: 1.5px solid var(--line-2); background: var(--bg-2, rgba(0,0,0,.15)); color: var(--text); font: 600 14px var(--sans); padding: 12px 18px; border-radius: 12px; cursor: pointer; }
.bld-type.on { border-color: var(--arena, #c4b5a7); background: rgba(196, 181, 167, .16); }
.bld-cards { display: grid; gap: 12px; margin-top: 14px; }
.bld-card { border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: grid; gap: 12px; background: rgba(0, 0, 0, .12); }
.bld-meta b { font-size: 22px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.chks { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; }
.chks .chk { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.bld-gen, .bld-filter, .bld-bulk { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; align-items: end; }
.bld-bulk { margin: 12px 0; padding: 14px; border-radius: 12px; background: rgba(196, 181, 167, .1); border: 1px solid rgba(196, 181, 167, .3); }
.bld-bulk > b { align-self: center; }
.bld-table { margin-top: 14px; overflow-x: auto; }
.bld-table table.data td { padding: 8px 10px; vertical-align: middle; }
.bld-table input:not([type=checkbox]), .bld-table select { padding: 7px 9px; font-size: 13px; min-width: 110px; }
.bld-table .w-s { min-width: 64px; width: 72px; }
.bld-table .w-m { min-width: 110px; width: 120px; }
.bld-table tr.busy td { background: rgba(242, 184, 75, .06); }
.bld-save { position: sticky; bottom: 0; z-index: 5; display: flex; justify-content: flex-end; align-items: center; gap: 14px; padding: 14px 0; background: linear-gradient(180deg, transparent, var(--bg, #0b1626) 40%); }
.bld-save .warn { color: #ffd98f; }
@media (max-width: 760px) {
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .bld-sec { padding: 18px 16px; }
}

/* ---------- Unidades: cuadro de departamentos por piso ---------- */
.unit-facts { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 4px; }
.unit-facts span { font-size: 12px; padding: 4px 10px; border-radius: 99px; background: rgba(255, 255, 255, .07); border: 1px solid var(--line); }
.stack-plan { display: grid; gap: 18px; margin-bottom: 18px; }
.sp-tower { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 18px 20px; }
.sp-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.sp-head h3 { margin: 0; font-size: 17px; }
.sp-scroll { overflow-x: auto; padding-bottom: 4px; }
.sp-grid { display: grid; gap: 6px; min-width: max-content; }
.sp-row { display: flex; gap: 6px; align-items: stretch; }
.sp-floor { flex: none; width: 78px; display: flex; align-items: center; font-size: 12px; font-weight: 700; color: var(--muted); }
.sp-cell { flex: none; width: 118px; min-height: 64px; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 10px; border-radius: 10px; border: 1px solid; cursor: pointer; text-align: left; color: var(--text); font: 500 12px var(--sans); transition: transform .12s, opacity .2s; }
.sp-cell:hover { transform: translateY(-2px); }
.sp-cell:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.sp-cell b { font-size: 15px; }
.sp-cell small { font-size: 11px; opacity: .85; line-height: 1.3; }
.sp-cell .sp-st { font-style: normal; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; margin-top: auto; }
.sp-cell.st-disponible { background: rgba(62, 207, 142, .14); border-color: rgba(62, 207, 142, .5); }
.sp-cell.st-reservado { background: rgba(242, 184, 75, .16); border-color: rgba(242, 184, 75, .55); }
.sp-cell.st-vendido { background: rgba(239, 100, 97, .16); border-color: rgba(239, 100, 97, .5); }
.sp-cell.dim { opacity: .25; }

/* Nuevo recorrido: ¿lotes, departamentos o ambos? */
.ptype { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.ptype legend { font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.ptype-opt { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line-2); cursor: pointer; }
.ptype-opt:has(input:checked) { border-color: var(--arena); background: rgba(196, 181, 167, .12); }
.ptype-opt input { margin-top: 3px; accent-color: var(--arena); }
.ptype-opt span { display: flex; flex-direction: column; gap: 2px; }
.ptype-opt small { color: var(--muted); font-size: 12.5px; }
.ty-media, .ty-360 { display: grid; gap: 8px; }
.ty-label { font-size: 12px; font-weight: 600; color: var(--muted); }
.ty-imgs { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; }
.ty-img { position: relative; margin: 0; width: 132px; display: grid; gap: 6px; }
.ty-img img { width: 132px; height: 92px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: #fff; }
.ty-img select { padding: 5px 8px; font-size: 12px; }
.ty-img .icon-btn { position: absolute; top: 4px; right: 4px; background: rgba(0, 0, 0, .6); border-radius: 50%; width: 26px; height: 26px; }
.ty-add { width: 132px; height: 92px; display: flex; align-items: center; justify-content: center; text-align: center; border: 1.5px dashed var(--line-2); border-radius: 10px; font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 8px; }
.ty-add:hover { border-color: var(--arena); }
.ty-360 { font-size: 13px; }
.ptype-opt input[type=radio] { all: revert; flex: none; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--arena); }
.ty-360 .btn { justify-self: start; }
.sso-key { display: inline-block; margin-top: 6px; padding: 6px 10px; border-radius: 8px; background: rgba(0, 0, 0, .35); font-size: 13px; word-break: break-all; user-select: all; }
.sso-facts { display: grid; gap: 8px; margin: 12px 0; }
.sso-facts div { display: flex; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.sso-facts dt { color: var(--muted); min-width: 170px; }
.sso-facts dd { margin: 0; }

/* ---------- Modo privacidad ---------- */
.notice { padding: 12px 16px; border-radius: 12px; margin: 0 0 16px; font-size: 13.5px;
  background: rgba(var(--arena-rgb), .1); border: 1px solid rgba(var(--arena-rgb), .35); color: var(--arena-claro); }
.notice b { color: #fff; }
.privacy-nag { display: flex; flex-wrap: wrap; gap: 6px 12px; justify-content: center; align-items: center; padding: 8px 16px; font-size: 13px; text-align: center;
  background: rgba(224, 98, 92, .14); border-bottom: 1px solid rgba(224, 98, 92, .4); color: #ffc9c6; }
.privacy-nag.info { background: rgba(232, 169, 58, .12); border-bottom-color: rgba(232, 169, 58, .35); color: #f6cf85; }
.privacy-nag a { color: #fff; font-weight: 600; text-decoration: underline; }
.privacy-state .doc-badge { margin-right: 10px; }
.privacy-tag { display: inline-block; margin-top: 4px; font-size: 11.5px; font-weight: 600; color: #8fe6bb; }
.role-tag.r-gerencia { background: rgba(var(--arena-rgb), .9); color: var(--on-arena); }

/* ---------- Solicitudes de proyectos nuevos ---------- */
.req-title { margin: 0; padding: 18px 16px 4px; font-size: 18px; font-weight: 600; }
.req-st { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 99px; background: var(--azul-siono); color: var(--ink-muted); white-space: nowrap; }
.req-st.rs-nuevo { background: rgba(232, 169, 58, .16); color: #f6cf85; }
.req-st.rs-en_proceso { background: rgba(120, 170, 255, .16); color: #b9d0ff; }
.req-st.rs-listo { background: rgba(79, 201, 140, .16); color: #8fe6bb; }

/* ---------- Volver al panel de la inmobiliaria ---------- */
.back-link { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: var(--radius); font-size: 13px; font-weight: 600; text-decoration: none;
  color: var(--ink-muted); border: 1px solid var(--line-token); white-space: nowrap; }
.back-link:hover { color: #fff; border-color: var(--arena); }
@media (max-width: 900px) { .back-link { padding: 6px 10px; font-size: 12.5px; } }

/* ---------- Marca: ícono de la pestaña ---------- */
.favicon-form { display: grid; grid-template-columns: 230px 1fr; gap: 18px; align-items: start; }
.favicon-preview { display: grid; gap: 10px; justify-items: start; }
.favicon-preview #fav-big img { width: 72px; height: 72px; object-fit: contain; }
/* Pestaña de navegador de ejemplo: el ícono a 16 px, como se ve de verdad */
.favicon-tab { display: flex; align-items: center; gap: 8px; width: 220px; height: 34px; padding: 0 10px; border-radius: 9px 9px 0 0;
  background: #f1f3f4; color: #202124; font: 400 12.5px Arial, sans-serif; box-shadow: inset 0 -2px 0 #dadce0; }
.ft-icon { width: 16px; height: 16px; flex: none; display: grid; place-items: center; overflow: hidden; border-radius: 3px; }
.ft-icon img { width: 16px; height: 16px; object-fit: contain; }
.ft-icon .favicon-initial { width: 16px; height: 16px; border-radius: 3px; font-size: 10px; }
.ft-title { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ft-x { color: #5f6368; font-size: 14px; }
.favicon-current { width: 110px; height: 110px; border-radius: var(--radius); border: 1px solid var(--line-token); display: grid; place-items: center;
  background: repeating-conic-gradient(rgba(255, 255, 255, .06) 0 25%, transparent 0 50%) 0 0 / 16px 16px; }
.favicon-current img { width: 72px; height: 72px; object-fit: contain; }
.favicon-initial { width: 72px; height: 72px; border-radius: 16px; display: grid; place-items: center; font: 700 40px Arial, sans-serif; }
@media (max-width: 640px) { .favicon-form { grid-template-columns: 1fr; } }
