:root {
    --dll-bg: #d7dbe1;
    --dll-panel: #f8f9fb;
    --dll-line: #c4cad3;
    --dll-text: #1f2933;
    --dll-muted: #687386;
    --dll-paper: #ffffff;
    --dll-select: #0d6efd;
    --dll-ruler: #f7f8fa;
    --dll-mm: 3.7795275591px;
    --dll-grid-5: 18.8976377955px;
    --dll-grid-10: 37.795275591px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    overflow: hidden;
    color: var(--dll-text);
    background: var(--dll-bg);
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

.dll-app {
    display: grid;
    grid-template-rows: 42px 1fr auto auto 26px;
    height: 100vh;
}

.dll-toolbar,
.dll-statusbar,
.dll-json-header {
    display: flex;
    align-items: center;
    background: var(--dll-panel);
}

.dll-toolbar {
    grid-row: 1;
    position: relative;
    justify-content: flex-start;
    gap: 8px;
    padding: 4px 10px;
}

.dll-statusbar,
.dll-json-header {
    justify-content: space-between;
}

.dll-toolbar-group {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.dll-brand {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0;
}

.dll-toolbar .form-select {
    border-radius: 4px;
    font-size: 12px;
}

.dll-toolbar .form-select {
    width: 132px;
}

.dll-work-toolbar {
    position: absolute;
    left: 412px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
}

.dll-window-toolbar {
    margin-left: auto;
    position: relative;
    z-index: 2;
}

.dll-hidden-zoom-select {
    display: none;
}

.dll-toolbar-separator {
    width: 1px;
    height: 22px;
    margin: 0 4px;
    background: var(--dll-line);
}

.dll-zoom-buttons {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.dll-toolbar-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    color: #344054;
    background: #ffffff;
    border: 1px solid #b9c1cd;
    border-radius: 4px;
    line-height: 1;
    cursor: pointer;
}

.dll-toolbar-button:hover,
.dll-toolbar-button:focus-visible {
    color: #0b5ed7;
    background: #f7fbff;
    border-color: #86b7fe;
    outline: none;
}

.dll-toolbar-button:disabled {
    color: #98a2b3;
    background: #f3f5f8;
    border-color: #d0d6df;
    cursor: default;
    opacity: 0.72;
}

.dll-toolbar-button.active {
    color: #ffffff;
    background: var(--dll-select);
    border-color: var(--dll-select);
}

.dll-exit-button:hover,
.dll-exit-button:focus-visible {
    color: #b42318;
    border-color: #f0a29a;
    background: #fff1f0;
}

.dll-toolbar-button svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.dll-toolbar-sum-symbol {
    display: block;
    font-family: "Cambria Math", "STIX Two Math", "Times New Roman", serif;
    font-size: 19px;
    font-weight: 600;
    line-height: 1;
    transform: translateY(-0.5px);
}

.dll-toolbar-button .dll-zoom-icon {
    width: 19px;
    height: 19px;
}

.dll-toolbar-button .dll-zoom-sign {
    stroke-width: 2.4;
}

.dll-toolbar .dll-fit-button {
    width: 34px;
    line-height: 1;
    font-size: 11px;
    font-weight: 600;
}

.dll-main {
    grid-row: 2;
    display: grid;
    grid-template-columns: 340px 1fr;
    min-height: 0;
}

.dll-sidebar {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    background: var(--dll-panel);
}

.dll-sidebar > .nav {
    flex: 0 0 auto;
}

.dll-sidebar-content {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

#tabProperties,
#tabDocument {
    height: 100%;
    min-height: 0;
}

#tabProperties.show.active,
#tabDocument.show.active {
    display: flex;
    flex-direction: column;
}

#tabObjects.show.active {
    height: 100%;
    overflow: auto;
    padding: 10px 10px 12px;
}

.dll-properties {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    flex-direction: column;
}

.dll-properties > .dll-empty-state {
    padding: 10px;
}

.dll-property-header {
    flex: 0 0 auto;
    display: grid;
    gap: 3px;
    position: relative;
    z-index: 2;
    padding: 8px 10px;
    background: #ffffff;
    border-bottom: 1px solid var(--dll-line);
    box-shadow: 0 3px 8px rgba(16, 24, 40, 0.06);
}

.dll-property-scroll {
    display: grid;
    flex: 1 1 auto;
    min-height: 0;
    align-content: start;
    grid-auto-rows: max-content;
    gap: 8px;
    overflow: auto;
    padding: 8px 10px 12px;
}

.dll-property-header-type {
    color: #101828;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
}

.dll-property-header .dll-property-separator {
    gap: 0;
    margin: 4px 0 1px;
}

.dll-property-header .dll-property-separator::after {
    width: 100%;
}

.dll-property-object-name {
    justify-self: stretch;
    min-width: 0;
    width: 100%;
    border: 0;
    border-radius: 0;
    padding: 5px 8px;
    background: #e4e9ef;
    color: #101828;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dll-property-object-name:not(:disabled) {
    cursor: pointer;
}

.dll-property-object-name:disabled {
    color: #101828;
}

.dll-property-group-actions {
    display: flex;
    justify-content: flex-end;
    gap: 4px;
    min-height: 24px;
}

.dll-property-group-action {
    display: inline-grid;
    place-items: center;
    width: 25px;
    height: 23px;
    padding: 0;
    color: #475467;
    background: #ffffff;
    border: 1px solid #cfd6df;
    border-radius: 4px;
    font-size: 10px;
}

.dll-property-group-action:hover {
    color: var(--dll-select);
    background: #f5f8fb;
    border-color: #9eb5c8;
}

.dll-property-group {
    align-self: start;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #d8dee7;
    border-radius: 5px;
}

.dll-property-group-toggle {
    display: flex;
    align-items: center;
    gap: 7px;
    width: 100%;
    min-height: 31px;
    padding: 5px 8px;
    color: #344054;
    text-align: left;
    background: #f5f7fa;
    border: 0;
    font-size: 12px;
    font-weight: 700;
}

.dll-property-group-toggle:hover {
    color: #173f5f;
    background: #edf3f7;
}

.dll-property-group-chevron {
    width: 11px;
    color: #667085;
    font-size: 9px;
    text-align: center;
    transition: transform 0.15s ease;
}

.dll-property-group.is-expanded .dll-property-group-chevron {
    transform: rotate(90deg);
}

.dll-property-group-body {
    display: grid;
    min-height: 0;
    gap: 8px;
    padding: 9px 8px 10px;
    overflow: visible;
    border-top: 1px solid #e4e8ee;
}

.dll-property-group-body[hidden] {
    display: none;
}

.dll-property-row {
    display: grid;
    grid-template-columns: 116px 1fr;
    align-items: center;
    gap: 8px;
}

.dll-property-row-full {
    grid-template-columns: 1fr;
}

.dll-property-row-full > label {
    display: none;
}

.dll-property-row label {
    margin: 0;
    color: var(--dll-muted);
    font-size: 12px;
}

.dll-property-separator {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0 2px;
    color: #344054;
    font-size: 12px;
    font-weight: 700;
}

.dll-property-separator::after {
    content: "";
    flex: 1 1 auto;
    height: 1px;
    background: var(--dll-line);
}

