/* Plantillas de documento: editor de bloques, vista previa tamaño carta y fichas */
.sd-prev { position: relative; width: 100%; overflow: hidden; border-radius: 10px; background: #e7e7ea; }
.sd-escala { width: 864px; transform-origin: 0 0; }
.sd-frame { width: 864px; height: 1100px; border: 0; display: block; background: #e7e7ea; }
.sd-sticky { position: sticky; top: 84px; }
@media (max-width: 1199.98px) { .sd-sticky { position: static; } }

.sd-acc-h { all: unset; display: flex; align-items: center; justify-content: space-between; width: 100%; cursor: pointer; padding-right: 18px; box-sizing: border-box; }
.sd-acc-h .card-h { flex: 1; border: 0; }
.sd-acc-h > .bi { transition: transform .2s; color: var(--muted); }
.sd-acc-h[aria-expanded="true"] > .bi { transform: rotate(180deg); }
.sd-acc-h:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; border-radius: 12px; }

.sd-blks { display: grid; gap: 8px; }
.sd-blk { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); transition: border-color .15s, box-shadow .15s, opacity .15s; }
.sd-blk.open { border-color: color-mix(in srgb, var(--primary) 45%, var(--border)); box-shadow: 0 6px 20px -12px rgba(0, 0, 0, .35); }
.sd-blk.off .sd-blk-t, .sd-blk.off .sd-blk-i { opacity: .45; }
.sd-blk.drag { opacity: .4; }
.sd-blk.sobre { border-color: var(--primary); box-shadow: 0 -3px 0 var(--primary); }
.sd-blk-h { display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer; user-select: none; }
.sd-grip { color: var(--muted); cursor: grab; }
.sd-blk-i { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: color-mix(in srgb, var(--primary) 12%, transparent); color: var(--primary); flex: none; }
.sd-blk-t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.sd-blk-t b { font-size: 13.5px; }
.sd-blk-t small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sd-blk-a { display: flex; align-items: center; gap: 2px; }
.sd-blk-b { padding: 4px 14px 14px; border-top: 1px dashed var(--border); padding-top: 12px; }
.sd-item { border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px 4px; margin-bottom: 8px; background: color-mix(in srgb, var(--muted) 5%, transparent); }
.sd-item-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.sd-ib { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; border: 0; background: transparent; color: var(--muted); font-size: 12px; cursor: pointer; } .sd-ib:hover:not(:disabled) { background: var(--surface-2); color: var(--text, inherit); } .sd-ib:disabled { opacity: .35; cursor: default; }

.sd-color { display: flex; align-items: center; gap: 8px; }
.sd-color input[type=color] { width: 36px; height: 30px; padding: 0; border: 1px solid var(--border); border-radius: 8px; background: none; cursor: pointer; }
.sd-color code { font-size: 12px; color: var(--muted); }
.sd-imgf { display: flex; align-items: center; gap: 8px; }
.sd-imgf img, .sd-imgv { width: 34px; height: 34px; border-radius: 8px; object-fit: contain; background: #fff; border: 1px solid var(--border); flex: none; }
.sd-imgv { display: grid; place-items: center; color: var(--muted); background: transparent; }

.sd-ficha { overflow: hidden; }
.sd-ficha-top { position: relative; padding: 18px 18px 14px; display: flex; justify-content: space-between; align-items: center; background: #fff; color: var(--t); border-bottom: 2px solid var(--t); }
.sd-ficha-top img { height: 28px; width: auto; border-radius: 6px; }
.sd-ficha-top b { font-size: 16px; }
.sd-ficha-barra { position: absolute; left: 0; right: 0; top: 0; height: 4px; background: linear-gradient(90deg, var(--a) 0 18%, var(--t) 18% 100%); }
.sd-ficha-tit { font-weight: 700; font-size: 18px; }
.sd-ficha-blq { display: flex; gap: 6px; flex-wrap: wrap; }
.sd-ficha-blq span { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: color-mix(in srgb, var(--primary) 10%, transparent); color: var(--primary); font-size: 13px; }
.sd-sw { display: inline-block; width: 12px; height: 12px; border-radius: 4px; border: 1px solid var(--border); vertical-align: -2px; margin-right: 2px; }
.sd-numej { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 10px; background: color-mix(in srgb, var(--primary) 8%, transparent); }
.sd-numej b { font-size: 20px; }
.sd-docmod { max-height: 74vh; }

/* Términos de pago: plan de cuotas */
.tp-plan { display: grid; gap: 6px; }
.tp-cuota { display: grid; grid-template-columns: 24px 1fr auto auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); font-size: 13.5px; }
.tp-plan.sm .tp-cuota { padding: 6px 8px; font-size: 12.5px; }
.tp-n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--primary) 14%, transparent); color: var(--primary); font-weight: 700; font-size: 11.5px; }
.tp-c { min-width: 0; }
.tp-p { color: var(--muted); font-variant-numeric: tabular-nums; }
.tp-cuota b { font-variant-numeric: tabular-nums; }

/* Logo de la empresa */
.sb-company .sb-co-ic.has-logo, .pop-ic.has-logo { background: #fff; padding: 3px; overflow: hidden; }
.sb-co-ic.has-logo img, .pop-ic.has-logo img { width: 100%; height: 100%; object-fit: contain; border-radius: 7px; }
.cfg-logo { height: 120px; border: 1px dashed var(--border); border-radius: 12px; display: grid; place-items: center; text-align: center; background: var(--surface-2); padding: 12px; }
.cfg-logo img { max-height: 96px; max-width: 100%; object-fit: contain; }
