/* Promo3D · panel del cliente. Medidas y colores tomados de los mockups. */
:root {
  --navy: #0e1a2c;
  --navy-2: #1c2a40;
  --navy-btn: #152a4a;
  --bg: #f4f2ee;
  --card: #ffffff;
  --line: #e9e5de;
  --line-2: #f0ede8;
  --ink: #13213a;
  --ink-2: #2b3648;
  --muted: #6b7686;
  --muted-2: #98a1ae;
  --orange: #e0652b;
  --orange-2: #c9561f;
  --orange-soft: #fcebe1;
  --green: #4caf50;
  --green-2: #5aa766;
  --green-soft: #e5f3e7;
  --amber: #f5b12c;
  --amber-2: #f2b14f;
  --grey: #b4bac3;
  --blue: #2f73c9;
  --blue-btn: #1a6fd6;
  --purple: #5b3aa8;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(19, 33, 58, .04), 0 2px 10px rgba(19, 33, 58, .03);
  --side-w: 207px;
  --rail-w: 145px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body.panel {
  font-family: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
.ic { flex: none; display: inline-block; vertical-align: middle; }
h1, h2, h3 { margin: 0; color: var(--ink); letter-spacing: -.01em; }
.muted { color: var(--muted); }
.hide { display: none !important; }

/* ── Barra lateral ─────────────────────────── */
.side {
  position: fixed; inset: 0 auto 0 0; width: var(--side-w); background: var(--navy);
  display: flex; flex-direction: column; padding: 26px 14px 18px; z-index: 30; color: #e8edf4;
}
.side-logo { display: flex; padding: 0 0 26px 42px; }
.side-nav { display: flex; flex-direction: column; gap: 3px; }
.side-nav a {
  display: flex; align-items: center; gap: 14px; height: 44px; padding: 0 14px; border-radius: 7px;
  font-size: 15.5px; font-weight: 500; color: #eef2f7; transition: background .15s;
}
.side-nav a:hover { background: rgba(255,255,255,.05); }
.side-nav a.on { background: var(--navy-2); }
.side-nav a .ic { stroke-width: 1.7; }
.side-out { margin-top: auto; }
.side-out button {
  display: flex; align-items: center; gap: 12px; background: none; border: 0; color: #8d99ab; padding: 10px 14px; font-size: 14px;
}
.side-out button:hover { color: #fff; }
.main { margin-left: var(--side-w); min-height: 100vh; padding: 22px 26px 40px 30px; }

.side.rail { width: 110px; align-items: center; padding: 26px 10px 20px; }
.side.rail .side-logo { padding: 0 0 30px; }
.side.rail .side-nav { width: 100%; gap: 4px; }
.side.rail .side-nav a { justify-content: center; height: 46px; padding: 0; border-radius: 8px; color: #c9d3e0; }
.side.rail .side-nav a.on { background: var(--navy-2); color: #fff; }
.side.rail .side-nav span { display: none; }
.side-user { margin-top: auto; color: #c9d3e0; padding: 8px; }
body.has-rail .main { margin-left: 110px; }
body.is-bare .main { margin-left: 0; padding: 0; }

/* ── Cabeceras ─────────────────────────────── */
.topbar { display: flex; justify-content: flex-end; align-items: center; min-height: 32px; }
.acct { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; position: relative; cursor: pointer; padding: 2px 4px; }
.acct img, .acct .av { width: 31px; height: 31px; border-radius: 50%; object-fit: cover; background: #d8dee8; display: grid; place-items: center; font-size: 13px; color: var(--ink); }
.acct-menu { position: absolute; right: 0; top: 40px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.08); min-width: 220px; padding: 6px; display: none; z-index: 40; }
.acct.open .acct-menu { display: block; }
.acct-menu a, .acct-menu button { display: flex; gap: 10px; align-items: center; width: 100%; padding: 9px 10px; border-radius: 7px; background: none; border: 0; font-weight: 500; text-align: left; }
.acct-menu a:hover, .acct-menu button:hover { background: var(--bg); }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 6px 0 26px; }
.page-head h1 { font-size: 35px; font-weight: 700; letter-spacing: -.015em; }
.page-head h1 .dot { margin: 0 .35em; font-weight: 600; }
.page-head .actions { display: flex; gap: 10px; align-items: center; }
.crumbs { font-size: 13.5px; color: var(--muted); margin-bottom: 2px; display: flex; gap: 6px; align-items: center; }
.crumbs a:hover { color: var(--ink); }

/* ── Botones ───────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; height: 41px; padding: 0 17px;
  border-radius: 6px; border: 1px solid transparent; font-weight: 600; font-size: 15px; white-space: nowrap;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.btn-primary { background: var(--orange); color: #fff; box-shadow: 0 1px 2px rgba(201,86,31,.25); }
.btn-primary:hover { background: var(--orange-2); }
.btn-outline { background: #fff; border-color: #d9dde3; color: var(--ink); }
.btn-outline:hover { border-color: #b9c0ca; }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--ink); background: rgba(0,0,0,.03); }
.btn-navy { background: var(--navy-btn); color: #fff; }
.btn-navy:hover { background: #0e2240; }
.btn-danger { background: #fff; border-color: #f0c9c0; color: #b6402a; }
.btn-sm { height: 32px; padding: 0 11px; font-size: 13.5px; }
.btn-lg { height: 48px; padding: 0 24px; font-size: 16px; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.icon-btn { width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 7px; border: 0; background: transparent; color: var(--muted); }
.icon-btn:hover { background: rgba(0,0,0,.04); color: var(--ink); }

/* ── Tarjetas ──────────────────────────────── */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 22px 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }

.stat { display: flex; align-items: center; gap: 20px; padding: 18px 20px; min-height: 104px; }
.stat-ic { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.stat-ic.blue { background: #e4eef9; color: #2a6db8; }
.stat-ic.green { background: #e3f2e6; color: #3c9a52; }
.stat-ic.purple { background: #ece6f6; color: #5b3aa8; }
.stat-label { color: var(--muted); font-size: 16px; font-weight: 500; }
.stat-num { font-size: 37px; font-weight: 700; line-height: 1.05; letter-spacing: -.01em; margin-top: 2px; }

.promo-card { padding: 5px 5px 0; display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s; }
.promo-card:hover { box-shadow: 0 8px 26px rgba(19,33,58,.09); transform: translateY(-1px); }
.promo-img { aspect-ratio: 336 / 216; border-radius: 6px; overflow: hidden; background: #e8e4dd; position: relative; }
.promo-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.promo-img .badge-status { position: absolute; top: 10px; left: 10px; }
.promo-body { padding: 17px 9px 18px; }
.promo-name { font-size: 20.5px; font-weight: 700; letter-spacing: -.01em; }
.promo-loc { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 15px; margin-top: 7px; }
.promo-loc .ic { color: #7d8796; }
.availbar { display: flex; height: 18px; border-radius: 4px; overflow: hidden; margin-top: 21px; background: var(--grey); }
.availbar i { display: block; height: 100%; }
.availbar .f { background: var(--green); } .availbar .r { background: var(--amber); } .availbar .s { background: var(--grey); }
.legend-row { display: flex; gap: 6px 16px; margin-top: 12px; font-size: 14.5px; color: var(--ink-2); flex-wrap: wrap; }
.legend-row span { display: inline-flex; align-items: center; gap: 6px; }
.legend-row b { font-weight: 700; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.dot.f { background: var(--green); } .dot.r { background: var(--amber); } .dot.s { background: var(--grey); } .dot.h { background: #6b7686; }
.promo-new { border: 2px dashed #d9d3c9; background: transparent; box-shadow: none; display: grid; place-items: center; min-height: 360px; color: var(--muted); font-weight: 600; gap: 8px; text-align: center; }
.promo-new:hover { border-color: var(--orange); color: var(--orange); }

/* ── Estados (badges) ──────────────────────── */
.badge { display: inline-flex; align-items: center; justify-content: center; height: 23px; padding: 0 10px; border-radius: 4px; font-size: 12.5px; font-weight: 500; min-width: 57px; }
.badge.free { background: var(--green-2); color: #fff; }
.badge.reserved { background: var(--amber-2); color: #fff; }
.badge.sold { background: #d7dbe1; color: #59636f; }
.badge.hidden { background: #4b5563; color: #fff; }
.badge-status { height: 24px; border-radius: 12px; padding: 0 10px; font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.92); color: var(--ink); }
.badge-status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--grey); }
.badge-status.published::before { background: var(--green); }
.badge-status.paused::before { background: var(--amber); }
.badge-status.draft::before { background: #8b95a3; }
.pill { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 12px; font-size: 12.5px; font-weight: 600; background: #eef1f5; color: var(--ink-2); }
.pill.green { background: #e2f3e5; color: #237a3a; } .pill.amber { background: #fdf0d6; color: #9a6400; }
.pill.red { background: #fbe4df; color: #a83a26; } .pill.blue { background: #e3edf9; color: #2457a0; } .pill.orange { background: var(--orange-soft); color: var(--orange-2); }

/* ── Pestañas tipo píldora (Todas / Libres…) ── */
.seg { display: flex; gap: 6px; margin-bottom: 16px; }
.seg a, .seg button { height: 34px; padding: 0 18px; border-radius: 17px; border: 0; background: transparent; font-weight: 500; font-size: 14.5px; color: var(--ink-2); display: inline-flex; align-items: center; }
.seg a.on, .seg button.on { background: #1c3150; color: #fff; }
.seg a:hover:not(.on) { background: rgba(0,0,0,.04); }

/* ── Tablas ────────────────────────────────── */
.table-card { overflow: visible; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-weight: 600; color: var(--ink); padding: 14px 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; font-size: 14px; }
.tbl td { padding: 0 10px; height: 34.8px; border-bottom: 1px solid var(--line-2); color: var(--ink-2); white-space: nowrap; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl th:first-child, .tbl td:first-child { padding-left: 9px; }
.tbl .c { text-align: center; }
.tbl .r { text-align: right; }
.tbl tbody tr:hover td { background: #faf9f6; }
.tbl tr.sel td { background: #fff6ef; }
.tbl input[type=checkbox] { accent-color: var(--orange); }
.tbl .row-menu { position: relative; }
.menu-pop { position: absolute; right: 8px; top: 30px; background: #fff; border: 1px solid var(--line); border-radius: 9px; box-shadow: 0 12px 30px rgba(0,0,0,.1); z-index: 20; min-width: 190px; padding: 5px; display: none; }
.menu-pop.open { display: block; }
.menu-pop button, .menu-pop a { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; background: none; border: 0; padding: 8px 10px; border-radius: 6px; font-size: 14px; }
.menu-pop button:hover, .menu-pop a:hover { background: var(--bg); }
.menu-pop hr { border: 0; border-top: 1px solid var(--line-2); margin: 4px 0; }
.empty { padding: 50px 20px; text-align: center; color: var(--muted); }
.empty h3 { color: var(--ink); margin-bottom: 6px; font-size: 18px; }

/* ── Viviendas: layout con panel de edificio ── */
.units-layout { display: grid; grid-template-columns: minmax(0, 1fr) 286px; gap: 28px; align-items: start; }
.bview { padding: 22px 16px 18px; position: sticky; top: 20px; }
.bview h3 { font-size: 17px; font-weight: 600; padding: 0 2px; }
.bview .sub { color: var(--muted); font-size: 13.5px; margin-top: 4px; padding: 0 2px; }
.mini-bldg { margin: 18px auto 8px; display: flex; flex-direction: column; align-items: stretch; position: relative; padding: 0 0 0 28px; }
.mini-roof { height: 7px; background: #3f4a5a; margin: 0 14px; border-radius: 2px 2px 0 0; position: relative; }
.mini-roof::before { content: ''; position: absolute; left: 40%; right: 40%; top: -9px; height: 9px; background: #6d7888; border-radius: 2px 2px 0 0; }
.mini-cap { height: 5px; background: #556173; margin: 0 6px; }
.mini-floor { position: relative; display: flex; gap: 6px; justify-content: center; padding: 5px 10px 5px; background: linear-gradient(#e6e9ee, #dfe3e9); border-left: 3px solid #c8ced7; border-right: 3px solid #c8ced7; }
.mini-floor::after { content: ''; position: absolute; left: -6px; right: -6px; bottom: -2px; height: 3px; background: #9aa4b2; border-radius: 1px; }
.mini-floor .lvl { position: absolute; left: -28px; top: 50%; transform: translateY(-50%); font-size: 12.5px; font-weight: 600; color: var(--ink-2); width: 24px; text-align: center; }
.mini-unit { flex: 1; max-width: 45px; height: 25px; border-radius: 2px; display: grid; place-items: center; font-size: 13px; font-weight: 500; color: #fff; border: 2px solid rgba(255,255,255,.5); transition: transform .12s; cursor: pointer; }
.mini-unit:hover { transform: scale(1.07); }
.mini-unit.free { background: #5aa766; } .mini-unit.reserved { background: #f2b14f; } .mini-unit.sold { background: #c3c9d2; } .mini-unit.hidden { background: #6b7686; }
.mini-ground { height: 40px; margin: 0 4px; background: linear-gradient(#cdd3db, #b9c1cc); position: relative; display: flex; justify-content: center; gap: 6px; align-items: flex-end; padding: 0 12px 0; }
.mini-ground i { display: block; width: 28px; height: 30px; background: #8b97a8; border: 2px solid #e8ebef; border-bottom: 0; }
.mini-ground i.door { background: linear-gradient(90deg, #9fb9cf, #c8d8e5); width: 34px; }
.mini-tree { position: absolute; bottom: 0; width: 18px; }
.mini-tree::before { content: ''; position: absolute; bottom: 10px; left: 0; width: 18px; height: 26px; background: #5a9a4a; border-radius: 50% 50% 45% 45%; }
.mini-tree::after { content: ''; position: absolute; bottom: 0; left: 8px; width: 3px; height: 12px; background: #7b5a3c; }
.mini-tree.l { left: -16px; } .mini-tree.r { right: -16px; }
.mini-base { height: 5px; background: #a9b1bc; margin: 0 -10px; border-radius: 2px; }
.bview .legend { border-top: 0; margin-top: 18px; padding: 0 2px; }
.bview .legend h4 { margin: 0 0 14px; font-size: 15.5px; font-weight: 600; }
.legend-line { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; font-size: 14.5px; }
.legend-line span:first-child { display: flex; gap: 12px; align-items: center; }
.legend-line .dot { width: 14px; height: 14px; }
.legend-line .n { color: var(--muted); font-size: 13.5px; }
.legend-total { display: flex; justify-content: space-between; border-top: 1px solid var(--line); margin-top: 14px; padding-top: 16px; font-size: 14px; }
.legend-total b { font-size: 16px; }
.bulkbar { display: flex; align-items: center; gap: 10px; background: #1c3150; color: #fff; border-radius: 9px; padding: 9px 12px 9px 16px; margin-bottom: 12px; font-size: 14px; }
.bulkbar select, .bulkbar input { height: 32px; border-radius: 6px; border: 0; padding: 0 8px; color: var(--ink); }
.bulkbar .sp { flex: 1; }

/* ── Formularios ───────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > label, .lbl { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: 12.5px; color: var(--muted); }
.inp, .field input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=color]), .field select, .field textarea {
  width: 100%; height: 42px; border: 1px solid #dcdfe5; border-radius: 6px; background: #fff; padding: 0 12px; font-size: 15px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.field textarea { height: auto; min-height: 90px; padding: 10px 12px; resize: vertical; }
.inp:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: #93a3b8; box-shadow: 0 0 0 3px rgba(28,49,80,.07); }
.row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.row-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; }
.row-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 14px; }
.check { display: flex; align-items: center; gap: 9px; font-size: 14.5px; cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--orange); }
.drop {
  border: 2px dashed #d5d0c6; border-radius: 12px; padding: 32px 20px; text-align: center; color: var(--muted); background: #fbfaf7; cursor: pointer; transition: border-color .15s, background .15s; display: block;
}
.drop:hover, .drop.over { border-color: var(--orange); background: #fff8f3; }
.drop b { color: var(--ink); display: block; margin: 8px 0 4px; font-size: 16px; }
.drop input { display: none; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }
.section-title { font-size: 18px; font-weight: 700; margin: 0 0 14px; }
.sep { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }

/* Interruptor naranja (Ático, Publicado) */
.switch { position: relative; display: inline-block; width: 56px; height: 30px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch i { position: absolute; inset: 0; border-radius: 15px; background: #d2d6dc; transition: background .2s; cursor: pointer; }
.switch i::after { content: ''; position: absolute; left: 3px; top: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
.switch input:checked + i { background: var(--orange); }
.switch input:checked + i::after { transform: translateX(26px); }
.switch.sm { width: 40px; height: 22px; }
.switch.sm i::after { width: 16px; height: 16px; }
.switch.sm input:checked + i::after { transform: translateX(18px); }

/* ── Modal ─────────────────────────────────── */
.modal { position: fixed; inset: 0; background: rgba(14,26,44,.42); display: none; align-items: flex-start; justify-content: center; z-index: 100; padding: 6vh 16px; overflow: auto; backdrop-filter: blur(2px); }
.modal.open { display: flex; }
.modal-box { background: #fff; border-radius: 14px; width: min(620px, 100%); box-shadow: 0 30px 80px rgba(0,0,0,.25); }
.modal-box.wide { width: min(880px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px 6px; }
.modal-head h3 { font-size: 20px; }
.modal-body { padding: 14px 24px 22px; }

/* ── Toast ─────────────────────────────────── */
.toast {
  position: fixed; top: 16px; left: 50%; transform: translate(-50%, -30px); opacity: 0; background: #fff; border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0,0,0,.14); padding: 9px 12px 9px 14px; display: flex; align-items: center; gap: 12px; font-size: 14.5px; z-index: 200;
  transition: transform .3s, opacity .3s; color: var(--ink-2);
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast .ic { color: #2e9d55; }
.toast.err .ic { color: #c0392b; }
.toast-x { border: 0; background: none; color: #9aa3af; padding: 2px; margin-left: 4px; }

/* ── Hub de promoción (pasos) ──────────────── */
.steps { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.step { padding: 20px; display: flex; flex-direction: column; gap: 10px; transition: box-shadow .2s, border-color .2s; }
.step:hover { box-shadow: 0 8px 24px rgba(19,33,58,.08); border-color: #ddd6cb; }
.step-top { display: flex; align-items: center; justify-content: space-between; }
.step-n { width: 34px; height: 34px; border-radius: 50%; background: #eef1f5; display: grid; place-items: center; font-weight: 700; color: var(--ink-2); }
.step.done .step-n { background: #e2f3e5; color: #2c8a45; }
.step h3 { font-size: 17px; }
.step p { margin: 0; color: var(--muted); font-size: 14px; }
.hub-hero { display: grid; grid-template-columns: 360px 1fr; gap: 24px; margin-bottom: 26px; }
.hub-hero .promo-img { aspect-ratio: 16/10; border-radius: 10px; }
.kv { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.kv div { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.kv b { display: block; font-size: 24px; } .kv span { color: var(--muted); font-size: 13.5px; }

/* ── Editor del edificio (foto 2) ──────────── */
body.page-building .main { padding: 0; height: 100vh; overflow: hidden; }
.bed { display: grid; grid-template-columns: minmax(0, 1fr) 350px; height: 100vh; }
.bed-stage { position: relative; background: #1a2333; overflow: hidden; user-select: none; }
.bed-stage .imgwrap { position: absolute; inset: 0; }
.bed-stage img.render { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.bed-stage svg.ov { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ov .fl-line { fill: none; stroke: #f0612a; stroke-width: 2.4; stroke-linejoin: round; }
.ov .fl-band { fill: rgba(240,110,40,0); transition: fill .15s; cursor: pointer; }
.ov .fl-band:hover { fill: rgba(240,110,40,.16); }
.ov .fl-band.sel { fill: rgba(240,110,40,.32); }
.ov .fl-band.off { fill: rgba(10,14,22,.35); }
.ov .h { fill: #fff; stroke: #f0612a; stroke-width: 2.2; cursor: grab; }
.ov .h:hover, .ov .h.drag { fill: #f0612a; r: 7; }
.ov .h-big { fill: #f0612a; stroke: #fff; stroke-width: 2; }
.ov .tag rect { fill: #e2602a; }
.ov .tag text { fill: #fff; font: 600 13px Figtree, sans-serif; }
.bed-toast { position: absolute; top: 15px; left: 50%; transform: translateX(-50%); background: #fff; border-radius: 7px; padding: 0 12px 0 13px; height: 37px; display: flex; align-items: center; gap: 12px; font-size: 13.5px; color: var(--ink-2); box-shadow: 0 4px 18px rgba(0,0,0,.18); white-space: nowrap; z-index: 5; }
.bed-toast .ic { color: #2e9d55; }
.bed-empty { position: absolute; inset: 0; display: grid; place-items: center; padding: 40px; }
.bed-empty .drop { background: rgba(255,255,255,.96); width: min(520px, 100%); }
.bed-tools { position: absolute; left: 16px; bottom: 16px; display: flex; gap: 8px; z-index: 5; }
.bed-tools .btn { background: rgba(14,26,44,.78); color: #fff; border: 1px solid rgba(255,255,255,.15); backdrop-filter: blur(6px); height: 36px; font-size: 13.5px; font-weight: 500; }
.bed-tools .btn:hover { background: rgba(14,26,44,.92); }
.bed-panel { background: #fff; border-left: 1px solid var(--line); display: flex; flex-direction: column; padding: 22px 23px 22px 25px; overflow: hidden; }
.bed-panel h2 { font-size: 19px; font-weight: 600; display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.bed-panel h2 .ic { color: var(--ink-2); }
.floor-list { flex: 1; overflow: auto; margin: 0 -4px; padding: 0 4px; scrollbar-width: thin; }
.fl-row { display: grid; grid-template-columns: 44px 1fr auto 34px; align-items: center; height: 30.2px; border-top: 1px solid var(--line-2); font-size: 14px; cursor: pointer; border-radius: 3px; }
.fl-row:first-child { border-top: 1px solid var(--line-2); }
.fl-row .n { text-align: center; color: var(--ink-2); }
.fl-row .nm { color: var(--ink-2); display: flex; gap: 10px; align-items: baseline; }
.fl-row .nm input { border: 0; background: transparent; font: inherit; color: inherit; width: 110px; padding: 0; outline: none; }
.fl-row .nm input:focus { border-bottom: 1px dashed var(--orange); }
.fl-row .note { color: var(--muted-2); font-size: 13px; }
.fl-row .eye { border: 0; background: none; color: #1f2b3d; display: grid; place-items: center; }
.fl-row.off .eye { color: #c0c6cf; }
.fl-row.off .nm { opacity: .5; }
.fl-row:hover { background: #faf8f5; }
.fl-row.sel { background: #fcebdf; }
.fl-row.sel .n, .fl-row.sel .nm, .fl-row.sel .eye { color: var(--orange); }
.fl-gap { height: 30px; display: flex; align-items: center; padding-left: 14px; border-top: 1px solid var(--line-2); color: var(--ink); font-weight: 700; letter-spacing: 1px; cursor: pointer; }
.bed-form { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 18px; }
.bed-form .lbl { display: block; font-size: 15px; font-weight: 500; margin-bottom: 9px; color: var(--ink); }
.num-input { display: flex; align-items: center; border: 1px solid #d8dce2; border-radius: 6px; height: 40px; padding: 0 6px 0 12px; }
.num-input input { border: 0; outline: none; flex: 1; font-size: 15px; background: transparent; }
.num-input .spin { display: flex; flex-direction: column; border-left: 1px solid #e3e6ea; padding-left: 6px; }
.num-input .spin button { border: 0; background: none; height: 15px; line-height: 0; padding: 0 4px; color: var(--ink-2); }
.toggle-row { display: flex; justify-content: space-between; align-items: center; margin: 14px 0 6px; font-size: 15px; font-weight: 500; }
.bed-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; margin-top: 24px; }
.bed-actions .btn { height: 41px; }

/* ── Conversión 2D → 3D (foto 3) ───────────── */
.conv { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.conv-head { display: flex; align-items: center; gap: 22px; height: 74px; padding: 0 30px; border-bottom: 1px solid #e4e0d9; }
.conv-head .logo-home { color: var(--orange); display: grid; }
.conv-head h1 { font-size: 27px; font-weight: 700; letter-spacing: -.01em; flex: 1; }
.conv-head h1 .dot { margin: 0 .45em; }
.conv-stage { flex: 1; display: grid; grid-template-columns: 1fr 70px 1fr; align-items: center; padding: 30px 40px 20px; gap: 0; min-height: 520px; }
.conv-left, .conv-right { position: relative; height: 100%; min-height: 470px; display: flex; align-items: center; justify-content: center; }
.conv-left svg { width: 100%; max-height: 480px; }
.conv-left img { max-width: 100%; max-height: 470px; display: block; }
.conv-arrow { display: grid; place-items: center; color: #6b7480; }
.conv-right canvas { width: 100% !important; height: 100% !important; display: block; }
.conv-right .viewer3d { position: absolute; inset: 0; }
.conv-progress { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: var(--muted); }
.conv-progress .bar { width: 260px; height: 6px; background: #e6e2da; border-radius: 3px; overflow: hidden; }
.conv-progress .bar i { display: block; height: 100%; background: var(--orange); width: 0; transition: width .4s; }
.conv-foot { border-top: 1px solid #e4e0d9; height: 106px; display: flex; align-items: center; padding: 0 30px 0 32px; gap: 0; }
.chk { display: flex; align-items: center; gap: 14px; font-size: 15px; color: var(--ink-2); padding-right: 24px; margin-right: 24px; border-right: 1px solid #e2ded6; height: 30px; }
.chk .ic { color: #2f8f4e; }
.chk.pending .ic { color: #c3c8cf; }
.chk.warn .ic { color: var(--amber); }
.chk:last-of-type { border-right: 0; }
.conf { font-size: 15px; color: var(--ink-2); margin-left: 8px; }
.conf b { color: var(--ink); }
.conv-foot .sp { flex: 1; }
.conv-foot .btn-primary { width: 168px; height: 48px; font-size: 16px; border-radius: 6px; }
.conv-foot .btn-outline { width: 116px; height: 48px; font-size: 16px; margin-left: 18px; color: var(--muted); border-color: #cfd3d9; }
.lbl3d { position: absolute; transform: translate(-50%, -50%); background: rgba(255,255,255,.95); border-radius: 5px; padding: 3px 9px; font-size: 13.5px; font-weight: 500; color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.12); pointer-events: none; white-space: nowrap; }
.conv-warn { margin: 0 30px; background: #fff7e6; border: 1px solid #f6dfae; color: #8a5a00; border-radius: 8px; padding: 10px 14px; font-size: 14px; display: flex; gap: 10px; align-items: center; }

/* ── Publicar (foto 8) ─────────────────────── */
.pub-head { display: flex; justify-content: space-between; align-items: center; margin: 12px 0 26px; }
.pub-head h1 { font-size: 35px; font-weight: 700; }
.pub-head h1 small { font-size: 31px; font-weight: 600; }
.pub-head h1 .dot { margin: 0 .4em; font-weight: 600; font-size: 31px; }
.pub-toggle { display: flex; align-items: center; gap: 22px; font-weight: 600; font-size: 18px; }
.pub-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 20px; }
.pub-card { padding: 24px 30px 22px 26px; min-height: 278px; }
.pub-card-h { display: flex; gap: 22px; align-items: flex-start; }
.pub-ic { width: 52px; height: 52px; border-radius: 50%; background: #eef2f6; display: grid; place-items: center; color: #22324a; flex: none; }
.pub-card h3 { font-size: 21px; font-weight: 600; margin-top: 4px; }
.pub-card p { margin: 9px 0 0; color: var(--muted); font-size: 15.5px; line-height: 1.55; }
.copy-row { display: flex; gap: 14px; margin-top: 24px; }
.copy-field { flex: 1; display: flex; align-items: center; gap: 13px; height: 50px; border: 1px solid #e1e4e8; border-radius: 6px; background: #f9fafb; padding: 0 16px; font-size: 15.5px; color: var(--ink-2); overflow: hidden; white-space: nowrap; }
.copy-field span { overflow: hidden; text-overflow: ellipsis; }
.copy-btn { width: 58px; height: 50px; border-radius: 6px; background: #13253f; color: #fff; display: grid; place-items: center; border: 0; }
.copy-btn:hover { background: #0b182b; }
.dom-field { display: flex; align-items: center; height: 48px; border: 1px solid #e1e4e8; border-radius: 6px; margin-top: 20px; padding: 0 8px 0 16px; background: #fff; }
.dom-field input { flex: 1; border: 0; outline: none; font-size: 15.5px; background: transparent; }
.ssl { display: inline-flex; align-items: center; gap: 6px; background: #e3f4e6; color: #227a3a; height: 28px; padding: 0 10px; border-radius: 5px; font-size: 14px; font-weight: 500; }
.ssl.pending { background: #fdf0d6; color: #946000; }
.ssl.off { background: #eef1f5; color: var(--muted); }
.dns-box { display: flex; gap: 22px; align-items: center; background: #f2f6fa; border: 1px solid #e3eaf1; border-radius: 6px; margin-top: 14px; padding: 13px 18px; font-size: 14px; color: #415066; }
.dns-box code { display: block; margin-top: 6px; color: var(--ink); font-size: 14.5px; font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace; }
.tabs-pill { display: flex; gap: 0; margin-top: 26px; }
.tabs-pill button { height: 37px; padding: 0 25px; border-radius: 19px; border: 0; background: #f0f2f5; font-size: 15.5px; font-weight: 500; margin-right: 3px; color: var(--ink-2); }
.tabs-pill button.on { background: var(--blue-btn); color: #fff; }
.code-box { position: relative; background: #17243a; color: #e3e9f2; border-radius: 6px; margin-top: 15px; padding: 18px 60px 18px 18px; font: 13.6px/1.65 ui-monospace, 'SFMono-Regular', Menlo, monospace; white-space: pre-wrap; word-break: break-all; }
.code-box .icon-btn { position: absolute; right: 14px; top: 14px; color: #dfe6ef; }
.code-box .icon-btn:hover { background: rgba(255,255,255,.08); color: #fff; }
.qr-row { display: flex; align-items: center; gap: 36px; margin-top: 22px; }
.qr-row .qr { width: 126px; height: 126px; }
.qr-row .qr svg { width: 100%; height: 100%; display: block; }
.btn-dl { background: #1b3557; color: #fff; height: 47px; padding: 0 19px; border-radius: 6px; font-size: 16px; font-weight: 500; }
.btn-dl:hover { background: #122842; }
.pub-extra { margin-top: 22px; }

/* ── Leads ─────────────────────────────────── */
.kanban { display: grid; grid-template-columns: repeat(5, minmax(200px, 1fr)); gap: 14px; overflow-x: auto; }
.kcol { background: #ece9e3; border-radius: 10px; padding: 10px; min-height: 300px; }
.kcol h4 { margin: 4px 6px 10px; font-size: 13.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); display: flex; justify-content: space-between; }
.lead-card { display: block; background: #fff; border-radius: 8px; padding: 11px 12px; margin-bottom: 8px; border: 1px solid var(--line); font-size: 14px; }
.lead-card:hover { border-color: #d3cbbf; }
.lead-card b { display: block; font-size: 14.5px; }
.lead-card .meta { color: var(--muted); font-size: 12.5px; margin-top: 4px; display: flex; justify-content: space-between; }

/* ── Estadísticas ──────────────────────────── */
.bars { display: flex; align-items: flex-end; gap: 4px; height: 160px; padding-top: 10px; }
.bars i { flex: 1; background: #c9d8ec; border-radius: 3px 3px 0 0; min-height: 2px; position: relative; }
.bars i:hover { background: var(--blue); }
.bars i:hover::after { content: attr(data-t); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; font-size: 12px; padding: 3px 6px; border-radius: 4px; white-space: nowrap; font-style: normal; margin-bottom: 4px; }
.hbar { display: grid; grid-template-columns: 120px 1fr 50px; gap: 10px; align-items: center; font-size: 13.5px; margin: 7px 0; }
.hbar .t { height: 12px; background: #eef1f5; border-radius: 6px; overflow: hidden; }
.hbar .t i { display: block; height: 100%; background: var(--orange); border-radius: 6px; }
.heat { display: flex; flex-direction: column-reverse; gap: 2px; }
.heat div { display: grid; grid-template-columns: 70px 1fr 40px; gap: 8px; align-items: center; font-size: 12.5px; }
.heat .cell { height: 14px; border-radius: 3px; }

/* ── Acabados (panel) ──────────────────────── */
.fin-cat { margin-bottom: 18px; }
.fin-cat-h { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line-2); }
.fin-cat-h h3 { font-size: 17px; }
.fin-opts { display: flex; gap: 22px; flex-wrap: wrap; padding: 18px 20px 20px; }
.fin-opt { width: 110px; text-align: center; font-size: 13.5px; position: relative; }
.fin-opt .sw { width: 66px; height: 66px; border-radius: 50%; margin: 0 auto 8px; border: 1px solid #e3e3e3; background-size: cover; position: relative; }
.fin-opt.def .sw { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--orange); }
.fin-opt .price { color: var(--muted); font-size: 12.5px; }
.fin-opt .del { position: absolute; top: -6px; right: 10px; display: none; }
.fin-opt:hover .del { display: grid; }
.swatch-pick { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.swatch-pick label { text-align: center; font-size: 11.5px; cursor: pointer; }
.swatch-pick input { display: none; }
.swatch-pick .sw { width: 52px; height: 52px; border-radius: 50%; margin: 0 auto 4px; background-size: cover; border: 1px solid #e0e0e0; }
.swatch-pick input:checked + .sw { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--orange); }

/* ── Planos de planta ──────────────────────── */
.fp-stage { position: relative; background: #fff; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.fp-stage img { display: block; width: 100%; }
.fp-stage svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.fp-stage polygon { fill: rgba(224,101,43,.18); stroke: var(--orange); stroke-width: 2; vector-effect: non-scaling-stroke; }
.fp-stage polygon.sel { fill: rgba(224,101,43,.35); }
.fp-stage circle { fill: #fff; stroke: var(--orange); stroke-width: 2; vector-effect: non-scaling-stroke; }
.fp-stage text { font: 700 14px Figtree, sans-serif; fill: var(--ink); paint-order: stroke; stroke: #fff; stroke-width: 3px; }

/* ── Ajustes / tablas simples ──────────────── */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.plan-card { border: 1px solid var(--line); border-radius: 10px; padding: 16px; background: #fff; }
.plan-card.on { border-color: var(--orange); box-shadow: 0 0 0 2px var(--orange-soft); }
.plan-card b { font-size: 18px; } .plan-card .pr { font-size: 22px; font-weight: 700; margin: 6px 0; }
.plan-card ul { margin: 8px 0 0; padding-left: 18px; color: var(--muted); font-size: 13.5px; }

/* ── Retoque del plano ─────────────────────── */
.retouch { display: grid; grid-template-columns: 64px 1fr 300px; height: calc(100vh - 74px); }
.rt-tools { background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; padding: 12px 10px; }
.rt-tools button { width: 44px; height: 44px; border-radius: 9px; border: 0; background: transparent; color: var(--ink-2); display: grid; place-items: center; }
.rt-tools button.on { background: var(--orange-soft); color: var(--orange-2); }
.rt-tools button:hover:not(.on) { background: var(--bg); }
.rt-canvas { position: relative; overflow: hidden; background: #fbfaf8; }
.rt-canvas svg { width: 100%; height: 100%; display: block; }
.rt-side { background: #fff; border-left: 1px solid var(--line); padding: 18px; overflow: auto; }
.rt-side h4 { margin: 0 0 10px; }
.rt-hint { font-size: 13px; color: var(--muted); background: var(--bg); border-radius: 8px; padding: 10px 12px; margin-bottom: 14px; }

/* ── Login / registro ──────────────────────── */
body.auth { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; }
.auth-art { background: var(--navy) center/cover; position: relative; color: #fff; display: flex; flex-direction: column; justify-content: flex-end; padding: 48px; }
.auth-art::before { content: ''; position: absolute; inset: 0; background: linear-gradient(transparent 40%, rgba(8,15,27,.85)); }
.auth-art > * { position: relative; }
.auth-art h2 { color: #fff; font-size: 34px; line-height: 1.15; max-width: 460px; }
.auth-art p { color: #cfd7e3; max-width: 440px; font-size: 16px; }
.auth-form { display: grid; place-items: center; padding: 40px 24px; }
.auth-box { width: min(400px, 100%); }
.auth-box h1 { font-size: 30px; margin: 22px 0 6px; }
.auth-box .btn { width: 100%; height: 46px; margin-top: 6px; }
.err-box { background: #fdecea; color: #a5321f; border-radius: 8px; padding: 10px 12px; font-size: 14px; margin-bottom: 14px; }

@media (max-width: 1100px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .units-layout { grid-template-columns: 1fr; }
  .bview { position: static; }
  .pub-grid, .settings-grid { grid-template-columns: 1fr; }
  .bed { grid-template-columns: 1fr 300px; }
  .hub-hero { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  :root { --side-w: 0px; }
  .side { position: fixed; inset: auto 0 0 0; width: 100%; height: 62px; flex-direction: row; padding: 0 6px; }
  .side-logo, .side-out, .side-user { display: none; }
  .side-nav { flex-direction: row; width: 100%; justify-content: space-around; }
  .side-nav a { flex-direction: column; gap: 2px; height: 58px; font-size: 10.5px; padding: 6px 4px; }
  .side.rail { width: 100%; }
  .side.rail .side-nav a { height: 52px; flex: 1; }
  body.has-rail .main, .main { margin-left: 0; padding: 16px 14px 90px; }
  .grid-3, .grid-2, .row, .row-3, .row-4, .kv { grid-template-columns: 1fr; }
  .page-head { flex-wrap: wrap; } .page-head h1 { font-size: 27px; }
  .table-card { overflow-x: auto; }
  .bed { grid-template-columns: 1fr; grid-template-rows: 55vh auto; height: auto; }
  body.page-building .main { height: auto; overflow: visible; }
  body.auth { grid-template-columns: 1fr; } .auth-art { display: none; }
  .conv-stage { grid-template-columns: 1fr; } .conv-arrow { transform: rotate(90deg); }
  .conv-foot { flex-wrap: wrap; height: auto; padding: 14px; gap: 8px; } .chk { border: 0; margin: 0; padding: 0 10px 0 0; }
  .kanban { grid-template-columns: repeat(5, 240px); }
}