.dll-property-control {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.dll-property-row input,
.dll-property-row select,
.dll-property-row textarea {
    min-width: 0;
    border-radius: 4px;
    font-size: 12px;
}

.dll-property-row-richtext {
    grid-template-columns: 1fr;
    align-items: start;
}

.dll-property-row-richtext .dll-property-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
}

.dll-rich-text-property-html {
    min-height: 76px;
    resize: vertical;
    font-family: Consolas, "Courier New", monospace;
}

.dll-rich-text-property-button {
    white-space: nowrap;
}

.dll-property-row input[type="color"] {
    width: 46px;
    min-width: 46px;
    padding: 2px;
}

.dll-property-row input[type="checkbox"] {
    width: 16px;
    min-width: 16px;
    height: 16px;
    margin: 0;
}

.dll-property-unit {
    flex: 0 0 auto;
    color: var(--dll-muted);
    font-size: 11px;
}

.dll-formula-validate-button {
    flex: 0 0 auto;
    padding: 2px 7px;
    font-size: 11px;
    line-height: 1.35;
}

.dll-formula-open-button {
    flex: 0 0 auto;
    min-width: 30px;
    padding: 2px 7px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
}

.dll-label-panel {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dll-label-panel + .dll-property-header {
    margin-top: 10px;
}

.dll-label-sheet-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border: 1px solid var(--dll-line);
    border-radius: 4px;
    background: #f8fafc;
}

.dll-label-sheet-title {
    align-self: stretch;
    color: #344054;
    font-size: 12px;
    font-weight: 700;
}

.dll-label-warning {
    align-self: stretch;
    padding: 6px 8px;
    border: 1px solid #facc15;
    border-radius: 4px;
    background: #fffbeb;
    color: #854d0e;
    font-size: 11px;
    line-height: 1.3;
}

.dll-label-sheet-thumbnail {
    position: relative;
    flex: 0 0 auto;
    background: #ffffff;
    border: 1px solid #98a2b3;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .12);
}

.dll-label-sheet-item {
    position: absolute;
    border: 1px solid #3b82f6;
    background: rgba(59, 130, 246, .08);
}

.dll-label-preview-wrapper {
    background: #ffffff;
}

.dll-label-preview-sheet {
    position: relative;
    background: #ffffff;
}

.dll-label-preview-slot {
    position: absolute;
    overflow: hidden;
    background: #ffffff;
    outline: 1px dashed rgba(71, 84, 103, .35);
}

.dll-label-start-stage {
    display: flex;
    min-height: 430px;
    align-items: center;
    justify-content: center;
    overflow: auto;
    padding: 14px;
    border: 1px solid var(--dll-line);
    border-radius: 6px;
    background: #e8edf3;
}

.dll-label-start-paper {
    position: relative;
    flex: 0 0 auto;
    background: #d9e0e8;
    border: 1px solid #7d8794;
    box-shadow: 0 5px 16px rgba(15, 23, 42, .18);
}

.dll-label-start-slot {
    position: absolute;
    overflow: hidden;
    padding: 0;
    border: 1px solid #98a2b3;
    border-radius: 2px;
    background: #ffffff;
    color: #475467;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
}

.dll-label-start-slot:hover {
    border-color: #0d6efd;
    box-shadow: inset 0 0 0 1px #0d6efd;
}

.dll-label-start-slot.is-skipped {
    border-color: #c6ccd4;
    background: #e5e9ee;
    color: #98a2b3;
}

.dll-label-start-slot.is-selected {
    z-index: 1;
    border-color: #0d6efd;
    background: #dbeafe;
    color: #1d4ed8;
    box-shadow: inset 0 0 0 2px #0d6efd;
}

.dll-label-start-selection {
    min-height: 24px;
    margin-top: 12px;
    color: #344054;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}

.dll-formula-open-button.active {
    color: #ffffff;
    background: var(--dll-select);
    border-color: var(--dll-select);
}

.dll-formula-validation-result {
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(100% + 3px);
    z-index: 20;
    padding: 2px 6px;
    background: rgba(248, 249, 251, 0.96);
    border: 1px solid var(--dll-line);
    border-radius: 4px;
    color: var(--dll-muted);
    font-size: 11px;
    line-height: 1.25;
    overflow-wrap: anywhere;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
    pointer-events: none;
}

.dll-formula-validation-result.is-ok {
    color: #0f6b3e;
}

.dll-formula-validation-result.is-error {
    color: #b42318;
}

.dll-formula-validation-result.is-pending {
    color: #475467;
}

.dll-formula-editor-dialog {
    max-width: min(1420px, 96vw);
    margin-top: 10px;
    margin-bottom: 10px;
}

.dll-formula-editor-dialog.is-dragging {
    margin: 0;
}

.dll-formula-editor-modal {
    max-height: calc(100vh - 20px);
    overflow: hidden;
}

.dll-formula-editor-modal .modal-header {
    padding: 12px 16px;
    cursor: move;
}

.dll-formula-editor-modal .modal-body {
    overflow: auto;
    padding: 12px 16px 10px;
}

.dll-formula-editor-modal .modal-footer {
    padding: 8px 16px;
}

.dll-formula-editor-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    min-height: 0;
}

.dll-formula-editor-top {
    display: grid;
    grid-template-columns: minmax(210px, 1fr) minmax(210px, 1fr) minmax(420px, 460px);
    gap: 12px;
}

.dll-formula-browser {
    display: flex;
    min-height: 0;
    flex-direction: column;
}

.dll-formula-editor-text {
    min-height: 118px;
    font-family: Consolas, "Courier New", monospace;
    font-size: 13px;
}

.dll-user-section-dialog {
    max-width: min(920px, 94vw);
}

.dll-user-section-text {
    height: min(58vh, 520px);
    min-height: 320px;
    resize: vertical;
    font-family: Consolas, "Courier New", monospace;
    font-size: 13px;
    line-height: 1.45;
    white-space: pre;
}

.dll-user-section-validation {
    min-height: 20px;
    margin-top: 8px;
    color: #b42318;
    font-size: 12px;
}

.dll-formula-function-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    min-height: 26px;
    margin-bottom: 6px;
    overflow-x: auto;
    overflow-y: hidden;
}

.dll-formula-function-tabs-placeholder {
    visibility: hidden;
    overflow: hidden;
}

.dll-formula-category-tab {
    padding: 4px 8px;
    border: 1px solid #d7e2ee;
    border-radius: 4px;
    background: #fff;
    color: #52637a;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
}

.dll-formula-category-tab:hover,
.dll-formula-category-tab.active {
    border-color: #8ab4f8;
    background: #eaf2ff;
    color: #123f7a;
}

.dll-formula-function-list,
.dll-formula-constant-list,
.dll-formula-variable-list {
    overflow: auto;
    border: 1px solid var(--dll-line);
    border-radius: 4px;
    background: #fff;
    height: 220px;
    flex: 0 0 220px;
}

.dll-formula-function-item,
.dll-formula-constant-item,
.dll-formula-variable-item {
    display: block;
    width: 100%;
    padding: 6px 8px;
    border: 0;
    border-bottom: 1px solid #eef2f6;
    background: transparent;
    color: #1f2937;
    font-size: 12px;
    text-align: left;
}

.dll-formula-variable-browser {
    display: grid;
    grid-template-columns: minmax(120px, 0.95fr) minmax(150px, 1.2fr);
    height: 100%;
    min-height: 0;
    background: #fff;
}

