/* ============ Imperio — interfaz clara y moderna ============ */
:root{
  --bg:#f6f5f1; --surface:#fff; --ink:#15151a; --ink-2:#3d3d47; --muted:#7a7a86; --line:#ece9e2; --line-2:#e2ded4;
  --gold:#b7852e; --gold-2:#d9a94a; --gold-soft:#f8efdc; --gold-ink:#7a5410;
  --green:#1f9d6b; --green-soft:#e4f5ec;
  --amber:#e29a1b; --amber-soft:#fdf1d9;
  --red:#d9473f; --red-soft:#fde8e6;
  --blue:#3556d8; --blue-soft:#e8edfd;
  --slate:#1d2230; --slate-soft:#eceef3;
  --violet:#7b4fd1; --violet-soft:#f0eafb;
  --r:16px; --r-sm:11px;
  --sh:0 1px 2px rgba(20,18,10,.04),0 6px 20px rgba(20,18,10,.04);
  --sh-lg:0 20px 60px rgba(20,18,10,.18);
  --side:248px;
  --font:'Inter',system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;
  --head:'Sora','Inter',system-ui,sans-serif;
}
*{box-sizing:border-box}
html,body{margin:0}
body{background:var(--bg);color:var(--ink);font:400 14.5px/1.5 var(--font);-webkit-font-smoothing:antialiased}
h1,h2,h3,h4{font-family:var(--head);margin:0;letter-spacing:-.01em}
a{color:inherit;text-decoration:none}
button,input,select,textarea{font:inherit;color:inherit}
button{cursor:pointer;border:0;background:none;padding:0;text-align:left}
svg{width:20px;height:20px;flex:none}
.muted{color:var(--muted)} .tiny{font-size:12.5px} .grow{flex:1;min-width:0}
small{color:var(--muted);font-size:12.5px}
kbd{font:500 11px var(--font);background:var(--bg);border:1px solid var(--line-2);border-bottom-width:2px;border-radius:6px;padding:1px 6px;color:var(--muted)}
[hidden]{display:none!important}
.pad{padding:18px}