.dll-formula-variable-origins,
.dll-formula-variable-fields {
    min-width: 0;
    overflow: auto;
}

.dll-formula-variable-origins {
    border-right: 2px solid #d7e2ee;
    background: #f5f8fb;
}

.dll-formula-variable-fields {
    background: #fff;
}

.dll-formula-variable-origin {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 6px;
    align-items: center;
    width: 100%;
    padding: 6px 8px;
    border: 0;
    border-bottom: 1px solid #e2e8f0;
    background: transparent;
    color: #344054;
    font-size: 12px;
    text-align: left;
}

.dll-formula-variable-origin i,
.dll-formula-variable-item i {
    color: #667085;
    text-align: center;
}

.dll-formula-variable-origin span,
.dll-formula-variable-item span {
    min-width: 0;
}

.dll-formula-variable-origin strong,
.dll-formula-variable-item strong {
    display: block;
    overflow: hidden;
    color: #1f2937;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dll-formula-variable-origin small,
.dll-formula-variable-item small {
    display: block;
    overflow: hidden;
    color: #667085;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dll-formula-variable-origin:hover,
.dll-formula-variable-origin.active,
.dll-formula-variable-item:hover,
.dll-formula-variable-item.active {
    background: #eaf2ff;
}

.dll-formula-variable-origin:hover strong,
.dll-formula-variable-origin.active strong,
.dll-formula-variable-item:hover strong,
.dll-formula-variable-item.active strong {
    color: #123f7a;
}

.dll-formula-variable-item {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 6px;
    align-items: center;
    padding: 5px 8px;
}

.dll-formula-category-header {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 5px 8px;
    border-bottom: 1px solid #d7e2ee;
    background: #f3f6fb;
    color: #52637a;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.dll-formula-function-item:hover,
.dll-formula-function-item.active,
.dll-formula-constant-item:hover,
.dll-formula-constant-item.active,
.dll-formula-variable-item:hover,
.dll-formula-variable-item.active {
    background: #eaf2ff;
    color: #123f7a;
}

.dll-formula-function-detail {
    height: 112px;
    overflow: auto;
    border: 1px solid var(--dll-line);
    border-radius: 4px;
    padding: 10px;
    background: #fbfcfe;
    font-size: 12px;
}

.dll-formula-function-detail h6 {
    margin: 0 0 6px;
    color: #101828;
    font-size: 15px;
    font-weight: 700;
}

.dll-formula-detail-row {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 10px;
    margin-bottom: 4px;
}

.dll-formula-detail-row strong {
    color: #52637a;
    font-size: 11px;
    white-space: nowrap;
}

.dll-formula-detail-row span {
    overflow-wrap: anywhere;
}

.dll-formula-editor-validation {
    min-height: 22px;
    font-size: 12px;
    font-weight: 600;
}

.dll-formula-editor-validation.is-ok {
    color: #087443;
}

.dll-formula-editor-validation.is-warning {
    color: #a15c00;
}

.dll-formula-suggestions {
    position: absolute;
    z-index: 2000;
    min-width: 150px;
    max-width: 230px;
    padding: 4px;
    background: #ffffff;
    border: 1px solid #b8c2cc;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .18);
}

.dll-formula-suggestions button {
    display: block;
    width: 100%;
    padding: 5px 8px;
    border: 0;
    background: transparent;
    color: #1f2937;
    font: 12px Consolas, "Courier New", monospace;
    text-align: left;
}

.dll-formula-suggestion-group {
    padding: 5px 8px 3px;
    color: #5b6472;
    font-size: 11px;
    font-weight: 600;
}

.dll-formula-suggestions button:hover,
.dll-formula-suggestions button.active {
    background: #e8f0fe;
}

@media (max-width: 992px) {
    .dll-formula-editor-top {
        grid-template-columns: 1fr;
    }

    .dll-formula-function-list,
    .dll-formula-constant-list,
    .dll-formula-variable-list {
        height: 180px;
        flex-basis: 180px;
    }

    .dll-formula-detail-row {
        grid-template-columns: 1fr;
        gap: 2px;
    }
}

.dll-border-visibility-editor {
    width: 128px;
    height: 86px;
    padding: 0;
    background: transparent;
    border: 0;
}

.dll-border-visibility-box {
    position: relative;
    width: 128px;
    height: 86px;
    margin: 0;
}

.dll-border-visibility-box::before {
    content: "";
    position: absolute;
    left: 34px;
    top: 26px;
    width: 60px;
    height: 34px;
    background: #ffffff;
    border: 1px solid #6b7280;
}

.dll-border-side {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin: 0;
}

.dll-border-side input {
    width: 14px;
    min-width: 14px;
    height: 14px;
    margin: 0;
}

.dll-border-side.is-top {
    left: 55px;
    top: 0;
}

.dll-border-side.is-right {
    right: 10px;
    top: 34px;
}

.dll-border-side.is-bottom {
    left: 55px;
    bottom: 0;
}

.dll-border-side.is-left {
    left: 10px;
    top: 34px;
}

.dll-padding-box-editor {
    width: 100%;
    height: 192px;
    padding: 0;
    background: transparent;
    border: 0;
}

.dll-padding-box {
    display: grid;
    grid-template-columns: 64px 96px 64px;
    grid-template-rows: auto 40px auto 28px;
    justify-content: center;
    align-items: center;
    column-gap: 26px;
    row-gap: 10px;
    width: 100%;
    max-width: 330px;
    margin: 0 auto;
}

.dll-padding-center {
    grid-column: 2;
    grid-row: 2;
    width: 96px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #c8d0da;
    background: #f8fafc;
    color: #52637a;
    font-size: 10px;
    line-height: 1;
}

.dll-padding-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin: 0;
    color: var(--dll-muted);
    font-size: 11px;
}

.dll-padding-side input {
    width: 54px;
    min-width: 54px;
    height: 25px;
    padding: 2px 4px;
    font-size: 11px;
    text-align: right;
}

.dll-padding-side.is-top {
    grid-column: 2;
    grid-row: 1;
}

.dll-padding-side.is-right {
    grid-column: 3;
    grid-row: 2;
    transform: translateY(-10px);
}

.dll-padding-side.is-bottom {
    grid-column: 2;
    grid-row: 3;
    flex-direction: column-reverse;
}

.dll-padding-side.is-left {
    grid-column: 1;
    grid-row: 2;
    transform: translateY(-10px);
}

.dll-padding-unit {
    grid-column: 3;
    grid-row: 4;
    justify-self: end;
    align-self: center;
    color: var(--dll-muted);
    font-size: 11px;
}

.dll-padding-lock {
    grid-column: 2;
    grid-row: 4;
    justify-self: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 1px solid #c8d0da;
    border-radius: 4px;
    background: #ffffff;
    color: #667085;
}

.dll-padding-lock:hover,
.dll-padding-lock.is-linked {
    border-color: #8ab4f8;
    color: #1d4ed8;
}

.dll-padding-lock svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.dll-empty-state {
    padding: 14px;
    color: var(--dll-muted);
    border: 1px dashed var(--dll-line);
    border-radius: 4px;
    font-size: 12px;
    text-align: center;
}

.dll-object-list {
    display: grid;
    gap: 4px;
}

.dll-sidebar-block {
    margin-bottom: 10px;
}

.dll-sidebar-block-title {
    margin: 6px 0 5px;
    color: var(--dll-muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.dll-layer-list {
    display: grid;
    gap: 4px;
}

.dll-layer-toolbar {
    display: flex;
    gap: 4px;
    margin-bottom: 2px;
}

.dll-layer-item {
    display: grid;
    grid-template-columns: 18px 14px 1px minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
    padding: 5px 6px;
    color: var(--dll-text);
    background: #ffffff;
    border: 1px solid var(--dll-line);
    border-radius: 4px;
    font-size: 12px;
}

.dll-layer-item.active {
    border-color: var(--dll-select);
    box-shadow: inset 3px 0 0 var(--dll-select);
}

.dll-layer-color {
    width: 12px;
    height: 12px;
    border: 1px solid rgba(0, 0, 0, .18);
}

.dll-layer-color-input {
    width: 1px;
    height: 1px;
    padding: 0;
    border: 0;
    opacity: 0;
}

.dll-layer-name {
    width: 100%;
    min-width: 0;
    padding: 2px 4px;
    border: 1px solid transparent;
    background: transparent;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dll-layer-count {
    min-width: 18px;
    color: var(--dll-muted);
    font-size: 11px;
    text-align: right;
}

.dll-layer-condition-wrap {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px;
}

.dll-layer-condition {
    width: 100%;
    min-width: 0;
    padding: 3px 5px;
    color: var(--dll-muted);
    background: #f8fafc;
    border: 1px solid var(--dll-line);
    border-radius: 3px;
    font-size: 11px;
}

.dll-layer-fx {
    width: 30px;
    min-width: 30px;
    padding: 2px 4px;
    line-height: 1.2;
}

.dll-layer-fx.active {
    color: #ffffff;
    background: var(--dll-select);
    border-color: var(--dll-select);
}

.dll-object-item {
    width: 100%;
    padding: 7px 8px;
    color: var(--dll-text);
    background: #ffffff;
    border: 1px solid var(--dll-line);
    border-radius: 4px;
    font-size: 12px;
    text-align: left;
}

.dll-object-item.active {
    color: #ffffff;
    background: var(--dll-select);
    border-color: var(--dll-select);
}

.dll-workspace {
    position: relative;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    background: #cfd5dd;
}

.dll-object-toolbar {
    position: absolute;
    z-index: 7;
    left: 0;
    top: 0;
    bottom: 0;
    width: 38px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 6px 4px;
    background: #eef1f5;
    border-right: 1px solid var(--dll-line);
}

.dll-tool-button {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #344054;
    background: #ffffff;
    border: 1px solid #b9c1cd;
    border-radius: 4px;
    cursor: pointer;
}

.dll-tool-button:hover:not(:disabled):not([aria-disabled="true"]),
.dll-tool-button:focus-visible {
    color: #0b5ed7;
    background: #f7fbff;
    border-color: #86b7fe;
    outline: none;
}

.dll-tool-button.is-active {
    color: #ffffff;
    background: var(--dll-select);
    border-color: var(--dll-select);
}

.dll-tool-button:disabled,
.dll-tool-button[aria-disabled="true"] {
    color: #98a2b3;
    background: #f7f8fa;
    cursor: default;
    opacity: 0.72;
}

.dll-tool-button svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.dll-tool-icon-text {
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
}

.dll-ruler-corner {
    position: absolute;
    z-index: 5;
    left: 38px;
    top: 0;
    width: 34px;
    height: 26px;
    background: var(--dll-ruler);
    border-right: 1px solid var(--dll-line);
    border-bottom: 1px solid var(--dll-line);
}

.dll-ruler-wrapper {
    position: absolute;
    z-index: 4;
    overflow: hidden;
    background: var(--dll-ruler);
}

.dll-ruler {
    position: relative;
    color: #4b5563;
    font-size: 9px;
    user-select: none;
    will-change: transform;
}

.dll-horizontal-ruler-wrapper {
    left: 72px;
    top: 0;
    right: 0;
    height: 26px;
    border-bottom: 1px solid var(--dll-line);
}

.dll-vertical-ruler-wrapper {
    left: 38px;
    top: 26px;
    bottom: 0;
    width: 34px;
    border-right: 1px solid var(--dll-line);
}

.dll-horizontal-ruler {
    height: 26px;
}

.dll-vertical-ruler {
    width: 34px;
}

.dll-ruler-mark {
    position: absolute;
    color: #4f5b6a;
    line-height: 1;
}

.dll-horizontal-ruler .dll-ruler-mark {
    bottom: 0;
    width: 1px;
    border-left: 1px solid #7d8794;
}

.dll-horizontal-ruler .dll-ruler-mark.is-minor {
    height: 5px;
    border-left-color: #aeb6c1;
}

.dll-horizontal-ruler .dll-ruler-mark.is-medium {
    height: 9px;
    border-left-color: #8e98a6;
}

.dll-horizontal-ruler .dll-ruler-mark.is-major {
    height: 15px;
    border-left-color: #6f7a88;
}

.dll-horizontal-ruler .dll-ruler-number {
    position: absolute;
    top: 2px;
    transform: translateX(-50%);
    color: #4f5b6a;
    font-size: 9px;
    line-height: 1;
    white-space: nowrap;
}

.dll-horizontal-ruler .dll-ruler-number.is-start {
    transform: translateX(2px);
}

.dll-vertical-ruler .dll-ruler-mark {
    right: 0;
    height: 1px;
    border-top: 1px solid #7d8794;
}

.dll-vertical-ruler .dll-ruler-mark.is-minor {
    width: 5px;
    border-top-color: #aeb6c1;
}

.dll-vertical-ruler .dll-ruler-mark.is-medium {
    width: 9px;
    border-top-color: #8e98a6;
}

.dll-vertical-ruler .dll-ruler-mark.is-major {
    width: 15px;
    border-top-color: #6f7a88;
}

.dll-vertical-ruler .dll-ruler-number {
    position: absolute;
    left: 2px;
    transform: translateY(-50%);
    color: #4f5b6a;
    font-size: 9px;
    line-height: 1;
    white-space: nowrap;
}

.dll-vertical-ruler .dll-ruler-number.is-start {
    transform: translateY(2px);
}

.dll-ruler-mouse {
    position: absolute;
    z-index: 6;
    pointer-events: none;
    background: #0d6efd;
}

.dll-ruler-mouse-x {
    top: 0;
    bottom: 0;
    width: 1px;
}

.dll-ruler-mouse-y {
    left: 0;
    right: 0;
    height: 1px;
}

.dll-design-scroll {
    position: absolute;
    inset: 26px 0 30px 72px;
    overflow: auto;
}

.dll-design-scroll.is-insertion-mode {
    cursor: crosshair;
}

.dll-design-surface {
    position: relative;
    min-width: 100%;
    min-height: 100%;
    padding: 0;
}

.dll-preview-surface {
    position: relative;
    min-width: 100%;
    min-height: 100%;
    padding: 0;
}

.dll-preview-loading {
    padding: 16px;
    color: var(--dll-muted);
}

.dll-preview-frame-wrapper {
    display: inline-block;
    background: var(--dll-paper);
    box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.25);
    transform-origin: top left;
}

.dll-preview-frame {
    display: block;
    width: calc(210mm + 60px);
    height: calc(297mm + 60px);
    border: 0;
    background: transparent;
    transform-origin: top left;
    pointer-events: none;
}

.dll-paper {
    position: relative;
    display: block;
    width: 793.700787411px;
    height: 1122.519685043px;
    background-color: var(--dll-paper);
    background-image:
        linear-gradient(to right, rgba(180, 190, 200, 0.22) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(180, 190, 200, 0.22) 1px, transparent 1px),
        linear-gradient(to right, rgba(150, 160, 170, 0.28) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(150, 160, 170, 0.28) 1px, transparent 1px);
    background-size:
        var(--dll-grid-5) var(--dll-grid-5),
        var(--dll-grid-5) var(--dll-grid-5),
        var(--dll-grid-10) var(--dll-grid-10),
        var(--dll-grid-10) var(--dll-grid-10);
    box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.25);
    transform-origin: top left;
}

.dll-paper.is-grid-hidden {
    background-image: none;
}

.dll-paper.is-insertion-mode {
    cursor: crosshair;
}

.dll-preview-paper {
    position: relative;
    display: block;
    background-color: var(--dll-paper);
    box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.25);
    transform-origin: top left;
}

.dll-preview-object {
    position: absolute;
    box-sizing: border-box;
    pointer-events: none;
    user-select: none;
}

.dll-preview-text {
    display: flex;
    align-items: center;
    padding: 1px 3px;
    overflow: hidden;
    line-height: 1.15;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.dll-preview-rectangle {
    overflow: hidden;
}

.dll-preview-error {
    color: #b42318;
    font-weight: 700;
}

.dll-object {
    position: absolute;
    box-sizing: border-box;
    cursor: default;
    user-select: none;
}

.dll-object.is-selected {
    outline: 1px dotted var(--dll-select);
    outline-offset: 0;
    cursor: pointer;
}

.dll-rich-text {
    padding: 0;
}

.dll-rich-text-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    box-sizing: border-box;
    pointer-events: none;
}

.dll-rich-text-html {
    flex: 0 0 auto;
    min-width: 0;
    box-sizing: border-box;
    overflow-wrap: anywhere;
    pointer-events: none;
    user-select: none;
    font-family: Arial, sans-serif;
    font-size: 12pt;
}

.dll-rich-text-html > :first-child {
    margin-top: 0;
}

.dll-rich-text-html > :last-child {
    margin-bottom: 0;
}

.dll-rich-text-editor-dialog {
    width: min(94vw, 1240px);
    max-width: none;
}

.dll-rich-text-editor-modal .modal-body {
    display: flex;
    min-height: 520px;
    max-height: calc(100vh - 155px);
    padding: 12px;
}

.dll-rich-text-editor-host {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    flex-direction: column;
    border: 1px solid #9aa4b2;
    background: #ffffff;
}

.dll-rich-text-editor-host .pell-actionbar {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 2px;
    flex-wrap: wrap;
    min-height: 40px;
    padding: 4px;
    border-bottom: 1px solid #9aa4b2;
    background: #dce8f5;
}

.dll-rich-text-editor-host .pell-button {
    width: 31px;
    height: 30px;
    margin: 0;
    padding: 3px;
    border-right: 0;
    color: #111827;
    font-size: 15px;
}

.dll-rich-text-editor-host .pell-button:hover,
.dll-rich-text-editor-host .pell-button-selected {
    background: #b9d6f2;
}

.dll-rich-text-align-icon {
    display: block;
    width: 18px;
    height: 18px;
    margin: auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: square;
}

.dll-rich-text-editor-host .pell-content {
    flex: 1 1 auto;
    min-height: 430px;
    padding: 14px;
    overflow: auto;
    outline: 0;
    font-family: Arial, sans-serif;
    font-size: 12pt;
}

.dll-rich-text-extended-actions {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-right: 5px;
    padding-right: 6px;
    border-right: 1px solid #8fa3b8;
}

.dll-rich-text-select {
    width: auto;
    min-width: 70px;
    max-width: 165px;
    height: 30px;
    padding-top: 2px;
    padding-bottom: 2px;
    font-size: 13px;
}

.dll-rich-text-select:first-child {
    width: 155px;
}

.dll-rich-text-size {
    width: 60px;
    height: 30px;
    padding: 2px 4px;
    font-size: 13px;
}

.dll-rich-text-expression {
    height: 30px;
    padding: 2px 8px;
    border: 1px solid #8fa3b8;
    border-radius: 3px;
    background: #f8fbff;
    color: #102a43;
    font-weight: 600;
}

.dll-rich-text-expression:hover {
    background: #b9d6f2;
}

/* El editor de fórmulas puede abrirse desde el modal de texto enriquecido. */
#formulaEditorModal.show {
    z-index: 1080;
}

.dll-rich-text-color {
    box-sizing: border-box;
    width: 29px;
    min-width: 29px;
    height: 30px;
    margin: 0;
    padding: 2px;
    border: 1px solid #aebdcb;
    border-left: 0;
    border-radius: 0 4px 4px 0;
    background: #f8fbff;
    cursor: pointer;
}

.dll-rich-text-color-control {
    display: inline-flex;
    box-sizing: border-box;
    height: 30px;
    align-items: center;
    flex: 0 0 auto;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.dll-rich-text-color-apply {
    display: inline-flex;
    box-sizing: border-box;
    height: 30px;
    align-items: center;
    gap: 5px;
    margin: 0;
    padding: 2px 6px;
    border: 1px solid #aebdcb;
    border-radius: 4px 0 0 4px;
    background: #f8fbff;
    color: #26384a;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
}

.dll-rich-text-current-color {
    display: inline-block;
    width: 10px;
    height: 10px;
    border: 1px solid rgb(0 0 0 / 35%);
}

.dll-rich-text-color-apply:hover {
    background: #e7f1fb;
}

.dll-rich-text-color-apply.is-active {
    border-color: #2879d0;
    background: #cfe5fb;
    box-shadow: inset 0 0 0 1px #78aee5;
}

.dll-rich-text-spellcheck {
    box-sizing: border-box;
    height: 30px;
    margin: 0 0 0 2px;
    padding: 2px 7px;
    border: 1px solid #aebdcb;
    border-radius: 4px;
    background: #f8fbff;
    color: #26384a;
    font-size: 11px;
    line-height: 1;
    cursor: pointer;
}

.dll-rich-text-spellcheck:hover { background: #e7f1fb; }

.dll-rich-text-spellcheck.is-active {
    border-color: #2879d0;
    background: #cfe5fb;
    box-shadow: inset 0 0 0 1px #78aee5;
}

.dll-rich-text-color-apply:focus-visible,
.dll-rich-text-color:focus-visible,
.dll-rich-text-spellcheck:focus-visible {
    position: relative;
    z-index: 1;
    outline: 0;
    border-color: #5c9ded;
    box-shadow: 0 0 0 2px rgb(92 157 237 / 20%);
}

.dll-table {
    overflow: visible;
}

.dll-table-grid {
    position: absolute;
    inset: 0;
    pointer-events: auto;
}

.dll-table-grid-hidden {
    display: none;
}

.dll-table-grid-line {
    position: absolute;
    left: 0;
    width: 100%;
    box-sizing: border-box;
}

.dll-table-grid-cell {
    position: absolute;
    top: 0;
    height: 100%;
    box-sizing: border-box;
    pointer-events: none;
}

.dll-table-grid-rule {
    position: absolute;
    display: block;
    pointer-events: none;
    background: var(--dll-table-grid-color, #4b5563);
}

.dll-table-grid-rule-horizontal {
    left: 0;
    width: 100%;
    height: var(--dll-table-grid-width, 1px);
    transform: translateY(-50%);
}

.dll-table-grid-rule-vertical {
    top: 0;
    height: 100%;
    width: var(--dll-table-grid-width, 1px);
    transform: translateX(-50%);
}

.dll-table-grid-separator {
    position: absolute;
    z-index: 12;
    top: -3px;
    width: 9px;
    height: calc(100% + 6px);
    margin-left: -4px;
    cursor: col-resize;
    pointer-events: auto;
}

.dll-table-grid-separator::after {
    content: '';
    position: absolute;
    top: 3px;
    bottom: 3px;
    left: 4px;
    border-left: 2px solid rgba(37, 99, 235, .7);
    opacity: 0;
}

.dll-table-grid-separator:hover::after {
    opacity: 1;
}

.dll-table-section-marker {
    position: absolute;
    right: -26px;
    width: 22px;
    min-height: 14px;
    border-radius: 0 4px 4px 0;
    pointer-events: auto;
    cursor: pointer;
    user-select: none;
    z-index: 14;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, .08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #111827;
    font-size: 8px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;
}

.dll-table-section-marker.is-header {
    background: rgba(248, 113, 113, .84);
}

.dll-table-section-marker.is-detail {
    background: rgba(148, 163, 184, .72);
}

.dll-table-section-marker.is-footer {
    background: rgba(250, 204, 21, .86);
}

.dll-table-section-marker.is-groupHeader {
    background: rgba(244, 114, 182, .84);
}

.dll-table-section-marker.is-groupFooter {
    background: rgba(251, 146, 60, .84);
}

.dll-table-config-dialog {
    width: min(1120px, calc(100vw - 32px));
    max-width: min(1120px, calc(100vw - 32px));
}

.dll-table-config-modal .modal-header {
    cursor: move;
    user-select: none;
}

.dll-table-config-modal .modal-header .btn-close {
    cursor: auto;
}

.dll-table-config-modal .modal-body {
    max-height: min(70vh, 680px);
    overflow-x: hidden;
    overflow-y: auto;
}

.dll-variables-manager-dialog {
    max-width: min(1080px, calc(100vw - 40px));
}

.dll-variables-manager-dialog .modal-content {
    height: min(780px, calc(100vh - 40px));
}

.dll-variables-manager-dialog .modal-body {
    display: flex;
    min-height: 0;
    flex-direction: column;
    overflow: hidden;
}

.dll-variables-manager-dialog .tab-content,
.dll-variables-manager-dialog .tab-pane,
.dll-variables-manager-dialog .tab-pane > div {
    min-height: 0;
    flex: 1 1 auto;
}

.dll-variables-manager-dialog .tab-content {
    display: flex;
}

.dll-variables-manager-dialog .tab-pane.active {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.dll-var-manager {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 10px;
    height: 100%;
    min-height: 0;
}

.dll-var-table-panel,
.dll-var-editor-panel {
    display: flex;
    flex-direction: column;
    border: 1px solid #d6dee8;
    background: #fff;
    min-width: 0;
    min-height: 0;
}

.dll-var-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 12px;
    border-bottom: 1px solid #d6dee8;
}

.dll-var-list-actions {
    display: flex;
    gap: 4px;
}

.dll-var-list-actions .btn {
    width: 26px;
    height: 26px;
    padding: 0;
}

.dll-var-table-wrap {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
}

.dll-var-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 11.5px;
}

.dll-var-table th,
.dll-var-table td {
    padding: 4px 8px;
    border-bottom: 1px solid #eef2f6;
    vertical-align: middle;
    line-height: 1.25;
}

.dll-var-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f5f8fb;
    color: #52637a;
    font-weight: 700;
}

.dll-var-table th:nth-child(1),
.dll-var-table td:nth-child(1) {
    width: 26%;
}

.dll-var-table th:nth-child(2),
.dll-var-table td:nth-child(2) {
    width: 16%;
}

.dll-var-table tbody tr {
    cursor: pointer;
}

.dll-var-table tbody tr:hover,
.dll-var-table tbody tr.active {
    background: #eaf2ff;
}

.dll-var-formula-cell {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dll-var-editor-panel {
    flex: 0 0 auto;
    padding: 10px 12px 12px;
}

.dll-var-editor-title {
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid #d6dee8;
    color: #1f2937;
    font-weight: 700;
}

.dll-var-editor-row {
    display: grid;
    grid-template-columns: minmax(150px, 220px) minmax(120px, 150px) minmax(260px, 1fr);
    gap: 10px;
    align-items: end;
}

.dll-var-editor-row .form-label {
    margin-bottom: 3px;
    color: #52637a;
    font-size: 12px;
}

.dll-var-editor-row .form-control,
.dll-var-editor-row .form-select,
.dll-var-editor-row .btn {
    min-height: 30px;
}

.dll-var-empty {
    min-height: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #64748b;
}

.dll-table-config-layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 22px;
}

.dll-table-config-empty {
    min-height: 360px;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 14px;
    color: var(--dll-muted);
    border: 1px dashed #cbd5e1;
    background: #f8fafc;
}

.dll-table-config-empty .dll-table-group-config {
    align-self: start;
    justify-self: stretch;
    min-width: min(520px, 100%);
    margin-bottom: 18px;
}

.dll-table-group-empty-row {
    display: grid;
    grid-template-columns: max-content minmax(260px, 1fr);
    align-items: center;
    gap: 8px;
}

.dll-table-group-row {
    display: grid;
    grid-template-columns: 132px minmax(420px, 1fr);
    align-items: center;
    gap: 10px;
    min-width: 0;
    width: 100%;
}

.dll-table-group-row .form-label {
    white-space: nowrap;
}

.dll-table-formula-field {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-width: 0;
    width: 100%;
}

.dll-table-formula-field .form-label {
    color: var(--dll-muted);
    white-space: nowrap;
}

.dll-table-formula-field .input-group {
    min-width: 0;
}

.dll-table-formula-field .dll-formula-open-button {
    min-width: 30px;
    padding: 2px 7px;
}

.dll-table-config-empty-text {
    font-size: 14px;
}

.dll-table-config-empty-add {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.dll-table-config-empty-add span[aria-hidden="true"] {
    font-size: 20px;
    line-height: 1;
}

.dll-table-config-layout > section {
    min-width: 0;
}

.dll-table-config-layout > aside {
    display: grid;
    align-content: start;
    gap: 12px;
    min-width: 0;
}

.dll-table-lines-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--dll-line);
    color: #344054;
    font-size: 12px;
}

.dll-table-lines-actions {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 3px;
}

.dll-table-icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    min-width: 24px;
    height: 24px;
    padding: 0;
    line-height: 1;
}

.dll-table-icon-button svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.dll-table-config-lines {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 142px;
    overflow: auto;
    padding-right: 2px;
}

.dll-table-config-line-button {
    width: 100%;
    padding: 6px 8px;
    color: var(--dll-text);
    background: #ffffff;
    border: 1px solid var(--dll-line);
    border-radius: 4px;
    font-size: 12px;
    text-align: left;
}

.dll-table-config-line-button.active {
    color: #fff;
    background: var(--dll-select);
    border-color: var(--dll-select);
}

.dll-table-line-size-row {
    display: grid;
    grid-template-columns: 42px max-content 50px max-content 70px minmax(180px, 1fr) max-content;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.dll-table-group-expression-input {
    min-width: 0;
    width: 100%;
}

.dll-table-line-size-row .form-label {
    color: var(--dll-muted);
}

.dll-table-line-size-row .dll-table-formula-field {
    grid-column: span 3;
}

.dll-table-advanced-grid {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
}

.dll-table-advanced-suppress {
    width: 100%;
}

.dll-table-advanced-zebra {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
    min-width: 0;
}

.dll-table-advanced-zebra .form-check {
    min-width: 172px;
}

.dll-table-advanced-zebra .form-label {
    color: var(--dll-muted);
}

.dll-table-advanced-zebra input[type="color"] {
    width: 42px;
    min-width: 42px;
    height: 28px;
    padding: 2px;
}

.dll-table-line-padding-row {
    display: grid;
    grid-template-columns: max-content 34px max-content 34px max-content 34px max-content 34px max-content;
    align-items: center;
    gap: 6px;
    color: var(--dll-muted);
}

.dll-table-line-padding-row > .small {
    color: #344054;
    margin-right: 6px;
}

.dll-table-line-padding-row .dll-table-mm-input {
    width: 104px;
}

.dll-table-line-border-config {
    border: 1px solid #d6dce4;
    border-radius: 4px;
    padding: 10px 12px;
    background: #f8fafc;
}

.dll-table-line-border-grid {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) 150px;
    align-items: center;
    gap: 14px;
}