/* ---------- sidebar ---------- */
.side{position:fixed;inset:0 auto 0 0;width:var(--side);height:100vh;height:100dvh;background:var(--surface);border-right:1px solid var(--line);display:flex;flex-direction:column;padding:20px 14px;z-index:20;overflow:hidden}
.brand{display:flex;align-items:center;gap:12px;padding:4px 8px 22px;flex:none}
.brand img{width:44px;height:44px;border-radius:50%;box-shadow:0 0 0 2px var(--gold-soft),0 4px 12px rgba(183,133,46,.25)}
.brand b{display:block;font:700 18px var(--head);letter-spacing:-.02em}
.brand small{display:block;font-size:11px;letter-spacing:.18em;text-transform:uppercase;color:var(--gold)}
.nav{display:flex;flex-direction:column;gap:3px;flex:1 1 auto;min-height:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;-ms-overflow-style:none;scrollbar-width:none}
.nav::-webkit-scrollbar{width:0;height:0;display:none}
.nav a{display:flex;align-items:center;gap:12px;padding:11px 12px;border-radius:12px;color:var(--ink-2);font-weight:500;transition:.15s}
.nav a svg{color:var(--muted);transition:.15s}
.nav a:hover{background:var(--bg)}
.nav a.on{background:var(--ink);color:#fff}
.nav a.on svg{color:var(--gold-2)}
.side-foot{flex:none;margin-top:10px;display:flex;flex-direction:column;gap:12px}
.mini-link{display:flex;gap:10px;align-items:center;color:var(--muted);font-size:13px;padding:8px 12px;border-radius:10px}
.mini-link svg{width:17px;height:17px}.mini-link:hover{background:var(--bg);color:var(--ink)}
.me{display:flex;align-items:center;gap:10px;padding:10px;border:1px solid var(--line);border-radius:14px}
.me-t{flex:1;min-width:0;line-height:1.25}.me-t b{display:block;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.icon-btn{width:34px;height:34px;border-radius:10px;display:grid;place-items:center;color:var(--muted);transition:.15s}
.icon-btn:hover{background:var(--bg);color:var(--ink)}
.icon-btn svg{width:18px;height:18px}

.avatar{display:grid;place-items:center;border-radius:50%;background:linear-gradient(135deg,var(--gold-soft),#f1dcae);color:var(--gold-ink);font:600 13px var(--head);flex:none}
.avatar.sm{width:32px;height:32px;font-size:12px}.avatar.lg{width:52px;height:52px;font-size:17px}.avatar.xs{width:26px;height:26px;font-size:10px;border:2px solid #fff;margin-left:-8px}
.stack{display:flex;padding-left:8px;margin-top:8px}

/* ---------- main ---------- */
.main{margin-left:var(--side);min-height:100vh}
.top{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:22px 36px 6px;position:sticky;top:0;background:linear-gradient(var(--bg) 70%,transparent);z-index:10}
.top-title{display:flex;align-items:center;gap:12px;min-width:0}
.top-title h1{font-size:24px;line-height:1.15;margin:0}
.crumb{color:var(--muted);font-size:13.5px;line-height:1.15;display:inline-flex;align-items:center}
.search-pill{display:flex;align-items:center;gap:10px;background:var(--surface);border:1px solid var(--line);border-radius:999px;padding:9px 12px 9px 16px;color:var(--muted);min-width:340px;box-shadow:var(--sh);transition:.15s}
.search-pill:hover{border-color:var(--gold-2)}.search-pill svg{width:17px;height:17px}.search-pill span{flex:1}
.head-search{display:flex;align-items:center;gap:8px;background:var(--surface);border:1px solid var(--line);border-radius:999px;padding:6px 10px 6px 14px;color:var(--muted);min-width:min(420px,42vw);max-width:560px;flex:1 1 320px;box-shadow:var(--sh);transition:.15s}
.head-search:focus-within{border-color:var(--gold-2);box-shadow:0 0 0 3px rgba(217,169,74,.16)}
.head-search .hs-ic{width:17px;height:17px;flex:none}
.head-search input{flex:1;min-width:0;border:0;outline:0;background:none;font:inherit;color:var(--ink);padding:6px 0}
.head-search .hs-scope{flex:none;position:relative}
.head-search .hs-scope select{appearance:none;-webkit-appearance:none;border:0;background:var(--bg);color:var(--ink-2);font:600 11.5px/1 var(--head);padding:7px 22px 7px 10px;border-radius:999px;max-width:150px;cursor:pointer}
.head-search .hs-scope::after{content:"";position:absolute;right:9px;top:50%;width:6px;height:6px;border-right:1.5px solid var(--muted);border-bottom:1.5px solid var(--muted);transform:translateY(-60%) rotate(45deg);pointer-events:none}
.head-search kbd{flex:none;cursor:pointer}
.page{padding:14px 36px 60px;max-width:1360px}

/* ---------- botones ---------- */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:10px 16px;border-radius:12px;font-weight:600;font-size:14px;background:var(--surface);border:1px solid var(--line-2);transition:.15s;white-space:nowrap}
.btn:hover{border-color:var(--ink);transform:translateY(-1px)}
.btn svg{width:17px;height:17px}
.btn.primary{background:var(--ink);color:#fff;border-color:var(--ink)}
.btn.primary:hover{background:#000;box-shadow:0 6px 18px rgba(0,0,0,.22)}
.btn.primary svg{color:var(--gold-2)}
.btn.ghost{background:transparent;border-color:transparent;color:var(--ink-2)}.btn.ghost:hover{background:var(--bg);border-color:transparent}
.btn.danger-soft{background:var(--red-soft);color:var(--red);border-color:transparent}
.btn.block{width:100%}.btn.lg{padding:14px 18px;font-size:15px}
.btn:disabled{opacity:.6;pointer-events:none}
.spin{width:16px;height:16px;border:2px solid rgba(255,255,255,.4);border-top-color:#fff;border-radius:50%;animation:sp .7s linear infinite;display:inline-block}
@keyframes sp{to{transform:rotate(360deg)}}

/* ---------- inicio ---------- */
.hero{display:flex;justify-content:space-between;align-items:center;gap:20px;flex-wrap:wrap;padding:28px 30px;border-radius:22px;margin:10px 0 18px;background:radial-gradient(900px 260px at 100% 0,#f3dfb2 0,transparent 60%),linear-gradient(120deg,#fffdf8,#fbf3e2);border:1px solid #efe3c8}
.hero h2{font-size:26px;margin:4px 0 4px}.eyebrow{margin:0;text-transform:uppercase;letter-spacing:.14em;font-size:11.5px;font-weight:600;color:var(--gold)}
.hero-actions{display:flex;gap:10px;flex-wrap:wrap}
.kpis{display:grid;grid-template-columns:repeat(5,1fr);gap:12px;margin-bottom:8px}
.kpi{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:16px 18px;box-shadow:var(--sh);position:relative}
.kpi b{display:block;font:700 26px var(--head);letter-spacing:-.02em;margin-top:6px}
.kpi small{display:block}
.kpi .dot{position:absolute;right:16px;top:16px}
.dot{display:inline-block;width:9px;height:9px;border-radius:50%;margin-right:7px;background:var(--muted)}
.dot.s-AVAILABLE{background:var(--green)}.dot.s-RESERVED{background:var(--amber)}.dot.s-SOLD{background:var(--slate)}.dot.s-BLOCKED{background:#9a9aa4}.dot.s-RECOVERED{background:var(--violet)}.dot.gold{background:var(--gold-2)}
.kpi .dot{margin:0}
.cols{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);gap:28px}
.sec{font-size:15px;margin:22px 0 12px;color:var(--ink-2)}
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--sh)}
.pad-card{padding:20px 22px}
.card-h{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:16px}
.card-h.pad{padding:18px 20px 6px;margin:0}
.card-h h3{font-size:16px;margin:0}.card-h p{margin:2px 0 0}
.link{font-size:13px;font-weight:600;color:var(--gold)}.link:hover{text-decoration:underline}
.proj{display:flex;flex-direction:column;height:100%;background:var(--surface);border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--sh);padding:20px 22px;margin-bottom:12px;transition:.18s;min-width:0;overflow:hidden}
.proj:hover{transform:translateY(-2px);border-color:var(--gold-2);box-shadow:0 10px 30px rgba(183,133,46,.14)}
.proj-top{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:14px;min-width:0;flex:1 1 auto}
.proj-top>div{min-width:0;flex:1}
.proj-title-row{display:flex;align-items:flex-start;gap:10px;min-width:0}
.proj-num{flex:none;display:inline-grid;place-items:center;min-width:28px;height:28px;padding:0 7px;border-radius:9px;background:var(--ink);color:var(--gold-2);font:700 12px/1 var(--head);letter-spacing:.02em;margin-top:1px}
.proj h4{font-size:17px;margin:0;line-height:1.3;overflow-wrap:anywhere;word-break:break-word}
.proj p{margin:4px 0 0;overflow-wrap:anywhere;word-break:break-word}
.go{width:36px;height:36px;border-radius:50%;background:var(--bg);display:grid;place-items:center;transition:.18s;flex:none}
.proj:hover .go{background:var(--ink);color:var(--gold-2)}
.proj-meter{display:flex;flex-direction:column;gap:8px;margin-top:auto;flex:none}
.proj-meter-meta{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.proj-meter-pct{font-size:12.5px;color:var(--ink-2);letter-spacing:.01em}
.proj-meter-pct b{font:700 15px/1 var(--head);color:var(--ink);margin-right:4px}
.proj-meter-legend{display:flex;align-items:center;gap:10px;font-size:12px;color:var(--muted)}
.proj-meter-legend .pml{display:inline-flex;align-items:center;gap:5px}
.proj-meter-legend .dot{width:7px;height:7px;box-shadow:0 0 0 2px rgba(255,255,255,.9)}
.bar{display:flex;height:10px;border-radius:99px;overflow:hidden;background:var(--green-soft)}
.bar i{display:block;height:100%}
.bar i.s-SOLD{background:var(--slate)}.bar i.s-RESERVED{background:var(--amber)}.bar i.s-AVAILABLE{background:var(--green)}
.proj-bar{height:10px;background:#ebe8e1;box-shadow:inset 0 1px 1px rgba(20,18,10,.04)}
.proj-bar .proj-fill{background:#8fbfa4;box-shadow:none;border-radius:inherit}
.proj:hover .proj-bar{box-shadow:inset 0 1px 1px rgba(20,18,10,.05)}
.proj-meter-pct b{font-weight:600;color:var(--ink-2)}
.proj-meter-legend .dot.s-SOLD{background:#8fbfa4}
.proj-meter-legend .dot.s-AVAILABLE{background:#d4d0c6}

.legend{display:flex;gap:18px;flex-wrap:wrap;margin-top:12px;color:var(--ink-2);font-size:13px}
.legend .dot{margin-right:6px}

.list{overflow:hidden}
.row-item{display:flex;align-items:center;gap:12px;padding:13px 16px;border-bottom:1px solid var(--line);transition:.12s;width:100%}
.row-item:last-child{border-bottom:0}
a.row-item:hover{background:#faf9f6}
.row-item b{display:block;font-weight:600;font-size:14px}
.row-item .chev{width:16px;color:var(--muted)}
.chip-ic{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;background:var(--bg);color:var(--ink-2);flex:none}
.chip-ic svg{width:18px;height:18px}
.chip-ic.big{width:46px;height:46px;border-radius:14px;background:var(--gold-soft);color:var(--gold-ink)}
.chip-ic.warn{background:var(--amber-soft);color:#a56a00}.chip-ic.danger{background:var(--red-soft);color:var(--red)}
.chip-ic.info{background:var(--blue-soft);color:var(--blue)}.chip-ic.ok{background:var(--green-soft);color:var(--green)}
.amt{font:600 13.5px var(--head);white-space:nowrap}
.date-badge{width:44px;height:46px;border-radius:12px;background:var(--gold-soft);display:grid;place-items:center;align-content:center;line-height:1.05;flex:none}
.date-badge b{font:700 16px var(--head)!important;color:var(--gold-ink)}.date-badge small{text-transform:uppercase;font-size:10px;letter-spacing:.06em;color:var(--gold-ink)}

.empty{display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center;padding:40px 20px;color:var(--muted);background:var(--surface);border:1px dashed var(--line-2);border-radius:var(--r);grid-column:1/-1}
.empty svg{width:34px;height:34px;color:var(--gold-2)}.empty p{margin:0}
.empty.sm{padding:22px;border:0;background:none}.empty.sm svg{width:26px;height:26px}

/* ---------- toolbar / segmented ---------- */
.toolbar{display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap;margin:10px 0 20px}
.tb-right{display:flex;gap:10px;align-items:center}
.seg{display:flex;gap:4px;padding:4px;background:var(--surface);border:1px solid var(--line);border-radius:14px;flex-wrap:wrap;box-shadow:var(--sh)}
.seg button{display:flex;align-items:center;gap:2px;padding:8px 14px;border-radius:10px;font-weight:500;color:var(--ink-2);transition:.15s;white-space:nowrap}
.seg button:hover{background:var(--bg)}
.seg button.on{background:var(--ink);color:#fff}
.seg button em{font-style:normal;font-size:12px;opacity:.65;margin-left:6px;font-weight:600}
.seg .dot{margin-right:6px}
.mini-search{display:flex;align-items:center;gap:8px;background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:0 12px;box-shadow:var(--sh)}
.mini-search svg{width:16px;height:16px;color:var(--muted)}
.mini-search input{border:0;outline:0;background:none;padding:10px 0;width:150px}
.mini-search:focus-within{border-color:var(--gold-2)}

/* ---------- mapa de lotes ---------- */
.blocks{display:flex;flex-direction:column;gap:18px}
.block{background:var(--surface);border:1px solid var(--line);border-radius:20px;padding:20px 22px;box-shadow:var(--sh)}
.block header{display:flex;align-items:baseline;gap:12px;margin-bottom:14px}
.block h3{font-size:16px}.block h3 b{display:inline-grid;place-items:center;min-width:30px;height:30px;padding:0 8px;border-radius:9px;background:var(--ink);color:var(--gold-2);margin-left:4px}
.tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(92px,1fr));gap:10px}
.tile{position:relative;display:flex;flex-direction:column;justify-content:space-between;height:78px;padding:10px 12px;border-radius:14px;border:1.5px solid transparent;transition:transform .15s,box-shadow .15s,opacity .2s}
.tile:hover{transform:translateY(-3px);box-shadow:0 10px 22px rgba(20,18,10,.12)}
.t-no{font:700 21px var(--head);letter-spacing:-.02em;line-height:1}
.t-meta{font-size:11.5px;font-weight:500;opacity:.8;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.t-meta i{font-style:normal;opacity:.6}
.tile.s-AVAILABLE{background:var(--green-soft);color:#126a47}
.tile.s-RESERVED{background:var(--amber-soft);color:#8a5600}
.tile.s-SOLD{background:var(--slate);color:#fff}.tile.s-SOLD .t-meta{opacity:.7}
.tile.s-BLOCKED{background:repeating-linear-gradient(135deg,#f0efec,#f0efec 6px,#e7e5e0 6px,#e7e5e0 12px);color:#777}
.tile.s-RECOVERED{background:var(--violet-soft);color:var(--violet)}
.tile.sel{border-color:var(--gold);box-shadow:0 0 0 4px rgba(217,169,74,.28)}
.tile.dim{opacity:.18;pointer-events:none}
.hint{margin-top:22px;color:var(--muted);font-size:13px;text-align:center}

/* ---------- tarjetas (personas / contratos) ---------- */
.cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:14px}
.cards.wide{grid-template-columns:repeat(auto-fill,minmax(min(100%,320px),1fr))}
.person,.contract{display:flex;align-items:center;gap:14px;background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:16px 18px;box-shadow:var(--sh);transition:.18s}
.person:hover,.contract:hover{transform:translateY(-2px);border-color:var(--gold-2);box-shadow:0 10px 26px rgba(183,133,46,.13)}
.person b,.contract b{font:600 15px var(--head)}
.chips{display:flex;gap:6px;flex-wrap:wrap;margin:6px 0}
.chip{font-size:11.5px;font-weight:600;padding:3px 10px;border-radius:99px;background:var(--gold-soft);color:var(--gold-ink)}
.chip.ghost{background:var(--bg);color:var(--muted)}
.chip.role-BUYER{background:var(--blue-soft);color:var(--blue)}.chip.role-OWNER{background:var(--green-soft);color:#126a47}.chip.role-AGENCY{background:var(--slate);color:#fff}
.chip.role-SELLER{background:var(--amber-soft);color:#8a5600}.chip.role-SUPPLIER{background:var(--bg);color:var(--ink-2)}.chip.role-INVESTOR{background:var(--blue-soft);color:var(--blue)}
.nav-group{font-size:10.5px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);padding:14px 18px 4px}
.filter-tabs{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:0 0 14px}
.ftab{font-size:13px;font-weight:600;padding:7px 14px;border-radius:999px;border:1px solid var(--line);background:var(--surface);color:var(--ink-2);text-decoration:none}
.ftab.on,.ftab:hover{border-color:var(--gold-2);color:var(--gold-ink);background:var(--gold-soft)}

/* ---------- List filters (system) ---------- */
.list-filters{margin:4px 0 16px}
.lf-top{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.lf-search{display:flex;align-items:center;gap:8px;flex:1 1 220px;min-width:0;background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:0 12px;box-shadow:var(--sh);min-height:42px}
.lf-search svg{width:16px;height:16px;color:var(--muted);flex:none}
.lf-search input{border:0;outline:0;background:none;padding:10px 0;width:100%;min-width:0;font:inherit}
.lf-search:focus-within{border-color:var(--gold-2);box-shadow:0 0 0 3px rgba(217,169,74,.18)}
.lf-toggle{position:relative;display:inline-flex;align-items:center;justify-content:center;gap:6px;width:42px;height:42px;border-radius:12px;border:1px solid var(--line);background:var(--surface);color:var(--ink-2);box-shadow:var(--sh);flex:none;transition:.15s}
.lf-toggle svg{width:18px;height:18px}
.lf-toggle:hover,.lf-toggle[aria-expanded="true"]{border-color:var(--gold-2);color:var(--gold-ink);background:var(--gold-soft)}
.lf-toggle .lf-badge{position:absolute;top:-5px;right:-5px;min-width:18px;height:18px;padding:0 5px;border-radius:99px;background:var(--ink);color:#fff;font:700 10px var(--font);display:grid;place-items:center}
.lf-cta{display:flex;gap:8px;align-items:center;margin-left:auto;flex-wrap:wrap}
.lf-panel{margin-top:10px;padding:14px 16px;background:var(--surface);border:1px solid var(--line);border-radius:14px;box-shadow:var(--sh);display:none}
.list-filters.is-open .lf-panel{display:block}
.lf-section{display:flex;flex-direction:column;gap:8px;margin-bottom:12px}
.lf-section:last-child{margin-bottom:0}
.lf-title{font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.lf-chips{display:flex;flex-wrap:wrap;gap:7px}
.lf-chip{display:inline-flex;align-items:center;gap:6px;font-size:12.5px;font-weight:600;padding:7px 12px;border-radius:999px;border:1px solid var(--line);background:#fff;color:var(--ink-2);text-decoration:none;transition:.12s}
.lf-chip:hover{border-color:var(--gold-2);color:var(--gold-ink);background:var(--gold-soft)}
.lf-chip.on{border-color:var(--ink);background:var(--ink);color:#fff}
.lf-chip em{font-style:normal;font-size:11px;opacity:.7;font-weight:700}
.lf-fields{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:10px 12px;align-items:end}
.lf-fields .fld{margin:0}
.lf-fields .fld span{font-size:11px;font-weight:600;color:var(--muted);margin-bottom:4px;display:block}
.lf-panel-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-top:12px;padding-top:12px;border-top:1px solid var(--line)}
.lf-panel-actions .lf-clear{margin-right:auto;font-size:12.5px;font-weight:600;color:var(--muted)}
.lf-panel-actions .lf-clear:hover{color:var(--red)}
.lf-meta{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:4px}
.lf-active{display:flex;flex-wrap:wrap;gap:6px;width:100%;margin-top:8px}
.lf-active .lf-chip{padding:4px 10px;font-size:11.5px;background:var(--gold-soft);border-color:#e8d4a8;color:var(--gold-ink)}
.lf-active .lf-chip .x{opacity:.55;margin-left:2px}
@media (max-width:700px){
  .lf-cta{margin-left:0;width:100%}
  .lf-cta .btn{flex:1}
  .lf-toggle{width:42px}
}

.form-card.wide{max-width:860px}
.check-row{display:flex;flex-wrap:wrap;gap:10px 16px}
.check.emphasize{margin-top:8px;padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:var(--gold-soft)}
.pick-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:14px;margin-top:8px}
.pick-card{display:flex;flex-direction:column;gap:8px;padding:22px;border:1px solid var(--line);border-radius:18px;background:var(--surface);box-shadow:var(--sh);text-decoration:none;color:inherit;position:relative;min-height:120px}
.pick-card:hover{border-color:var(--gold-2);transform:translateY(-2px)}
.pick-card.disabled{opacity:.55;pointer-events:none}
.pick-card h3{margin:0;font:600 17px var(--head)}
.pick-card .go{position:absolute;right:16px;bottom:16px}
.kv{display:flex;flex-direction:column;gap:10px;margin:0}
.kv div{display:grid;grid-template-columns:140px 1fr;gap:8px}
.kv dt{color:var(--muted);font-size:12px}.kv dd{margin:0;font-weight:600}
.banner.ok{background:var(--green-soft);color:#126a47;border-radius:12px;padding:12px 16px;margin-bottom:14px;font-weight:600}
.btn.sm{padding:6px 10px;font-size:12px}
.pill{font-size:12px;font-weight:600;padding:4px 11px;border-radius:99px;white-space:nowrap}
.pill.st-ACTIVE,.pill.st-SIGNED,.pill.st-DISTRIBUTED,.pill.st-active{background:var(--green-soft);color:#126a47}
.pill.st-DRAFT,.pill.st-REGISTERED,.pill.st-draft{background:var(--bg);color:var(--muted)}
.pill.st-TERMINATED,.pill.st-REVERSED{background:var(--red-soft);color:var(--red)}
.pill.st-EXPIRED,.pill.st-REQUIRES_REVIEW,.pill.st-pending_approval{background:var(--amber-soft);color:#8a5600}
.pill.st-ALLOCATED,.pill.st-NOT_STARTED{background:var(--blue-soft);color:var(--blue)}
.money-tabs{margin-bottom:16px}

/* ---------- drawer ---------- */
.scrim{position:fixed;inset:0;background:rgba(21,21,26,.32);backdrop-filter:blur(3px);opacity:0;pointer-events:none;transition:.25s;z-index:40}
.scrim.on{opacity:1;pointer-events:auto}
.drawer{position:fixed;top:0;right:0;bottom:0;width:min(480px,100vw);background:var(--surface);box-shadow:var(--sh-lg);transform:translateX(105%);transition:transform .3s cubic-bezier(.2,.8,.2,1);z-index:50;overflow-y:auto}
.drawer.open{transform:none}
.drawer-body{padding:26px 26px 40px;display:flex;flex-direction:column;gap:16px}
.dr-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
.dr-head h2{font-size:22px;margin-top:4px}
.dr-head .who{display:flex;gap:14px;align-items:center}
.dr-status{display:inline-flex;align-items:center;align-self:flex-start;gap:0;font-weight:600;font-size:13px;padding:6px 14px;border-radius:99px;margin-top:-4px}
.dr-status.s-AVAILABLE{background:var(--green-soft);color:#126a47}.dr-status.s-RESERVED{background:var(--amber-soft);color:#8a5600}
.dr-status.s-SOLD{background:var(--slate);color:#fff}.dr-status.s-BLOCKED{background:var(--bg);color:#777}
.dr-status.s-SOLD .dot{background:var(--gold-2)}
.dr-status.st-ACTIVE,.dr-status.st-SIGNED{background:var(--green-soft);color:#126a47}.dr-status.st-DRAFT{background:var(--bg);color:var(--muted)}
.dr-status.st-ACTIVE .dot{background:var(--green)}
.facts{display:grid;grid-template-columns:1fr 1fr;gap:1px;background:var(--line);border:1px solid var(--line);border-radius:14px;overflow:hidden}
.facts div{background:#fff;padding:13px 16px}
.facts small{display:block;margin-bottom:2px}.facts b{font:600 16px var(--head)}.facts u{text-decoration:none;font:500 12px var(--font);color:var(--muted)}
.lead{margin:0;color:var(--ink-2)}
.note{margin:0;font-size:13.5px;color:var(--ink-2);background:var(--bg);padding:10px 14px;border-radius:12px}
.callout{display:flex;gap:12px;align-items:flex-start;padding:14px 16px;border-radius:14px}
.callout b{display:block}.callout.warn{background:var(--amber-soft);color:#8a5600}.callout.ok{background:var(--green-soft);color:#126a47}
.callout small{color:inherit;opacity:.8}.callout svg{margin-top:2px}
.actions{display:flex;gap:10px;flex-wrap:wrap}.actions form{display:contents}
.actions .btn.primary{flex:1 1 160px}
.sub{font-size:13px;color:var(--muted);text-transform:uppercase;letter-spacing:.1em;margin:8px 0 -6px}
.contact{display:flex;flex-direction:column;gap:8px}.contact a,.contact span{display:flex;gap:10px;align-items:center;color:var(--ink-2)}
.contact svg{width:17px;color:var(--gold)}.contact small{background:var(--bg);border-radius:6px;padding:1px 7px;font-weight:600}
.drawer .row-item{border:1px solid var(--line);border-radius:14px;margin-bottom:-4px}

/* formularios */
.panel{display:flex;flex-direction:column;gap:14px;padding:18px;border:1px solid var(--line);border-radius:18px;background:#fcfbf8;animation:pop .22s ease-out}
.panel h3{font-size:17px}
@keyframes pop{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.fld{display:flex;flex-direction:column;gap:6px}.fld span{font-size:12.5px;font-weight:600;color:var(--ink-2)}
.fld input,.fld select,.fld textarea{background:#fff;border:1.5px solid var(--line-2);border-radius:12px;padding:11px 13px;outline:0;transition:.15s;width:100%}
.fld input:focus,.fld select:focus,.fld textarea:focus{border-color:var(--gold-2);box-shadow:0 0 0 4px rgba(217,169,74,.18)}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.panel-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:4px}
.panel-actions .btn.primary{flex:1}

/* paleta de búsqueda */
.palette{position:fixed;inset:0;background:rgba(21,21,26,.4);backdrop-filter:blur(4px);z-index:90;display:flex;justify-content:center;padding-top:12vh}
.palette-box{width:min(620px,94vw);background:#fff;border-radius:20px;box-shadow:var(--sh-lg);overflow:hidden;align-self:flex-start;animation:pop .2s}
.palette-in{display:flex;align-items:center;gap:12px;padding:16px 20px;border-bottom:1px solid var(--line);color:var(--muted)}
.palette-in input{flex:1;border:0;outline:0;font-size:16px;color:var(--ink)}
.palette-res{max-height:55vh;overflow:auto;padding:8px}
.pr{display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:12px}
.pr.on,.pr:hover{background:var(--gold-soft)}.pr em{font-style:normal;font-size:11.5px;color:var(--muted);font-weight:600}
.pr b{display:block;font-weight:600}

/* toasts + skeleton */
.toasts{position:fixed;bottom:26px;left:50%;transform:translateX(-50%);display:flex;flex-direction:column;gap:8px;z-index:100;align-items:center}
.toast{background:var(--ink);color:#fff;padding:12px 20px;border-radius:14px;box-shadow:var(--sh-lg);opacity:0;transform:translateY(12px);transition:.3s;font-weight:500}
.toast.in{opacity:1;transform:none}.toast.ok::before{content:"✓ ";color:var(--gold-2);font-weight:700}.toast.err{background:var(--red)}
.skeleton{display:flex;flex-direction:column;gap:14px}.skeleton i{height:56px;border-radius:14px;background:linear-gradient(90deg,#f1efe9 25%,#f8f7f3 50%,#f1efe9 75%);background-size:200% 100%;animation:sk 1.2s infinite}
@keyframes sk{to{background-position:-200% 0}}

/* ---------- login ---------- */
.login{display:grid;grid-template-columns:1.1fr 1fr;min-height:100vh}
.login-art{background:radial-gradient(700px 500px at 30% 20%,#2a2416 0,#0d0d10 70%);display:grid;place-items:center;padding:48px;color:#fff;position:relative;overflow:hidden}
.login-art::after{content:"";position:absolute;width:520px;height:520px;border-radius:50%;border:1px solid rgba(217,169,74,.22);right:-160px;bottom:-160px;box-shadow:0 0 0 60px rgba(217,169,74,.05),0 0 0 120px rgba(217,169,74,.03)}
.login-art-in{max-width:440px;position:relative;z-index:1}
.login-art img{width:150px;border-radius:50%;box-shadow:0 0 0 3px rgba(217,169,74,.5),0 20px 60px rgba(0,0,0,.5);margin-bottom:34px}
.login-art h2{font-size:34px;line-height:1.15;margin-bottom:14px}
.login-art p{color:#b8b4a6;font-size:16px;margin:0}
.login-form{display:grid;place-items:center;padding:32px;background:var(--bg)}
.login-card{width:min(400px,100%);display:flex;flex-direction:column;gap:16px}
.login-card h1{font-size:30px}.login-card p{margin:-8px 0 8px}
.login-mini{display:none;width:64px;border-radius:50%}
.alert{background:var(--red-soft);color:var(--red);padding:11px 14px;border-radius:12px;font-weight:500;font-size:13.5px}
.login .fld input{padding:14px 15px}

/* ---------- móvil ---------- */
.tabbar{display:none}
@media (max-width:1100px){.kpis{grid-template-columns:repeat(3,1fr)}.cols{grid-template-columns:1fr}}
@media (max-width:860px){
  .side{display:none}.main{margin:0}
  .top{padding:14px 16px 4px}.page{padding:8px 16px 96px}
  .search-pill{min-width:0;padding:10px 12px}.search-pill span,.search-pill kbd{display:none}.head-search{min-width:0;max-width:none;flex:1}.head-search kbd,.head-search .hs-scope{display:none}
  .top-title h1{font-size:20px}.crumb{display:none}
  .kpis{grid-template-columns:repeat(2,1fr)}.hero{padding:20px}.hero h2{font-size:21px}
  .tabbar{display:flex;position:fixed;left:10px;right:10px;bottom:10px;background:rgba(255,255,255,.92);backdrop-filter:blur(14px);border:1px solid var(--line);border-radius:20px;padding:6px;box-shadow:var(--sh-lg);z-index:30}
  .tabbar a{flex:1;display:flex;flex-direction:column;align-items:center;gap:2px;padding:8px 2px;border-radius:14px;font-size:10.5px;font-weight:600;color:var(--muted)}
  .tabbar a svg{width:21px;height:21px}.tabbar a.on{background:var(--ink);color:#fff}.tabbar a.on svg{color:var(--gold-2)}
  .drawer{width:100vw}.cards,.cards.wide{grid-template-columns:1fr}
  .seg{overflow-x:auto;flex-wrap:nowrap;max-width:100%}
  .tiles{grid-template-columns:repeat(auto-fill,minmax(78px,1fr))}
  .login{grid-template-columns:1fr}.login-art{display:none}.login-mini{display:block}
}

/* ============ Dashboard v2 ============ */
.gold{color:var(--gold)}.red{color:var(--red)}.num{font-variant-numeric:tabular-nums}
.dash-sub{font-size:11.5px;color:var(--muted);margin:3px 0 0}
.dash-hero{padding:13px 17px;margin:0 0 12px;gap:15px;align-items:center}
.dash-hero .welcome{display:flex;align-items:center;gap:11px;flex:1;min-width:0}
.dash-hero .welcome strong{display:block;font:650 17px var(--head);letter-spacing:-.02em}
.dash-hero .ic-lg{width:27px;height:27px}
.hero-stats{display:flex;gap:16px;align-items:center}
.hero-stat{display:flex;align-items:center;gap:8px;padding-left:16px;border-left:1px solid #e5d5b5}
.hero-stat svg{color:#615745;width:18px;height:18px}
.hero-stat strong{display:block;font:700 17px var(--head);line-height:1.1}
.hero-stat small{display:block;color:#777367;font-size:10px;margin-top:3px;white-space:nowrap}
.dash-hero .hero-actions{margin-left:auto}

.dash-kpis{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin-bottom:12px}
.dash-kpis .kpi{display:block;padding:13px;min-height:100px;transition:border-color .15s}
.dash-kpis .kpi:hover{border-color:var(--gold-2)}
.kpi-head{display:flex;align-items:center;justify-content:space-between;gap:5px;font-size:11.5px;color:#5d606b;font-weight:550}
.kpi-head svg{width:17px;height:17px;color:var(--gold)}
.dash-kpis .kpi strong{font-size:25px;letter-spacing:-.03em;line-height:1.1;display:block;margin:8px 0 6px}
.dash-kpis .kpi .unit{font-weight:500;font-size:11px;color:var(--muted);letter-spacing:0}
.dash-kpis .kpi small{font-size:10.5px;color:var(--muted);font-weight:500}
.dash-kpis .kpi.danger{background:#fffafa;border-color:#efc9c6}
.dash-kpis .kpi.danger .kpi-head svg,.dash-kpis .kpi.danger strong{color:var(--red)}
.trend{display:inline-block;border-radius:5px;padding:1px 5px;font-weight:650;font-size:10px;margin-left:3px}
.trend.down{background:var(--red-soft);color:var(--red)}
.trend.up{background:var(--green-soft);color:#126a47}

.cycle-panel{margin:0 0 12px;padding:11px 13px 12px}
.cycle-panel .section-head{margin-bottom:8px;align-items:center}
.section-head{display:flex;justify-content:space-between;align-items:flex-start;gap:8px;margin-bottom:11px}
.section-head h2{font-size:15px;letter-spacing:-.02em}
.heading-icon{display:flex;align-items:center;gap:8px}
.heading-icon svg{color:var(--gold);width:18px;height:18px}
.more{display:inline-flex;gap:4px;align-items:center;font-weight:650;color:var(--gold);font-size:11px;white-space:nowrap}
.more svg{width:14px;height:14px}.more:hover{text-decoration:underline}
.badge{background:var(--red);color:#fff;font:700 12px var(--font);min-width:22px;height:22px;display:grid;place-items:center;border-radius:99px;padding:0 6px}

.steps{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:7px}
.step{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-width:0;min-height:66px;padding:9px 4px 8px;background:#faf7ef;border:1px solid #eee6d5;border-radius:9px;text-align:center;transition:background .15s,border-color .15s;color:inherit}
.step b{position:absolute;top:6px;left:7px;display:grid;place-items:center;margin:0;width:17px;height:17px;border-radius:50%;background:#c9963b;color:#fff;font-size:10px;line-height:1;font-weight:700}
.step .ic,.step svg{width:20px;height:20px;color:#735422}
.step-label{white-space:nowrap;font-size:12px;font-weight:650;line-height:1.2;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.step:hover{background:#f3e9d3;border-color:#d6b879}

.dash-layout{display:grid;grid-template-columns:minmax(0,1fr) 302px;gap:12px;align-items:start}
.dash-left,.dash-right{display:grid;gap:12px;min-width:0}
.charts{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(0,1fr);gap:12px}
.chart-legend{display:flex;gap:9px;flex-wrap:wrap;justify-content:flex-end;font-size:10px;color:#686a73}
.chart-legend .dot,.inventory-legend .dot{display:inline-block;width:8px;height:8px;border-radius:50%;margin-right:5px;vertical-align:1px}
.chart-legend .dot.paid{background:#303644}.chart-legend .dot.sched{background:#e8c982}
.dot.s-AVAILABLE{background:#16956b}.dot.s-SOLD{background:#292e3a}.dot.s-RESERVED{background:#e2ae53}
.dot.s-RECOVERED{background:#9063c6}.dot.s-BLOCKED{background:#a3a5ae}

.chart{position:relative;display:grid;grid-template-columns:repeat(6,1fr);gap:8px;height:180px;align-items:end;padding-top:6px;
  background:repeating-linear-gradient(to top,transparent 0,transparent calc(25% - 1px),var(--line) calc(25% - 1px),var(--line) 25%)}
.chart .col{display:flex;flex-direction:column;align-items:center;gap:6px;height:100%;justify-content:flex-end}
.chart .col>span{font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:.06em;font-weight:600}
.chart .col.now>span{color:var(--gold-ink)}
.chart .col.now{background:linear-gradient(transparent,rgba(217,169,74,.12));border-radius:10px}
.bars{display:flex;align-items:flex-end;gap:3px;height:calc(100% - 22px);width:100%;justify-content:center}
.b{display:block;width:38%;max-width:22px;border-radius:6px 6px 2px 2px;min-height:3px;transition:height .5s cubic-bezier(.2,.8,.2,1)}
.b.paid{background:#303644}.b.sched{background:#e8c982}
.chart.ghost .bars{opacity:.3}
.chart-empty{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;text-align:center;color:var(--muted);padding:0 20px;background:rgba(255,255,255,.72);border-radius:12px}
.chart-empty svg{width:28px;height:28px;color:var(--gold-2)}.chart-empty b{color:var(--ink);font-family:var(--head)}.chart-empty span{font-size:12px}

.inventory-body{display:flex;align-items:center;gap:13px;min-height:165px}
.inv-ring{--p:0;width:45%;max-width:140px;min-width:96px;aspect-ratio:1;border-radius:50%;flex:none;
  background:conic-gradient(#16956b 0 calc(var(--p)*1%),#292e3a 0);position:relative;display:grid;place-items:center}
.inv-ring:before{content:"";position:absolute;inset:15%;background:#fff;border-radius:50%}
.ring-text{position:relative;text-align:center;z-index:1}
.ring-text b{display:block;font:700 22px var(--head);letter-spacing:-.03em;line-height:1.1}
.ring-text small{font-size:10px;color:var(--muted)}
.inventory-legend{flex:1;min-width:0;display:grid;gap:8px}
.invline{display:flex;justify-content:space-between;gap:6px;font-size:11px;color:var(--ink-2)}
.invline strong{font-size:12px;font-family:var(--head)}

.tables{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.table-card{overflow:hidden}
.table-card .section-head{padding:13px 14px 0;margin-bottom:10px}
.table-scroll{overflow:auto}
.table-card table{border-collapse:collapse;width:100%;font-size:11px;white-space:nowrap}
.table-card th{font-size:9px;text-transform:uppercase;letter-spacing:.06em;font-weight:650;color:#84858c;text-align:left;background:#f7f6f3;padding:8px 10px}
.table-card td{padding:8px 10px;border-bottom:1px solid #f0eee9}
.table-card td:first-child{font-weight:650}
.table-card tr:last-child td{border-bottom:0}
.table-card .empty-cell{text-align:center;color:var(--muted);font-weight:500;padding:18px 10px}
.table-card .pill{display:inline-flex;font-size:10px;font-weight:650;color:var(--green);background:var(--green-soft);padding:3px 6px;border-radius:7px;white-space:nowrap}
.table-card .pill.warn{background:var(--gold-soft);color:#92601b}
.table-card .pill.late{background:var(--red-soft);color:var(--red)}

.dash-layout .list{display:grid}
.dash-layout .list-row{display:flex;align-items:center;gap:9px;padding:9px 0;border-top:1px solid #f0eee9;min-width:0;color:inherit}
.dash-layout .list-row:first-child{border-top:0}
.dash-layout .list-row:hover .row-title{color:var(--gold)}
.dash-layout .list-row svg{width:17px;height:17px;flex:none}
.dash-layout .list-row .chev{margin-left:auto;color:#96979e;width:13px;height:13px}
.row-main{flex:1;min-width:0}
.row-title{font-size:11.5px;font-weight:650;display:block;line-height:1.3}
.row-desc{font-size:10.5px;color:var(--muted);margin-top:3px;display:block;line-height:1.3}
.amount{font-size:11px;font-weight:700;white-space:nowrap;font-variant-numeric:tabular-nums}
.circle-icon{border-radius:50%;width:29px;height:29px;display:grid;place-items:center;background:var(--gold-soft);color:var(--gold);flex-shrink:0}
.circle-icon.ok{background:var(--green-soft);color:var(--green)}
.circle-icon svg{width:15px;height:15px}
.activity time{font-size:9.5px;color:var(--muted);white-space:nowrap}
.act-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.act-list .list-row{border-top:0;border-right:1px solid var(--line);padding-right:8px;align-items:flex-start}
.act-list .list-row:last-child{border-right:0}
.quick-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px}
.quick{border:1px solid #ece8df;background:#fbfaf6;border-radius:8px;padding:10px 9px;display:flex;gap:7px;align-items:center;font-size:11px;font-weight:600;min-height:46px;color:inherit}
.quick svg{width:16px;height:16px;color:var(--gold)}.quick:hover{border-color:#d7b879}

@media (min-width:1600px){
  .dash-layout{grid-template-columns:minmax(0,1fr) 335px}
  .dash-kpis .kpi{min-height:113px}.dash-kpis .kpi strong{font-size:29px}
  .step{min-height:72px}.step-label{font-size:13px}
}
@media (min-width:1051px) and (max-width:1599px){
  .dash-hero{padding:10px 15px;margin-bottom:10px}
  .dash-kpis{margin-bottom:10px}.dash-kpis .kpi{padding:11px 12px;min-height:94px}.dash-kpis .kpi strong{margin:6px 0 4px}
  .dash-layout,.dash-left,.dash-right,.charts,.tables{gap:10px}
  .cycle-panel{padding:10px 12px}.step{min-height:58px}.chart{height:160px}
  .act-list .list-row{padding:7px 0}
}
@media (max-width:1250px){
  .dash-layout{grid-template-columns:minmax(0,1fr) 264px}
  .hero-stats{gap:10px}.hero-stat{padding-left:10px}
  .dash-kpis .kpi strong{font-size:22px}
  .step-label{font-size:11px}.steps{gap:5px}
  .inventory-body{flex-direction:column;align-items:stretch}.inv-ring{align-self:center;max-width:105px}
}
@media (max-width:1050px){
  .dash-layout{grid-template-columns:1fr}
  .dash-right{grid-template-columns:1fr 1fr;display:grid}
  .dash-right .activity,.activity{grid-column:1/-1}
  .hero-stats .hero-stat:last-child{display:none}
  .steps{grid-template-columns:repeat(4,minmax(0,1fr))}
  .inventory-body{flex-direction:row;align-items:center}.inv-ring{max-width:135px}
}
@media (max-width:860px){
  .dash-hero{align-items:flex-start;flex-wrap:wrap}
  .hero-stats{display:none}
  .dash-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  .dash-kpis .kpi:last-child{grid-column:1/-1}
  .charts,.tables,.dash-right{grid-template-columns:1fr}
  .act-list{grid-template-columns:1fr;gap:0}
  .act-list .list-row{border-right:0;border-top:1px solid #f0eee9;padding-right:0}
  .act-list .list-row:first-child{border-top:0}
  .chart{height:150px;gap:4px}
}
@media (max-width:460px){
  .steps{grid-template-columns:repeat(2,minmax(0,1fr))}
  .step{min-height:58px}
}


/* directorios */
.grow-search{flex:1;min-width:200px}
.grow-search input{width:100%}
.table-wrap{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--sh);overflow:auto}
.data{width:100%;border-collapse:collapse;font-size:14px}
.data th{text-align:left;font-size:12px;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);padding:12px 16px;border-bottom:1px solid var(--line);background:#faf9f6;position:sticky;top:0}
.data td{padding:12px 16px;border-bottom:1px solid var(--line);vertical-align:middle}
.data tr{cursor:pointer;transition:.12s}
.data tbody tr:hover{background:#faf7f0}
.data .end{text-align:right}
.who-cell{display:flex;gap:12px;align-items:center}
.who-cell b{display:block}
.bad{color:var(--red);font-weight:700}
.pager{display:flex;justify-content:center;align-items:center;gap:16px;margin:18px 0}
.go.sm{width:28px;height:28px;border-radius:50%;background:var(--bg);display:inline-grid;place-items:center}
.go.sm svg{width:14px;height:14px}
.seg a{display:flex;align-items:center;gap:2px;padding:8px 14px;border-radius:10px;font-weight:500;color:var(--ink-2);white-space:nowrap;text-decoration:none}
.seg a.on{background:var(--ink);color:#fff}
.seg a em{font-style:normal;font-size:12px;opacity:.65;margin-left:6px;font-weight:600}
.form-card{background:var(--surface);border:1px solid var(--line);border-radius:20px;padding:24px;max-width:720px;box-shadow:var(--sh);display:flex;flex-direction:column;gap:14px}
.form-card h3{margin:8px 0 0;font-size:16px}
.stack-form{display:flex;flex-direction:column;gap:12px}
.check{display:flex;align-items:center;gap:8px;font-size:14px;color:var(--ink-2)}
.profile-grid{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,.8fr);gap:14px}
.profile-side{display:flex;flex-direction:column;gap:14px}
.banner{padding:12px 16px;border-radius:14px;margin-bottom:14px;font-size:14px}
.banner.bad{background:var(--red-soft);color:var(--red)}
.banner.warn{background:var(--amber-soft);color:#8a5600}
.banner.info{background:var(--blue-soft);color:var(--blue)}
.banner.info a,.banner.warn a{color:inherit;font-weight:600}
.banner.info ul,.banner.warn ul{margin:8px 0 0;padding-left:1.15em}
.banner.info li,.banner.warn li{margin:3px 0}
.pill-status{font-size:12px;font-weight:600;padding:4px 10px;border-radius:99px}
.pill-status.s-AVAILABLE{background:var(--green-soft);color:#126a47}
.pill-status.s-RESERVED{background:var(--amber-soft);color:#8a5600}
.pill-status.s-SOLD{background:var(--slate);color:#fff}
.pill-status.s-BLOCKED{background:var(--bg);color:#777}
.rule-row{padding:10px 0;border-bottom:1px solid var(--line);display:flex;flex-direction:column;gap:4px}
.rule-row:last-child{border-bottom:0}
.json-mini{margin:4px 0 0;padding:8px 10px;background:var(--bg);border-radius:10px;font-size:11.5px;overflow:auto;max-height:90px;color:var(--ink-2)}
.crumb a{color:var(--gold);text-decoration:none;font-weight:600}
@media (max-width:900px){.profile-grid{grid-template-columns:1fr}}


/* ---------- Entity passport + edit sheet ---------- */
.passport-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:14px}
.passport-head h3{margin:0;font-size:16px}
.passport-actions{display:flex;align-items:center;gap:8px;flex:none}
.passport-actions .icon-btn{width:36px;height:36px;border-radius:10px;border:1px solid var(--line);background:var(--bg);color:var(--ink-2);display:grid;place-items:center}
.passport-actions .icon-btn:hover{border-color:var(--gold-2);color:var(--gold-ink);background:var(--gold-soft)}
.passport-actions .icon-btn svg{width:17px;height:17px}
.passport-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 18px}
.pp-item{min-width:0}
.pp-item small{display:block;font-size:11px;font-weight:600;color:var(--muted);margin-bottom:3px;letter-spacing:.02em}
.pp-item b,.pp-item .pp-val{display:block;font:600 14px/1.35 var(--head);color:var(--ink);overflow-wrap:anywhere;word-break:break-word}
.pp-item .pp-val.muted{font-weight:500;color:var(--muted)}
.pp-item.span2{grid-column:1/-1}
.passport-foot{display:flex;gap:10px;flex-wrap:wrap;margin-top:18px;padding-top:14px;border-top:1px solid var(--line)}
@media (max-width:700px){.passport-grid{grid-template-columns:1fr}}

.edit-scrim{position:fixed;inset:0;background:rgba(21,21,26,.4);backdrop-filter:blur(3px);opacity:0;pointer-events:none;transition:.2s;z-index:55}
.edit-scrim.on{opacity:1;pointer-events:auto}
.edit-sheet{position:fixed;top:0;right:0;bottom:0;width:min(560px,100vw);background:var(--surface);box-shadow:var(--sh-lg);transform:translateX(105%);transition:transform .28s cubic-bezier(.2,.8,.2,1);z-index:60;display:flex;flex-direction:column;min-width:0}
.edit-sheet.open{transform:none}
.edit-sheet-h{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:18px 20px;border-bottom:1px solid var(--line);flex:none}
.edit-sheet-h h3{margin:0;font-size:18px}
.edit-sheet-h .icon-btn{width:34px;height:34px;border-radius:10px;display:grid;place-items:center;color:var(--muted)}
.edit-sheet-b{padding:18px 20px 28px;overflow:auto;flex:1;min-height:0}
.edit-sheet-b .stack-form{gap:12px}


/* ---------- Loteamiento hub tabs ---------- */
.hub-tabs{display:flex;gap:6px;flex-wrap:wrap;margin:0 0 16px;padding:4px;background:var(--bg);border:1px solid var(--line);border-radius:14px;width:fit-content;max-width:100%}
.hub-tab{display:inline-flex;align-items:center;padding:8px 14px;border-radius:10px;font:600 13px/1 var(--head);color:var(--ink-2);text-decoration:none;white-space:nowrap}
.hub-tab:hover{background:var(--surface);color:var(--ink)}
.hub-tab.on{background:var(--ink);color:#fff}
.toolbar-side{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-left:auto}
@media (max-width:700px){
  .hub-tabs{width:100%;overflow:auto;flex-wrap:nowrap}
  .toolbar{flex-direction:column;align-items:stretch}
  .toolbar-side{margin-left:0;width:100%}
}


/* ---------- Help (?) + hover tips ---------- */
.help-btn{width:34px;height:34px;border-radius:10px;border:1px solid var(--line);background:var(--bg);color:var(--ink-2);display:inline-grid;place-items:center;cursor:pointer;flex:none}
.help-btn:hover,.help-btn:focus-visible{border-color:var(--gold-2);color:var(--gold-ink);background:var(--gold-soft);outline:none}
.help-btn svg{width:16px;height:16px}
.top-title{display:flex;align-items:center;gap:10px;min-width:0}
.top-title > :not(.help-btn){min-width:0}
.top-title h1,.top-title .crumb{align-self:center}
.top-title .help-btn{align-self:center;margin-left:2px}
.top-help{margin-top:2px}
.head-tools{display:flex;align-items:center;gap:6px;flex:none;margin-left:auto}
.dr-head .help-btn,.edit-sheet-h .help-btn{flex:none}
.help-scrim{position:fixed;inset:0;background:rgba(21,21,26,.45);backdrop-filter:blur(3px);opacity:0;pointer-events:none;transition:.2s;z-index:70}
.help-scrim.on{opacity:1;pointer-events:auto}
.help-modal{position:fixed;left:50%;top:50%;transform:translate(-50%,-48%) scale(.96);width:min(520px,calc(100vw - 28px));max-height:min(78vh,640px);background:var(--surface);border-radius:18px;box-shadow:var(--sh-lg);z-index:71;display:flex;flex-direction:column;opacity:0;pointer-events:none;transition:.2s}
.help-modal.open{opacity:1;pointer-events:auto;transform:translate(-50%,-50%) scale(1)}
.help-modal-h{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:18px 20px;border-bottom:1px solid var(--line)}
.help-modal-h h3{margin:0;font:600 18px/1.25 var(--head)}
.help-modal-b{padding:16px 20px 22px;overflow:auto;font-size:14px;line-height:1.5;color:var(--ink-2)}
.help-modal-b p{margin:0 0 10px}
.help-modal-b ul{margin:0;padding-left:1.2em}
.help-modal-b li{margin:4px 0}
.hover-tip{position:fixed;z-index:80;max-width:260px;padding:8px 11px;border-radius:10px;background:#1c1b22;color:#fff;font:500 12px/1.35 var(--head);box-shadow:0 10px 28px rgba(0,0,0,.28);pointer-events:none;opacity:0;transform:translateY(4px);transition:opacity .15s,transform .15s}
.hover-tip.on{opacity:1;transform:none}

/* —— Ayuda operativa —— */
.lead-help{margin:0 0 16px;max-width:720px;color:var(--ink-2);font-size:14.5px;line-height:1.55}
.ayuda-toolbar{display:flex;align-items:center;gap:14px;margin:0 0 18px;flex-wrap:wrap}
.ayuda-toolbar .mini-search input{width:min(420px,70vw)}
.ayuda-sec{margin:0 0 16px}
.ayuda-sec-h{margin:0 0 10px}
.ayuda-sec-h h2{margin:0;font:600 18px/1.25 var(--head)}
.ayuda-sub{margin:14px 0 6px}
.ayuda-sub h3{margin:0 0 8px;font:600 13px/1.3 var(--head);color:var(--muted);text-transform:uppercase;letter-spacing:.04em}
.ayuda-list{display:flex;flex-direction:column;gap:6px}
.ayuda-item{display:flex;align-items:center;gap:12px;width:100%;text-align:left;padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:var(--surface);cursor:pointer;transition:.15s;font:inherit;color:inherit}
.ayuda-item:hover{border-color:var(--gold-2);box-shadow:var(--sh);transform:translateY(-1px)}
.ayuda-id{flex:0 0 auto;min-width:42px;font:700 12px/1 var(--head);color:var(--gold-2);letter-spacing:.02em}
.ayuda-title{flex:1;font-size:14px;line-height:1.35}
.ayuda-go{width:16px;height:16px;color:var(--muted);flex:0 0 auto}
.ayuda-op-modal{width:min(680px,calc(100vw - 28px));max-height:min(86vh,760px)}
.ayuda-steps{margin:0;padding-left:1.25em}
.ayuda-steps li{margin:8px 0;line-height:1.45}
.ayuda-links{display:flex;flex-wrap:wrap;gap:8px}
.ayuda-links .btn{text-decoration:none}

/* —— Ayuda audit badges —— */
.ayuda-audit-bar{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:0 0 14px}
.ayuda-pill{display:inline-flex;align-items:center;gap:6px;padding:5px 10px;border-radius:999px;font:600 12px var(--head);border:1px solid var(--line);background:var(--surface)}
.ayuda-pill.ok{background:var(--green-soft);color:#126a47;border-color:#cfe8da}
.ayuda-pill.partial{background:var(--amber-soft);color:#8a5600;border-color:#f0dfb2}
.ayuda-pill.redundant{background:var(--slate-soft);color:#3d3d47;border-color:var(--line-2)}
.ayuda-pill.missing{background:var(--red-soft);color:var(--red);border-color:#f0c9c5}
.ayuda-filters{display:flex;flex-wrap:wrap;gap:6px}
.ayuda-filters .chip{padding:6px 12px;border-radius:999px;border:1px solid var(--line);background:var(--surface);font-size:12.5px;font-weight:600;color:var(--ink-2)}
.ayuda-filters .chip.on{background:var(--ink);color:#fff;border-color:var(--ink)}
.ayuda-badge{flex:none;font:600 10.5px/1 var(--head);letter-spacing:.02em;text-transform:uppercase;padding:5px 8px;border-radius:8px;max-width:140px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ayuda-badge.ok{background:var(--green-soft);color:#126a47}
.ayuda-badge.partial{background:var(--amber-soft);color:#8a5600}
.ayuda-badge.redundant{background:var(--slate-soft);color:#555}
.ayuda-badge.missing{background:var(--red-soft);color:var(--red)}
.ayuda-audit-note{border-radius:12px;padding:12px 14px;margin:0 0 14px;border:1px solid var(--line)}
.ayuda-audit-note b{display:block;margin-bottom:4px;font:600 13px var(--head)}
.ayuda-audit-note p{margin:0;font-size:13px;line-height:1.45;color:var(--ink-2)}
.ayuda-audit-note.ok{background:var(--green-soft);border-color:#cfe8da}
.ayuda-audit-note.partial{background:var(--amber-soft);border-color:#f0dfb2}
.ayuda-audit-note.redundant{background:var(--slate-soft)}
.ayuda-audit-note.missing{background:var(--red-soft);border-color:#f0c9c5}
.ayuda-item .ayuda-title{flex:1}

/* top-title nested heading */
.top-title > div{display:flex;align-items:center;gap:12px;flex-wrap:wrap;min-width:0}
.top-title > div > h1{margin:0;line-height:1.15}
.top-title > div > .crumb{align-self:center}

/* —— Create modal (altas) —— */
body.create-modal-open{overflow:hidden}
.create-scrim{position:fixed;inset:0;background:rgba(21,21,26,.42);backdrop-filter:blur(3px);z-index:80;opacity:0;pointer-events:none;transition:.18s}
.create-scrim.on{opacity:1;pointer-events:auto}
.create-modal{position:fixed;left:50%;top:50%;transform:translate(-50%,-48%) scale(.97);width:min(760px,calc(100vw - 24px));max-height:min(88vh,860px);background:var(--surface);border-radius:18px;box-shadow:var(--sh-lg);z-index:81;display:flex;flex-direction:column;opacity:0;pointer-events:none;transition:.2s}
.create-modal.open{opacity:1;pointer-events:auto;transform:translate(-50%,-50%) scale(1)}
.create-modal-h{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:16px 18px;border-bottom:1px solid var(--line);flex:none}
.create-modal-h h3{margin:0;font:600 18px/1.25 var(--head)}
.create-modal-b{padding:16px 18px 22px;overflow:auto;min-height:120px}
.create-embed .form-card,.create-embed form.form-card{max-width:none;width:100%;box-shadow:none;border:0;padding:0;background:transparent}
.create-embed .form-card.wide{max-width:none}
.create-embed .panel-actions{position:sticky;bottom:0;background:linear-gradient(transparent,var(--surface) 28%);padding-top:16px;margin-top:12px}
.create-embed .pick-grid{margin:0}
.create-embed .pick-card{background:var(--bg)}

/* —— Period cards (cierre / SEPRELAD) —— */
.period-list{display:flex;flex-direction:column;gap:10px;margin:8px 0 18px}
.period-card{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;padding:16px 18px;background:var(--surface);border:1px solid var(--line);border-radius:16px;box-shadow:var(--sh);transition:.15s}
a.period-card{text-decoration:none;color:inherit}
.period-card:hover,.period-card.on{border-color:var(--gold-2);box-shadow:0 8px 24px rgba(183,133,46,.12)}
.period-card-main h3{margin:0;font:600 17px/1.25 var(--head)}
.period-card-main p{margin:4px 0 0}
.period-card-meta{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.period-cta{font:600 13px var(--head);color:var(--gold)}
.period-card.state-current{border-left:4px solid var(--amber)}
.period-card.state-ready{border-left:4px solid var(--gold-2)}
.period-card.state-closed,.period-card.state-confirmed,.period-card.state-submitted{border-left:4px solid var(--green)}
.period-card.state-future{opacity:.72}
.pill.warn{background:var(--amber-soft);color:#8a5600}
.pill.ok{background:var(--green-soft);color:#126a47}
.banner.ok{background:var(--green-soft);color:#126a47;border-radius:12px;padding:10px 14px;margin-bottom:12px}