.dll-table-config-layout > aside .dll-table-line-border-grid {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 10px;
}

.dll-table-line-border-fields {
    display: grid;
    gap: 8px;
}

.dll-table-line-border-field {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
}

.dll-table-line-border-field .form-label {
    margin: 0;
    color: var(--dll-muted);
}

.dll-table-line-border-field input[type="color"] {
    width: 46px;
    min-width: 46px;
    padding: 2px;
}

.dll-table-line-border-color-control {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dll-table-line-background-color-control {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dll-table-line-background-color-control input[type="color"] {
    width: 46px;
    min-width: 46px;
    padding: 2px;
}

.dll-table-line-border-color-control .dll-formula-open-button {
    min-width: 30px;
    padding: 2px 7px;
}

.dll-table-line-background-color-control .dll-formula-open-button {
    min-width: 30px;
    padding: 2px 7px;
}

.dll-table-condition-input {
    min-width: 0;
}

.dll-table-condition-input .dll-formula-open-button {
    min-width: 30px;
    padding: 2px 7px;
}

.dll-table-mm-input {
    width: 118px;
}

.dll-table-line-border-field .dll-table-mm-input {
    width: 124px;
}

.dll-table-line-border-field .input-group {
    width: 124px;
}

.dll-table-column-row .dll-table-mm-input {
    width: 116px;
}

.dll-table-line-border-picker {
    display: flex;
    justify-content: center;
}

.dll-table-line-border-picker .dll-border-visibility-editor {
    width: 128px;
    height: 86px;
}

.dll-table-line-border-separators {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 10px 0 0;
    padding-top: 9px;
    border-top: 1px solid #e1e6ee;
    color: #344054;
}

.dll-table-line-border-separators .form-check-input {
    margin: 0;
}

.dll-table-structure-preview {
    position: relative;
    width: 100%;
    height: 74px;
    border: 1px solid #9ca3af;
    background: #ffffff;
    margin: 10px 0 14px;
}

.dll-table-structure-cell {
    position: absolute;
    top: 0;
    height: 100%;
    border-right: 1px solid #6b7280;
    box-sizing: border-box;
}

.dll-table-structure-cell:first-child {
    border-left: 0;
}

.dll-table-structure-separator {
    position: absolute;
    top: -4px;
    width: 9px;
    height: calc(100% + 8px);
    margin-left: -4px;
    cursor: col-resize;
    background: transparent;
}

.dll-table-structure-separator::after {
    content: '';
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 4px;
    border-left: 2px solid #2563eb;
}

.dll-table-columns-list {
    display: grid;
    gap: 6px;
    max-height: 340px;
    overflow: auto;
    padding-right: 2px;
}

.dll-table-cells-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--dll-line);
    color: #344054;
}

.dll-table-column-row {
    display: grid;
    grid-template-columns: 28px max-content max-content;
    align-items: center;
    gap: 6px;
    min-height: 30px;
}

.dll-table-column-label {
    color: #52637a;
    font-size: 12px;
    font-weight: 600;
    text-align: right;
}

.dll-table-row-actions {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.dll-line {
    overflow: visible;
}

.dll-line-content {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.dll-line-content svg {
    display: block;
    width: 100%;
    height: 100%;
}

.dll-text {
    display: flex;
    align-items: center;
    padding: 0;
    overflow: visible;
    line-height: 1.15;
}

.dll-text-content {
    width: 100%;
    height: 100%;
    min-width: 0;
    overflow: hidden;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    pointer-events: none;
}

.dll-text.is-editing-text {
    cursor: text;
}

.dll-text.is-editing-text .dll-text-content {
    outline: none;
    pointer-events: auto;
    user-select: text;
    cursor: text;
}

.dll-barcode {
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    padding: 2px;
}

.dll-barcode-content {
    width: 100%;
    height: 100%;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.dll-barcode-symbol {
    display: block;
    width: 100%;
    min-height: 0;
    flex: 1 1 auto;
    fill: currentColor;
}

.dll-barcode-bars {
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    background: repeating-linear-gradient(90deg, currentColor 0 2px, transparent 2px 4px, currentColor 4px 5px, transparent 5px 8px);
}

.dll-barcode-matrix {
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    background-color: transparent;
    background-image:
        linear-gradient(90deg, currentColor 25%, transparent 25% 50%, currentColor 50% 75%, transparent 75%),
        linear-gradient(currentColor 25%, transparent 25% 50%, currentColor 50% 75%, transparent 75%);
    background-size: 10px 10px;
    border: 2px solid currentColor;
    box-sizing: border-box;
}

.dll-barcode-design-text {
    flex: 0 0 auto;
    line-height: 1.15;
    min-height: 1.15em;
    overflow: hidden;
    text-align: center;
    white-space: nowrap;
}

.dll-image {
    display: block;
}

.dll-image-content {
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    pointer-events: none;
}

.dll-image-content img {
    display: block;
    width: 100%;
    height: 100%;
}

.dll-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    color: #64748b;
    background: transparent;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
}

.dll-handle {
    position: absolute;
    z-index: 10;
    width: 7px;
    height: 7px;
    background: #ffffff;
    border: 1px solid var(--dll-select);
    pointer-events: auto;
}

.dll-handle-nw { left: -4px; top: -4px; cursor: nwse-resize; }
.dll-handle-n { left: 50%; top: -4px; transform: translateX(-50%); cursor: ns-resize; }
.dll-handle-ne { right: -4px; top: -4px; cursor: nesw-resize; }
.dll-handle-w { left: -4px; top: 50%; transform: translateY(-50%); cursor: ew-resize; }
.dll-handle-e { right: -4px; top: 50%; transform: translateY(-50%); cursor: ew-resize; }
.dll-handle-sw { left: -4px; bottom: -4px; cursor: nesw-resize; }
.dll-handle-s { left: 50%; bottom: -4px; transform: translateX(-50%); cursor: ns-resize; }
.dll-handle-se { right: -4px; bottom: -4px; cursor: nwse-resize; }

.dll-group-selection-box {
    position: absolute;
    z-index: 100000;
    border: 1px dotted #0b5ed7;
    pointer-events: none;
}

.dll-group-edge,
.dll-group-handle {
    position: absolute;
    pointer-events: auto;
}

.dll-group-edge-n,
.dll-group-edge-s {
    left: 0;
    right: 0;
    height: 5px;
    cursor: move;
}

.dll-group-edge-n { top: -3px; }
.dll-group-edge-s { bottom: -3px; }

.dll-group-edge-e,
.dll-group-edge-w {
    top: 0;
    bottom: 0;
    width: 5px;
    cursor: move;
}

.dll-group-edge-e { right: -3px; }
.dll-group-edge-w { left: -3px; }

.dll-group-handle {
    z-index: 100001;
    width: 8px;
    height: 8px;
    background: #ffffff;
    border: 1px solid #0b5ed7;
}

.dll-group-handle-nw { left: -5px; top: -5px; cursor: nwse-resize; }
.dll-group-handle-n { left: 50%; top: -5px; transform: translateX(-50%); cursor: ns-resize; }
.dll-group-handle-ne { right: -5px; top: -5px; cursor: nesw-resize; }
.dll-group-handle-w { left: -5px; top: 50%; transform: translateY(-50%); cursor: ew-resize; }
.dll-group-handle-e { right: -5px; top: 50%; transform: translateY(-50%); cursor: ew-resize; }
.dll-group-handle-sw { left: -5px; bottom: -5px; cursor: nesw-resize; }
.dll-group-handle-s { left: 50%; bottom: -5px; transform: translateX(-50%); cursor: ns-resize; }
.dll-group-handle-se { right: -5px; bottom: -5px; cursor: nwse-resize; }

.dll-rubber-band {
    position: absolute;
    z-index: 99999;
    background: rgba(13, 110, 253, 0.12);
    border: 1px dotted rgba(13, 110, 253, 0.9);
    pointer-events: none;
}

.dll-rubber-band.is-insertion {
    background: rgba(13, 110, 253, 0.08);
    border: 1px dashed rgba(13, 110, 253, 0.95);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.8) inset;
}

.dll-json-panel {
    grid-row: 4;
    display: flex;
    flex-direction: column;
    height: 240px;
    min-height: 120px;
    max-height: calc(100vh - 142px);
    overflow: hidden;
    background: #111827;
    color: #e5e7eb;
}

.dll-json-resize-handle {
    position: relative;
    flex: 0 0 8px;
    min-height: 8px;
    cursor: ns-resize;
    touch-action: none;
    background: var(--dll-panel);
}

.dll-json-resize-handle::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 2px;
    width: 42px;
    height: 3px;
    transform: translateX(-50%);
    background: #a8b1bf;
    border-radius: 999px;
}

.dll-json-resize-handle:hover::after,
.dll-json-resize-handle:focus-visible::after,
.dll-json-resize-handle.is-resizing::after {
    background: var(--dll-select);
}

.dll-json-resize-handle:focus-visible {
    outline: 2px solid rgba(13, 110, 253, 0.35);
    outline-offset: -2px;
}

body.dll-json-resizing {
    cursor: ns-resize;
    user-select: none;
}

.dll-json-header {
    flex: 0 0 38px;
    min-height: 38px;
    padding: 4px 10px;
    color: var(--dll-text);
}

.dll-json-output {
    flex: 1 1 auto;
    min-height: 0;
    margin: 0;
    padding: 10px;
    overflow: auto;
    scrollbar-gutter: stable;
    font-size: 12px;
    color: #d1d5db;
}

.dll-statusbar {
    grid-row: 5;
    justify-content: flex-start;
    gap: 0;
    min-width: 0;
    overflow: hidden;
    padding: 0 10px;
    color: var(--dll-muted);
    font-size: 12px;
    white-space: nowrap;
}

.dll-status-zone {
    display: flex;
    align-items: center;
    min-width: 0;
    height: 100%;
    gap: 4px;
    padding: 0 10px;
    overflow: hidden;
    border-left: 1px solid var(--dll-line);
}

.dll-status-zone:first-child {
    padding-left: 0;
    border-left: 0;
}

.dll-status-zone strong {
    flex: 0 0 auto;
    color: var(--dll-text);
    font-weight: 700;
}

.dll-status-value {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dll-status-document {
    flex: 1.2 1 700px;
}

.dll-status-mouse {
    flex: 0 0 140px;
}

.dll-status-name {
    flex: 0 1 220px;
}

.dll-status-selection {
    flex: 1 1 600px;
}

.dll-save-toast {
    position: fixed;
    z-index: 2100;
    top: 52px;
    left: 50%;
    transform: translate(-50%, -6px);
    padding: 6px 14px;
    color: #ffffff;
    background: rgba(31, 41, 51, 0.94);
    border-radius: 4px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.18);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.25;
    pointer-events: none;
    opacity: 0;
    transition: opacity 120ms ease, transform 120ms ease;
}

.dll-save-toast.is-visible {
    transform: translate(-50%, 0);
    opacity: 1;
}

.dll-view-mode-tabs {
    position: absolute;
    z-index: 6;
    left: 72px;
    right: 0;
    bottom: 0;
    height: 30px;
    display: flex;
    align-items: flex-end;
    gap: 2px;
    padding: 0 10px;
    background: var(--dll-panel);
    border-top: 1px solid var(--dll-line);
}

.dll-view-mode-tab {
    height: 25px;
    padding: 3px 14px;
    border: 1px solid var(--dll-line);
    border-bottom: 0;
    border-radius: 4px 4px 0 0;
    background: #eef2f7;
    color: #52637a;
    font-size: 12px;
}

.dll-view-mode-tab.active {
    background: #ffffff;
    color: var(--dll-text);
    font-weight: 700;
}

.dll-context-menu {
    position: fixed;
    z-index: 1000;
    min-width: 168px;
    padding: 4px;
    background: #ffffff;
    border: 1px solid #aeb6c2;
    box-shadow: 0 8px 22px rgba(24, 34, 45, 0.22);
    font-size: 12px;
    user-select: none;
}

.dll-context-menu-item {
    display: block;
    width: 100%;
    padding: 6px 10px;
    color: var(--dll-text);
    background: transparent;
    border: 0;
    border-radius: 3px;
    line-height: 1.2;
    text-align: left;
}

.dll-context-menu-item:hover,
.dll-context-menu-item:focus {
    color: #ffffff;
    background: var(--dll-select);
    outline: none;
}

.dll-context-menu-item:disabled {
    color: #9aa3af;
    background: transparent;
    cursor: default;
}

.dll-context-menu-separator {
    display: block;
    height: 1px;
    margin: 4px 2px;
    background: #d7dce3;
}

@media (max-width: 820px) {
    .dll-main {
        grid-template-columns: 300px 1fr;
    }

    .dll-toolbar {
        overflow-x: auto;
    }
}

.dll-designer-help-overlay {
    position: fixed;
    z-index: 100100;
    inset: 0;
    background: #ffffff;
}

.dll-designer-help-frame {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}
