.waybill-template-workspace{display:grid;grid-template-columns:minmax(270px,330px) minmax(0,1fr);gap:18px;align-items:start}.waybill-template-list,.waybill-template-card{background:#fff;border:1px solid #dbe5ef;border-radius:16px;box-shadow:0 10px 30px rgba(25,58,91,.05)}.waybill-template-list{padding:14px;position:sticky;top:16px;max-height:calc(100vh - 130px);overflow:auto}.waybill-template-list-head,.wt-card-title,.waybill-field-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start}.waybill-template-list-head h2,.waybill-field-head h3{margin:0}.waybill-template-list-head p,.waybill-field-head p,.wt-card-title p{margin:4px 0 0;color:#7b8da0}.waybill-template-list>h3{font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:#7b8da0;margin:20px 6px 8px}.waybill-template-item{display:flex!important;flex-direction:column;align-items:flex-start!important;width:100%;padding:12px!important;border:1px solid transparent!important;border-radius:12px!important;background:transparent!important;color:#17324d!important;text-align:left;gap:4px;margin-bottom:5px}.waybill-template-item:hover{background:#f5f9fd!important}.waybill-template-item.active{background:#eaf4ff!important;border-color:#95c4ef!important}.waybill-template-item b{line-height:1.3}.waybill-template-item small,.waybill-assigned-master small{color:#7b8da0}.wt-kind{display:inline-flex;border-radius:999px;padding:4px 8px;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.05em}.wt-kind.original{background:#eef1f4;color:#52677b}.wt-kind.master{background:#e9e1ff;color:#6744a8}.wt-kind.copy{background:#eef5fb;color:#41698e}.wt-kind.active{background:#dcf6e8;color:#18794e}.waybill-template-card{padding:22px;overflow:hidden}.wt-card-title{padding-bottom:18px;border-bottom:1px solid #e2eaf2}.wt-card-title h2{margin:8px 0 0}.wt-actions,.wt-row-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.wt-protected-note,.wt-rule-note{display:flex;flex-direction:column;gap:4px;background:#eef7ff;border:1px solid #cfe5f7;border-radius:12px;padding:14px;margin:18px 0;color:#34566f}.wt-settings,.wt-tenant-settings,.wt-assign{border-bottom:1px solid #e2eaf2;padding:18px 0;margin-bottom:18px}.wt-settings{display:grid;grid-template-columns:minmax(260px,1fr) auto auto;gap:14px;align-items:end}.wt-settings label,.wt-tenant-settings label{display:flex;flex-direction:column;gap:6px}.wt-settings label>span,.wt-tenant-settings label>span{font-size:11px;font-weight:800;text-transform:uppercase;color:#61758a}.wt-settings input,.wt-tenant-settings input,.wt-tenant-settings select{min-height:42px;border:1px solid #cedbea;border-radius:10px;padding:9px 11px;background:#fff}.wt-tenant-settings select[multiple]{min-height:126px}.wt-settings .checkbox,.wt-tenant-settings .checkbox{flex-direction:row;align-items:center}.wt-settings .checkbox input,.wt-tenant-settings .checkbox input{min-height:0}.wt-assign h3{margin:0}.wt-assign p{color:#6d8296}.wt-tenant-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:8px;margin:14px 0}.wt-tenant-grid label{display:flex;align-items:center;gap:8px;border:1px solid #dce6ef;border-radius:9px;padding:9px}.waybill-field-head{margin:20px 0 12px}.waybill-field-table{overflow:auto;border:1px solid #dce6ef;border-radius:12px}.waybill-field-table table{width:100%;border-collapse:collapse}.waybill-field-table th,.waybill-field-table td{padding:11px;border-bottom:1px solid #e5edf4;text-align:left;vertical-align:top}.waybill-field-table th{font-size:10px;text-transform:uppercase;color:#6f8295;background:#f7f9fc}.waybill-field-table td small{display:block;color:#7b8da0;margin-top:4px}.wt-print-state{display:inline-flex;border-radius:999px;padding:4px 7px;background:#eef1f4;color:#6c7885;font-size:10px}.wt-print-state.enabled{background:#dcf6e8;color:#18794e}.danger-link{color:#be3b3b!important}.wt-danger-zone{margin-top:18px;padding-top:18px;border-top:1px solid #f0d6d6}.danger-button{border:1px solid #e7b8b8;background:#fff4f4;color:#b62f2f;border-radius:10px;padding:10px 14px;font-weight:700}.waybill-assigned-master{display:flex;flex-direction:column;padding:10px;border-bottom:1px solid #e4ebf2}.wt-empty-list{padding:14px;color:#7b8da0;background:#f7f9fc;border-radius:10px}.waybill-template-overlay{padding:2.5vh}.waybill-field-modal,.waybill-preview-modal{width:min(1180px,95vw);height:min(95vh,940px);display:flex;flex-direction:column}.waybill-field-modal .form-body,.waybill-preview-scroll{overflow:auto}.waybill-page-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:14px}.waybill-page-grid article{border:1px solid #dce6ef;border-radius:12px;padding:14px}.waybill-page-grid h3{margin:0}.waybill-page-grid p{color:#7b8da0}.waybill-page-grid label{display:flex;flex-direction:column;gap:5px;margin-top:10px}.waybill-algorithms{border:1px solid #dce6ef;border-radius:12px;padding:12px}.waybill-algorithms label{display:inline-flex!important;flex-direction:row!important;align-items:center;gap:6px;margin:4px}.waybill-preview-scroll{background:#cbd4dc;padding:18px;display:flex;flex-direction:column;gap:18px}.waybill-preview-sheet{width:min(100%,1100px);aspect-ratio:1.414/1;background:#fff;margin:auto;position:relative;box-shadow:0 8px 30px rgba(0,0,0,.15);overflow:hidden}.waybill-preview-sheet>img{position:absolute;inset:0;width:100%;height:100%;object-fit:fill}.waybill-preview-cell{position:absolute;z-index:2;overflow:hidden;line-height:1.1;color:#111}.waybill-restore-list{display:grid;gap:8px}.waybill-restore-list button{display:flex;flex-direction:column;align-items:flex-start;padding:12px;border:1px solid #dce6ef;border-radius:10px;background:#fff}.waybill-restore-list span{font-size:12px;color:#74879a}.wt-tenant-settings>.editor-grid{margin-bottom:14px}.wt-tenant-settings .wide{grid-column:1/-1}.wt-rule-note{margin:0 0 14px}
.waybill-template-overlay .modal-head h2{margin:5px 0;font-size:19px;line-height:1.25}
.waybill-template-overlay .modal-head p{margin:0;color:#7e8b99;font-size:10px}
.waybill-template-overlay .modal-head .eyebrow{font-size:9px}
.wt-template-create-modal .form-body{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:0 15px;padding:23px 27px}
.wt-template-create-modal .form-body>label,.waybill-field-modal .editor-grid>label{display:block;min-width:0;margin-bottom:17px}
.wt-template-create-modal .form-body label>span,.waybill-field-modal .editor-grid label>span{display:block;margin-bottom:7px;color:#536475;font-size:9px;font-weight:800;letter-spacing:.5px;text-transform:uppercase}
.wt-template-create-modal input,.wt-template-create-modal select,.waybill-field-modal input,.waybill-field-modal select,.waybill-field-modal textarea{box-sizing:border-box;width:100%;height:43px;border:1px solid #dfe4ea;border-radius:9px;padding:0 11px;background:#fff;color:#324557;font:inherit;font-size:11px;outline:0}
.waybill-field-modal textarea{min-height:96px;padding:11px;resize:vertical}
.wt-template-create-modal input:focus,.wt-template-create-modal select:focus,.waybill-field-modal input:focus,.waybill-field-modal select:focus,.waybill-field-modal textarea:focus{border-color:#72a4d0;box-shadow:0 0 0 3px #eaf3fb}
.wt-popup-select{position:relative;width:100%}
.wt-template-create-modal .wt-popup-select-native{position:absolute!important;width:1px!important;height:1px!important;margin:0!important;padding:0!important;opacity:0!important;pointer-events:none!important}
.wt-popup-select-trigger{position:relative;width:100%;height:43px;padding:0 38px 0 12px;border:1px solid #dfe4ea;border-radius:9px;background:#fff;color:#324557;font:inherit;font-size:11px;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}
.wt-popup-select-trigger:after{content:'';position:absolute;right:16px;top:15px;width:8px;height:8px;border-right:2px solid #557087;border-bottom:2px solid #557087;transform:rotate(45deg)}
.wt-popup-select-trigger:focus{border-color:#72a4d0;box-shadow:0 0 0 3px #eaf3fb;outline:0}
.wt-popup-select-menu{position:fixed;z-index:10050;display:none;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;padding:5px;border:1px solid #cfdce8;border-radius:10px;background:#fff;box-shadow:0 14px 34px rgba(19,48,75,.24);scrollbar-gutter:stable}
.wt-popup-select-menu.open{display:block}
.wt-popup-select-option{display:block;width:100%;min-height:37px;padding:8px 10px;border:0;border-radius:7px;background:#fff;color:#324557;font:inherit;font-size:11px;text-align:left;white-space:normal;cursor:pointer}
.wt-popup-select-option:hover,.wt-popup-select-option:focus{background:#edf5fb;outline:0}
.wt-popup-select-option.selected{background:#2f7dbd;color:#fff;font-weight:700}
.wt-popup-select-option:disabled{opacity:.45;cursor:not-allowed}
.wt-template-create-modal .error{grid-column:1/-1}
.waybill-field-modal .form-body{padding:23px 27px}
.waybill-field-modal .editor-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:0 15px}
.waybill-field-modal .editor-grid>label{grid-column:span 3}
.waybill-field-modal .editor-grid .wide{grid-column:1/-1}
.waybill-field-modal .editor-grid>label.wt-source-third{grid-column:span 2!important}
.waybill-field-modal .editor-grid label.checkbox{display:flex;align-items:center;gap:8px}
.waybill-field-modal .editor-grid label.checkbox input{flex:0 0 auto;width:16px;height:16px}
.waybill-field-modal .editor-grid label.checkbox span{margin:0}
.waybill-field-modal .wt-cell-range-picker{grid-column:1/-1;margin:0 0 17px;padding:14px;border:1px solid #cfe0ee;border-radius:13px;background:#f6faff;min-width:0}
.waybill-field-modal .wt-cell-range-picker>legend{padding:0 7px;color:#536475;font-size:9px;font-weight:800;letter-spacing:.5px;text-transform:uppercase}
.waybill-field-modal .wt-cell-range-picker>legend>span{vertical-align:middle}
.waybill-field-modal .wt-cell-range-picker>legend>strong{display:inline-flex;vertical-align:middle;margin-left:8px;padding:4px 9px;border-radius:7px;background:#2f7dbd;color:#fff;font-size:11px;letter-spacing:.04em}
.wt-range-picker-body{display:grid;grid-template-columns:minmax(0,1fr) 34px minmax(0,1fr);gap:10px;align-items:center}
.wt-coordinate-side{min-width:0;padding:11px;border:1px solid #d6e4f0;border-radius:11px;background:#fff}
.wt-coordinate-controls{display:grid;grid-template-columns:repeat(3,minmax(58px,.7fr)) minmax(90px,1.25fr);gap:7px;align-items:end}
.waybill-field-modal .wt-coordinate-controls label{display:block;min-width:0;margin:0}
.waybill-field-modal .wt-coordinate-controls label>span{margin:0 0 5px;font-size:8px;white-space:nowrap}
.waybill-field-modal .wt-coordinate-controls select,.waybill-field-modal .wt-coordinate-controls input[data-coordinate-row]{box-sizing:border-box;width:100%;height:39px;padding:0 25px 0 9px;border:1px solid #bcd3e7;border-radius:8px;background-color:#f4f9fd;color:#1c5f96;font:800 11px Inter,Arial,sans-serif;text-align:center}
.waybill-field-modal .wt-coordinate-controls select{cursor:pointer}
.waybill-field-modal .wt-coordinate-controls select.has-selection,.waybill-field-modal .wt-coordinate-controls input[data-coordinate-row].has-selection{border-color:#78aad4;background-color:#e8f4ff;box-shadow:inset 0 0 0 1px rgba(45,124,188,.08)}
.waybill-field-modal .wt-coordinate-controls select:disabled{border-color:#e1e7ec;background:#f1f3f5;color:#a6b0b8;cursor:not-allowed}
.waybill-field-modal .wt-coordinate-controls select option:checked{background:#2f7dbd;color:#fff;font-weight:800}
.wt-range-picker-arrow{display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:#2f7dbd;color:#fff;font-size:18px;font-weight:900;box-shadow:0 4px 12px rgba(47,125,189,.22)}
.wt-template-create-modal .modal-foot button,.waybill-field-modal .modal-foot button{min-height:41px;font-size:12px}
@media(max-width:860px){.wt-range-picker-body{grid-template-columns:1fr}.wt-range-picker-arrow{margin:auto;transform:rotate(90deg)}}
@media(max-width:640px){.wt-template-create-modal .form-body,.waybill-field-modal .editor-grid{grid-template-columns:1fr}.wt-coordinate-controls{grid-template-columns:repeat(3,minmax(50px,1fr));}.wt-coordinate-row{grid-column:1/-1}}
.waybill-preview-sheet.portrait{width:min(72%,780px);aspect-ratio:1/1.414}
.wt-nudge-control{display:grid;grid-template-columns:38px minmax(0,1fr) 38px;gap:6px;align-items:center}.wt-nudge-control input{width:100%;min-width:0}.wt-nudge-control button{height:42px;border:1px solid #cedbea;border-radius:9px;background:#f5f9fd;color:#245b89;font-size:17px;font-weight:800}.wt-nudge-control button:hover{background:#e5f1fb}.wt-page-reset,.wt-field-offset-reset{width:100%;margin-top:10px}.wt-field-offset-reset{align-self:end;min-height:42px}
@media(max-width:1000px){.waybill-template-workspace{grid-template-columns:1fr}.waybill-template-list{position:static;max-height:none}.wt-settings{grid-template-columns:1fr}.wt-card-title,.waybill-field-head{flex-direction:column}.wt-actions{justify-content:flex-start}.waybill-field-table{overflow-x:auto}.waybill-field-table table{min-width:850px}}
@media(max-width:640px){.waybill-template-card{padding:14px}.waybill-template-list-head{flex-direction:column}.waybill-template-overlay{padding:0}.waybill-field-modal,.waybill-preview-modal{width:100vw;height:100vh;max-height:none;border-radius:0}.waybill-preview-scroll{padding:6px}.waybill-preview-sheet{width:100%}}

/* Page scale and offsets are applied to the complete printable canvas. */
.waybill-preview-canvas{position:absolute;inset:0;width:100%;height:100%;transform-origin:0 0}.waybill-preview-canvas>img{position:absolute;inset:0;width:100%;height:100%;object-fit:fill}.waybill-preview-settings{position:absolute;right:10px;bottom:10px;z-index:3;padding:5px 8px;border-radius:8px;background:rgba(17,48,74,.82);color:#fff;font-size:10px;font-weight:800;box-shadow:0 3px 9px rgba(13,42,68,.18)}
.waybill-page-grid article{display:grid;grid-template-columns:minmax(250px,1.25fr) minmax(220px,.75fr);gap:20px;align-items:start}.wt-page-preview{position:relative;overflow:hidden;width:100%;aspect-ratio:1.414/1;border:1px solid #cfdae5;border-radius:12px;background:#dfe6ec;box-shadow:inset 0 0 0 8px #edf2f6}.wt-page-preview.portrait{aspect-ratio:1/1.414}.wt-page-preview-canvas{position:absolute;inset:0;width:100%;height:100%;transform-origin:0 0;background:#fff}.wt-page-preview-canvas img{width:100%;height:100%;object-fit:fill}.wt-page-preview>span{position:absolute;right:8px;bottom:8px;padding:4px 7px;border-radius:7px;background:rgba(18,50,77,.82);color:#fff;font-size:9px;font-weight:800}.wt-page-controls{min-width:0}.wt-page-controls>h3{margin-top:0}.wt-company-settings-note{display:flex;align-items:flex-start;gap:12px;margin:18px 0;padding:14px 16px;border:1px solid #cfe1f2;border-radius:12px;background:#f2f8fd;color:#315c81}.wt-company-settings-note:before{content:'↗';display:grid;place-items:center;flex:0 0 28px;width:28px;height:28px;border-radius:8px;background:#dceefa;color:#1f6ca6;font-weight:900}.wt-company-settings-note b,.wt-company-settings-note span{display:block}.wt-company-settings-note span{margin-top:3px;font-size:11px;line-height:1.45}.waybill-template-list>.empty{margin:12px 8px;padding:16px;text-align:left;line-height:1.45}
@media(max-width:800px){.waybill-page-grid article{grid-template-columns:1fr}.wt-page-preview{max-width:560px}}

/* Page setup needs substantially more room than an ordinary form modal. */
.waybill-page-modal{width:min(1180px,calc(100vw - 32px));max-width:none;height:auto;max-height:min(940px,calc(100dvh - 24px));display:flex;flex-direction:column;overflow:hidden;container-type:inline-size}
.waybill-page-modal .modal-head,.waybill-page-modal .modal-foot{flex:0 0 auto}
.waybill-page-modal .form-body{min-height:0;overflow:auto;overscroll-behavior:contain}
.waybill-page-modal .waybill-page-grid{grid-template-columns:repeat(auto-fit,minmax(520px,1fr));align-items:start}
.waybill-page-modal .waybill-page-grid article{min-width:0;overflow:hidden}
.waybill-page-modal .wt-page-preview,.waybill-page-modal .wt-page-controls{min-width:0}
@container(max-width:720px){.waybill-page-modal .waybill-page-grid{grid-template-columns:minmax(0,1fr)}.waybill-page-modal .waybill-page-grid article{grid-template-columns:minmax(0,1fr)}.waybill-page-modal .wt-page-preview{max-width:560px}}
@media(max-width:620px){.waybill-page-modal{width:calc(100vw - 12px);height:calc(100dvh - 12px);max-height:none}.waybill-page-modal .waybill-page-grid{grid-template-columns:minmax(0,1fr)}.waybill-page-modal .waybill-page-grid article{grid-template-columns:minmax(0,1fr);gap:12px;padding:10px}.waybill-page-modal .modal-foot{flex-wrap:wrap}.waybill-page-modal .modal-foot button{flex:1 1 180px}}

/* Preview is page-by-page and always keeps the printable A4 proportions. */
.waybill-template-overlay{padding:18px;background:#10263eaa;backdrop-filter:none;color:#172537;font-family:Inter,Arial,sans-serif;z-index:20}
.waybill-template-overlay .modal{background:#fff;border-radius:18px;box-shadow:none}
.waybill-template-overlay .modal-head,.waybill-template-overlay .modal-foot{display:flex;align-items:center;justify-content:space-between;flex:0 0 auto;padding:21px 26px;background:#fff}
.waybill-template-overlay .modal-head{border-bottom:1px solid #dfe7ef}
.waybill-template-overlay .modal-head h2{margin:5px 0 0;color:#172537;font-size:24px;line-height:1.2}
.waybill-template-overlay .modal-head p{margin:5px 0 0;color:#7a8da2;font-size:12px}
.waybill-template-overlay .modal-head .icon-button{display:grid;place-items:center;flex:0 0 auto;width:38px;height:38px;padding:0;border:0;border-radius:9px;background:#eef3f7;color:#172537;font-size:14px;cursor:pointer}
.waybill-template-overlay .modal-foot{justify-content:flex-end;gap:10px;border-top:1px solid #dfe7ef}
.waybill-template-overlay .primary,.waybill-template-overlay .secondary{box-sizing:border-box;height:auto;min-height:41px;padding:11px 17px;border-radius:9px;font-size:13px;font-weight:650}
.waybill-template-overlay .primary{border:0;background:#2874ba;color:#fff;box-shadow:0 5px 13px #2874ba2b}
.waybill-template-overlay .secondary{border:1px solid #dfe7ef;background:#fff;color:#38536d;box-shadow:none}
.waybill-preview-modal{width:calc(100vw - 24px);height:calc(100dvh - 24px);max-width:none;max-height:none}
.waybill-preview-modal .modal-head,.waybill-preview-modal .modal-foot{flex:0 0 auto}
.waybill-preview-summary{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:16px 18px 12px;padding:12px 16px;border:1px solid #cfe0ef;border-radius:12px;background:#f2f8fd;color:#385b78}
.waybill-preview-summary span{font-size:12px;color:#73879a}
.waybill-preview-scroll{min-height:0;align-items:center;margin:0 18px;padding:14px;background:#e7edf2;border-radius:16px;overscroll-behavior:contain}
.waybill-preview-sheet{flex:0 0 auto;width:min(100%,1400px);aspect-ratio:1.414/1;margin:0 auto}
.waybill-preview-sheet.portrait{width:min(72%,990px);aspect-ratio:1/1.414}
.waybill-preview-sheet[hidden]{display:none!important}
.waybill-preview-foot{justify-content:space-between;gap:16px}
.waybill-preview-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;margin-left:auto}
.waybill-preview-pagination{display:flex;align-items:center;justify-content:center;gap:10px;min-width:0}
.waybill-preview-pagination strong{min-width:120px;text-align:center;color:#294965}
.waybill-preview-pagination button:disabled{opacity:.45;cursor:not-allowed}
@media(max-width:640px){.waybill-preview-modal{width:100vw;height:100dvh}.waybill-preview-summary{margin:10px 8px 8px;padding:9px 10px}.waybill-preview-scroll{margin:0 8px;padding:8px;border-radius:10px}.waybill-preview-sheet.portrait{width:100%}.waybill-preview-foot{flex-wrap:wrap}.waybill-preview-pagination{width:100%;order:-1}.waybill-preview-pagination button{flex:1 1 120px}.waybill-preview-pagination strong{min-width:auto}}

/* Client template workspace follows the compact company-settings layout. */
.wt-tenant-page-title{align-items:center;margin-bottom:28px}
.wt-tenant-page-title>.primary{min-height:50px;padding:0 24px;border-radius:14px}
.wt-tenant-workspace{grid-template-columns:minmax(300px,338px) minmax(0,1fr);gap:22px;align-items:stretch;height:calc(100dvh - 146px);min-height:0;overflow:hidden}
.platform-shell .wt-tenant-workspace{height:calc(100dvh - 134px)}
.wt-tenant-template-list{display:flex;flex-direction:column;height:100%;max-height:none;padding:0;position:static;overflow:hidden}
.platform-shell .wt-tenant-template-list{height:100%;color:#17324d}
.platform-shell .wt-tenant-template-list h2{color:#172537}
.wt-tenant-template-list .waybill-template-list-head{padding:24px;border-bottom:1px solid #e2eaf2}
.wt-tenant-template-list .waybill-template-list-head p{font-size:12px}
.wt-tenant-template-items{flex:1 1 auto;min-height:0;max-height:none;overflow:auto;overscroll-behavior:contain}
.wt-tenant-template-list .waybill-template-item{position:relative;margin:0;padding:20px 20px!important;border:0!important;border-left:4px solid transparent!important;border-radius:0!important;gap:10px}
.wt-tenant-template-list .waybill-template-item+ .waybill-template-item{border-top:1px solid #e8eef4!important}
.wt-tenant-template-list .waybill-template-item.active{background:#eaf4fb!important;border-left-color:#2f7fc1!important}
.wt-template-item-main{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%}
.wt-template-item-main b{min-width:0}
.wt-platform-master-item .wt-template-item-main{display:block}
.wt-platform-master-item .wt-template-item-main b{display:block;width:100%}
.wt-list-status,.wt-header-status{display:inline-flex;align-items:center;justify-content:center;border-radius:999px;padding:5px 9px;background:#f0f3f6;color:#677b8e;font-size:10px;font-weight:800;white-space:nowrap}
.wt-list-status.active,.wt-header-status.active{background:#e3f5e9;color:#20784d}
.wt-tenant-template-list .waybill-template-item small{font-size:11px}
.wt-tenant-template-list .waybill-template-item em{font-size:10px;font-style:normal;color:#98a6b4}
.wt-tenant-workspace>#wt-detail{min-width:0;min-height:0;height:100%}
.wt-tenant-template-card{display:flex;flex-direction:column;height:100%;min-height:0;padding:0;overflow:hidden}
.wt-tenant-card-title{align-items:stretch;flex-direction:column;gap:18px;padding:24px 28px;border-bottom:1px solid #e2eaf2}
.wt-tenant-card-title h2{margin:8px 0 0;font-size:23px}
.wt-tenant-card-title>div:first-child{width:100%}.wt-tenant-card-title .wt-actions{width:100%;align-items:center;justify-content:flex-start;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:thin;padding-bottom:2px}.wt-tenant-card-title .wt-actions>*{flex:0 0 auto}
.wt-tenant-card-title .wt-actions>button{min-height:44px;padding:9px 14px;border-radius:12px}
.wt-tenant-card-title .danger-button{margin:0}
.wt-tenant-field-head{align-items:center;margin:0;padding:24px 26px 14px}
.wt-tenant-field-head p{font-size:12px}
.wt-tenant-field-table{flex:1 1 auto;min-height:0;border-width:1px 0 0;border-radius:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
.wt-tenant-field-table table{min-width:900px}
.wt-tenant-field-table th{position:sticky;top:0;z-index:2;height:42px;padding:9px 14px;background:#f5f8fb;white-space:nowrap}
.wt-tenant-field-table td{padding:16px 14px;vertical-align:middle}
.wt-tenant-field-table th:first-child,.wt-tenant-field-table td:first-child{width:82px;text-align:center}
.wt-tenant-field-table th:last-child,.wt-tenant-field-table td:last-child{width:92px}
.wt-tenant-field-table input[type=checkbox]{width:20px;height:20px;accent-color:#2d75b7;cursor:pointer}
.wt-tenant-field-table tr.is-disabled td{color:#92a0ad;background:#fbfcfd}
.wt-cell-code{display:inline-flex;margin-bottom:7px;padding:4px 8px;border:1px solid #b9d9f2;border-radius:8px;background:#edf7ff;color:#1765a3;font-weight:800}
.wt-sort-button{float:right;width:30px;height:30px;margin:-6px 0 -6px 8px;padding:0;border:1px solid #d4e1ec;border-radius:7px;background:#eef5fa;color:#6a8194;font-size:14px}
.wt-icon-action{display:grid;place-items:center;width:32px;height:32px;padding:0;border:1px solid #cfe0ee;border-radius:8px;background:#eef7fd;color:#246b9f;font-weight:800}
.wt-icon-action.danger{border-color:#f0caca;background:#fff3f3;color:#c64a4a}
.wt-tenant-settings-modal .editor-grid{padding-bottom:4px}
.wt-platform-assignment-note{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:18px 26px 0;padding:13px 16px;border:1px solid #cfe1f2;border-radius:12px;background:#f2f8fd;color:#315c81}
.wt-platform-assignment-note b{white-space:nowrap}
.wt-platform-assignment-note span{color:#688097;font-size:12px;line-height:1.45;text-align:right}
/* Platform uses the same compact typography scale as the client template workspace. */
.wt-tenant-page-title .eyebrow{font-size:9px}
.wt-tenant-page-title h1{font-size:25px;letter-spacing:-.5px}
.wt-tenant-page-title p{font-size:12px}
.wt-tenant-page-title>.primary{font-size:12px}
.wt-tenant-template-list .waybill-template-list-head h2{font-size:18px}
.wt-tenant-template-list .waybill-template-list-head p{font-size:10px}
.wt-tenant-template-list .waybill-template-item b{font-size:13px;line-height:1.3}
.wt-tenant-template-list .waybill-template-item small{font-size:9px}
.wt-tenant-template-list .waybill-template-item em{font-size:9px}
.wt-tenant-card-title .eyebrow{font-size:9px}
.wt-tenant-card-title h2{font-size:20px;line-height:1.25}
.wt-tenant-card-title p{font-size:11px}
.wt-tenant-card-title .wt-actions>button{font-size:11px}
.wt-header-status{font-size:9px}
.wt-platform-assignment-note b{font-size:12px}
.wt-platform-assignment-note span{font-size:10px}
.wt-tenant-field-head h3{font-size:16px}
.wt-tenant-field-head p{font-size:10px}
.wt-tenant-field-head .wt-row-actions button{font-size:11px}
.wt-tenant-field-table th{font-size:9px}
.wt-tenant-field-table td{font-size:11px}
.wt-tenant-field-table td small{font-size:9px}
.wt-cell-code{font-size:11px}
@media(max-width:1500px){.wt-tenant-card-title{align-items:flex-start;flex-direction:column}.wt-tenant-card-title .wt-actions{justify-content:flex-start;width:100%}}
@media(max-width:800px){.wt-tenant-page-title{align-items:flex-start;flex-direction:column}.wt-tenant-workspace,.platform-shell .wt-tenant-workspace{height:auto;overflow:visible;grid-template-columns:1fr}.wt-tenant-template-list,.platform-shell .wt-tenant-template-list{height:auto;max-height:none}.wt-tenant-template-items{max-height:none}.wt-tenant-template-card{height:auto}.wt-tenant-field-table{max-height:none}.wt-tenant-template-list{position:static}.wt-tenant-field-head{align-items:flex-start}.wt-tenant-field-head .wt-row-actions{justify-content:flex-start}.wt-platform-assignment-note{align-items:flex-start;flex-direction:column;margin:14px}.wt-platform-assignment-note span{text-align:left}}

/* Full-page print setup: one side at a time with an immediate A4 preview. */
.wt-page-editor-modal{width:calc(100vw - 36px);height:calc(100dvh - 36px);max-width:none;max-height:none}
.wt-page-editor-modal .modal-head,.wt-page-editor-modal .modal-foot{flex:0 0 auto}
.wt-page-editor-modal .modal-head{padding:26px 34px 22px}
.wt-page-editor-modal .modal-foot{position:relative;z-index:3;padding:18px 34px;background:#fafbfc}
.wt-page-editor-body{display:flex;min-height:0;overflow:hidden;flex-direction:column;padding:0 34px 24px;overscroll-behavior:contain}
.wt-page-editor-tabs{z-index:5;display:grid;flex:0 0 auto;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:4px;margin:0 0 16px;padding:5px;border:1px solid #cbddea;border-radius:13px;background:#edf4f9}
.wt-page-editor-tabs button{min-height:48px;padding:10px 16px;border:0;border-radius:10px;background:transparent;color:#3c5b77;font-weight:800;cursor:pointer}
.wt-page-editor-tabs button:hover{background:#e3eef7}
.wt-page-editor-tabs button.active{background:#2e78b7;color:#fff;box-shadow:0 7px 16px rgba(33,103,162,.2)}
.wt-page-editor-panel{min-height:0}
.wt-page-editor-panel:not([hidden]){display:flex;flex:1 1 auto;flex-direction:column}
.wt-page-editor-panel[hidden]{display:none!important}
.wt-page-editor-controls{display:grid;grid-template-columns:minmax(330px,1.7fr) minmax(180px,.9fr) minmax(180px,.9fr) auto auto;gap:12px;align-items:end;padding:18px;border:1px solid #d4e3ef;border-radius:14px;background:#f7fafc}
.wt-page-editor-controls label{display:flex;min-width:0;flex-direction:column;gap:7px}
.wt-page-editor-controls label>span{color:#486882;font-size:11px;font-weight:800}
.wt-page-editor-controls input[type=number]{width:100%;height:46px;min-width:0;padding:0 12px;border:1px solid #c8d8e6;border-radius:9px;background:#fff;color:#172b3e;font-size:16px}
.wt-page-scale-control>div{display:grid;grid-template-columns:minmax(180px,1fr) 98px;gap:12px;align-items:center}
.wt-page-scale-control input[type=range]{width:100%;accent-color:#2e78b7}
.wt-page-direction-controls{display:grid;grid-template-columns:repeat(4,46px);gap:6px}
.wt-page-direction-controls button{height:46px;padding:0;border:1px solid #c8dbea;border-radius:10px;background:#fff;color:#37688e;font-size:20px;cursor:pointer}
.wt-page-direction-controls button:hover{background:#eaf4fb;border-color:#97c2e3}
.wt-page-editor-controls .wt-page-reset{width:auto;min-height:46px;margin:0;padding:0 18px;white-space:nowrap}
.wt-page-editor-state{margin:14px 0;color:#6e8498;font-size:12px}
.wt-page-editor-summary{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:16px;padding:13px 16px;border:1px solid #cfe0ef;border-radius:12px;background:#f2f8fd;color:#385b78}
.wt-page-editor-summary span{color:#73879a;font-size:11px}
.wt-page-editor-stage{height:auto;min-height:0;overflow:auto;flex:1 1 auto;padding:14px;border-radius:16px;background:#e7edf2;overscroll-behavior:contain;scrollbar-gutter:stable}
.wt-page-editor-sheet{position:relative;width:min(100%,1400px);aspect-ratio:1.414/1;margin:0 auto;overflow:hidden;background:#fff;box-shadow:0 8px 30px rgba(0,0,0,.14)}
.wt-page-editor-sheet.portrait{width:min(72%,990px);aspect-ratio:1/1.414}
.wt-page-editor-sheet .wt-page-preview-canvas>img{position:absolute;inset:0;width:100%;height:100%;object-fit:fill}
@media(max-width:1160px){.wt-page-editor-controls{grid-template-columns:minmax(280px,1fr) minmax(160px,.6fr) minmax(160px,.6fr)}.wt-page-direction-controls{justify-self:start}.wt-page-editor-controls .wt-page-reset{justify-self:start}}
@media(max-width:760px){.wt-page-editor-modal{width:100vw;height:100dvh;border-radius:0}.wt-page-editor-modal .modal-head{padding:20px 16px 16px}.wt-page-editor-modal .modal-foot{padding:12px 16px;flex-wrap:wrap}.wt-page-editor-modal .modal-foot button{flex:1 1 160px}.wt-page-editor-body{display:block;overflow:auto;padding:0 12px 96px}.wt-page-editor-tabs{grid-template-columns:1fr}.wt-page-editor-controls{grid-template-columns:1fr;padding:13px}.wt-page-scale-control>div{grid-template-columns:minmax(120px,1fr) 88px}.wt-page-direction-controls{grid-template-columns:repeat(4,minmax(44px,1fr));width:100%}.wt-page-editor-controls .wt-page-reset{width:100%}.wt-page-editor-summary{align-items:flex-start;flex-direction:column}.wt-page-editor-stage{height:50vh;min-height:300px;padding:8px}.wt-page-editor-sheet.portrait{width:100%}}

/* Keep the field editor isolated from generic form rules used by client pages. */
.waybill-template-overlay .waybill-field-modal{height:auto;max-height:min(95dvh,940px)}
.waybill-template-overlay .waybill-field-modal .form-body{display:block!important;min-height:0;padding:12px 27px!important;overflow:auto!important}
.waybill-template-overlay .waybill-field-modal .editor-grid{display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr))!important;gap:0 16px!important;align-items:start}
.waybill-template-overlay .waybill-field-modal .editor-grid>.wide{grid-column:1/-1!important}
.waybill-template-overlay .waybill-field-modal .editor-grid>label{display:block!important;min-width:0;margin:0 0 7px!important;color:#536475}
.waybill-template-overlay .waybill-field-modal .editor-grid>[hidden]{display:none!important}
.waybill-template-overlay .waybill-field-modal .editor-grid>label>span{display:block!important;margin:0 0 3px!important;color:#536475;font-size:8px!important;font-weight:800!important;line-height:1.2;letter-spacing:.5px;text-transform:uppercase}
.waybill-template-overlay .waybill-field-modal .editor-grid input:not([type=checkbox]),.waybill-template-overlay .waybill-field-modal .editor-grid select,.waybill-template-overlay .waybill-field-modal .editor-grid textarea{display:block!important;box-sizing:border-box!important;width:100%!important;min-width:0;height:28px!important;margin:0!important;border:1px solid #d8e2eb!important;border-radius:7px!important;padding:0 9px!important;background:#fff!important;color:#263d52!important;font-size:10px!important;line-height:1.25!important;outline:0!important}
.waybill-template-overlay .waybill-field-modal .editor-grid textarea{height:58px!important;padding:7px 9px!important;resize:vertical}
.waybill-template-overlay .waybill-field-modal .editor-grid input:not([type=checkbox]):focus,.waybill-template-overlay .waybill-field-modal .editor-grid select:focus,.waybill-template-overlay .waybill-field-modal .editor-grid textarea:focus{border-color:#72a4d0!important;box-shadow:0 0 0 3px #eaf3fb!important}
.waybill-template-overlay .waybill-field-modal .editor-grid>label.checkbox{display:flex!important;align-items:center!important;gap:6px!important;min-height:22px;margin:0 0 5px!important}
.waybill-template-overlay .waybill-field-modal .editor-grid>label.checkbox>input{display:block!important;flex:0 0 13px!important;width:13px!important;height:13px!important;margin:0!important;accent-color:#2e78b7}
.waybill-template-overlay .waybill-field-modal .editor-grid>label.checkbox>span{display:block!important;margin:0!important;color:#40566b!important;font-size:9px!important;font-weight:700!important;letter-spacing:0!important;text-transform:none!important}
.waybill-template-overlay .waybill-field-modal fieldset.waybill-algorithms{display:block!important;grid-column:1/-1!important;box-sizing:border-box;min-width:0;margin:0 0 7px!important;border:1px solid #d8e2eb!important;border-radius:8px!important;padding:6px 9px 9px!important;background:#f9fbfd}
.waybill-template-overlay .waybill-field-modal fieldset.waybill-algorithms legend{padding:0 5px;color:#536475;font-size:8px;font-weight:800;letter-spacing:.5px;text-transform:uppercase}
.waybill-template-overlay .waybill-field-modal .wt-algorithm-table-wrap{overflow:visible;border:1px solid #d8e2eb;border-radius:7px;background:#fff}.waybill-template-overlay .waybill-field-modal .wt-algorithm-table{width:100%;border-collapse:collapse;table-layout:fixed}.waybill-template-overlay .waybill-field-modal .wt-algorithm-table th,.waybill-template-overlay .waybill-field-modal .wt-algorithm-table td{padding:6px 8px;border:0;text-align:left;vertical-align:middle}.waybill-template-overlay .waybill-field-modal .wt-algorithm-table thead th{background:#eef4f8;color:#60758a;font-size:8px;font-weight:800;letter-spacing:.35px;text-transform:uppercase}.waybill-template-overlay .waybill-field-modal .wt-algorithm-table thead th:first-child,.waybill-template-overlay .waybill-field-modal .wt-algorithm-table tbody th{width:92px}.waybill-template-overlay .waybill-field-modal .wt-algorithm-table tbody th{border-top:1px solid #e3eaf0;background:#f8fafc;color:#40566b;font-size:9px}.waybill-template-overlay .waybill-field-modal .wt-algorithm-table tbody td{border-top:1px solid #e3eaf0}.waybill-template-overlay .waybill-field-modal .wt-algorithm-table tr[hidden]{display:none!important}.waybill-template-overlay .waybill-field-modal .wt-algorithm-options{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));align-items:stretch;gap:2px 0;min-width:0}.waybill-template-overlay .waybill-field-modal fieldset.waybill-algorithms label{display:flex!important;align-items:center!important;gap:5px!important;min-width:0;min-height:24px;margin:0!important;padding:2px 7px;color:#40566b;font-size:9px;line-height:1.2;white-space:normal;overflow-wrap:anywhere}
.waybill-template-overlay .waybill-field-modal fieldset.waybill-algorithms input{width:13px!important;height:13px!important;margin:0!important;accent-color:#2e78b7}
.waybill-template-overlay .waybill-field-modal .wt-nudge-control{display:grid!important;grid-template-columns:28px minmax(0,1fr) 28px!important;gap:5px!important;align-items:center!important}
.waybill-template-overlay .waybill-field-modal .wt-nudge-control button{box-sizing:border-box;width:28px;height:28px;margin:0;border:1px solid #c8dbea;border-radius:7px;background:#f5f9fd;color:#245b89;font-size:14px;font-weight:800}
.waybill-template-overlay .waybill-field-modal .wt-field-offset-reset{grid-column:1/-1!important;width:100%!important;min-height:28px;margin:0 0 7px!important;border:1px solid #d1dfeb;border-radius:7px;background:#fff;color:#405b73;font-size:9px;font-weight:800}
.waybill-template-overlay .waybill-field-modal .editor-grid>.wt-format-source{display:none!important}
.waybill-template-overlay .waybill-field-modal .editor-grid>label.checkbox.wt-format-source{display:none!important}
.waybill-template-overlay .waybill-field-modal fieldset.wt-text-format-toolbar{display:flex!important;grid-column:1/-1!important;align-items:center;gap:9px;box-sizing:border-box;min-width:0;margin:2px 0 7px!important;border:1px solid #d8e5ee!important;border-radius:10px!important;padding:8px 12px 10px!important;background:#f7fafc}
.waybill-template-overlay .waybill-field-modal fieldset.wt-text-format-toolbar legend{padding:0 5px;color:#536b80;font-size:8px;font-weight:800;letter-spacing:.35px;text-transform:uppercase}
.waybill-template-overlay .waybill-field-modal .wt-format-group{display:flex;align-items:center;gap:5px}
.waybill-template-overlay .waybill-field-modal .wt-text-format-toolbar button{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:36px;height:34px;margin:0;border:1px solid #cbdce9;border-radius:8px;background:#fff;color:#385b77;font-size:15px;font-weight:700;line-height:1;cursor:pointer}
.waybill-template-overlay .waybill-field-modal .wt-text-format-toolbar button:hover{border-color:#8ebadd;background:#edf6fc}
.waybill-template-overlay .waybill-field-modal .wt-text-format-toolbar button.active{border-color:#2e78b7;background:#2e78b7;color:#fff;box-shadow:0 4px 10px rgba(46,120,183,.18)}
.waybill-template-overlay .waybill-field-modal .wt-format-divider{width:1px;height:30px;background:#d7e2eb}
.waybill-template-overlay .waybill-field-modal .wt-text-format-toolbar button.wt-format-position{width:94px;padding:0 10px;background:#2e78b7;color:#fff;font-size:11px;font-weight:800;white-space:nowrap}
.waybill-template-overlay .waybill-field-modal .wt-format-size{display:flex!important;align-items:center!important;gap:7px!important;margin:0!important;color:#536b80!important}
.waybill-template-overlay .waybill-field-modal .wt-format-size>span{display:block!important;margin:0!important;color:#536b80!important;font-size:8px!important;font-weight:800!important;letter-spacing:.35px;text-transform:uppercase}
.waybill-template-overlay .waybill-field-modal .wt-format-size>input{box-sizing:border-box!important;width:62px!important;height:34px!important;margin:0!important;border:1px solid #cbdce9!important;border-radius:8px!important;padding:0 8px!important;background:#fff!important;color:#263d52!important;font-size:11px!important;text-align:center}
.waybill-template-overlay .waybill-field-modal .modal-foot{flex:0 0 auto;padding:11px 27px}
@media(max-width:900px){.waybill-template-overlay .waybill-field-modal fieldset.wt-text-format-toolbar{flex-wrap:wrap}.waybill-template-overlay .waybill-field-modal .wt-format-divider{display:none}}
@media(max-width:700px){.waybill-template-overlay .waybill-field-modal{width:100vw;height:100dvh;max-height:none;border-radius:0}.waybill-template-overlay .waybill-field-modal .form-body{padding:12px 16px!important}.waybill-template-overlay .waybill-field-modal .editor-grid{grid-template-columns:1fr!important}.waybill-template-overlay .waybill-field-modal .editor-grid>*{grid-column:1!important}.waybill-template-overlay .waybill-field-modal fieldset.waybill-algorithms{grid-column:1!important}.waybill-template-overlay .waybill-field-modal fieldset.wt-text-format-toolbar{grid-column:1!important}.waybill-template-overlay .waybill-field-modal .wt-field-offset-reset{grid-column:1!important}.waybill-template-overlay .waybill-field-modal .modal-foot{padding:10px 16px}}

/* Interactive unsaved field preview. */
.waybill-template-overlay .waybill-preview-cell{display:flex;box-sizing:border-box}
.waybill-template-overlay .waybill-preview-cell.is-editing{z-index:4;outline:2px solid #2e78b7;outline-offset:2px;background:rgba(225,242,255,.36);box-shadow:0 0 0 5px rgba(46,120,183,.14)}
.waybill-template-overlay .waybill-preview-cell.is-editing.is-empty{background:rgba(225,242,255,.52)}
.waybill-template-overlay .waybill-preview-cell.is-editing.is-empty:after{content:"";position:absolute;inset:0;box-sizing:border-box;border:1px dashed #1f6fae;pointer-events:none}
.waybill-template-overlay .wt-draft-preview-tools{display:grid;grid-template-columns:minmax(0,1fr);align-items:center;flex:0 0 auto;margin:10px 18px 0;padding:10px 14px;border:1px solid #cfe0ef;border-radius:12px;background:#f2f8fd}
.waybill-template-overlay .wt-draft-preview-tools .wt-cell-range-picker{box-sizing:border-box;width:100%;min-width:0;margin:0 0 8px;padding:7px 10px 9px;border:1px solid #c6dbea;border-radius:10px;background:#fff}
.waybill-template-overlay .wt-draft-preview-tools .wt-cell-range-picker>legend{padding:0 6px;color:#536475;font-size:8px;font-weight:800;letter-spacing:.45px;text-transform:uppercase}
.waybill-template-overlay .wt-draft-preview-tools .wt-cell-range-picker>legend>strong{display:inline-flex;margin-left:7px;padding:3px 7px;border-radius:6px;background:#2f7dbd;color:#fff;font-size:10px;letter-spacing:.04em}
.waybill-template-overlay .wt-draft-preview-tools .wt-coordinate-side{padding:6px 8px;border-radius:8px}
.waybill-template-overlay .wt-draft-preview-tools .wt-coordinate-controls{gap:6px}
.waybill-template-overlay .wt-draft-preview-tools .wt-coordinate-controls label{display:block;min-width:0;margin:0}
.waybill-template-overlay .wt-draft-preview-tools .wt-coordinate-controls label>span{display:block;margin:0 0 3px;color:#536475;font-size:7px;font-weight:800;letter-spacing:.35px;text-transform:uppercase;white-space:nowrap}
.waybill-template-overlay .wt-draft-preview-tools .wt-coordinate-controls select,.waybill-template-overlay .wt-draft-preview-tools .wt-coordinate-controls input[data-coordinate-row]{box-sizing:border-box;width:100%;height:31px;border:1px solid #9fc3df;border-radius:7px;outline:0;padding:0 7px;background-color:#eaf5fd;color:#1c5f96;font:800 10px Inter,Arial,sans-serif;text-align:center}
.waybill-template-overlay .wt-draft-preview-tools .wt-coordinate-controls select{appearance:none;-webkit-appearance:none;padding-right:23px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%23385b77' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 7px center;background-size:10px 7px;cursor:pointer}
.waybill-template-overlay .wt-draft-preview-tools .wt-coordinate-controls select.has-selection,.waybill-template-overlay .wt-draft-preview-tools .wt-coordinate-controls input[data-coordinate-row].has-selection{border-color:#78aad4;background-color:#e8f4ff;box-shadow:inset 0 0 0 1px rgba(45,124,188,.08)}
.waybill-template-overlay .wt-draft-preview-tools .wt-coordinate-controls select:focus,.waybill-template-overlay .wt-draft-preview-tools .wt-coordinate-controls input[data-coordinate-row]:focus{border-color:#2f7dbd;box-shadow:0 0 0 3px rgba(47,125,189,.15)}
.waybill-template-overlay .wt-draft-preview-tools .wt-coordinate-controls select:disabled{border-color:#dfe5ea;background:#f1f3f5;color:#a6b0b8;cursor:not-allowed}
.waybill-template-overlay .wt-draft-preview-tools .wt-coordinate-controls select option:checked{background:#2f7dbd;color:#fff;font-weight:800}
.waybill-template-overlay .wt-draft-preview-tools .wt-range-picker-arrow{width:30px;height:30px;font-size:15px}
.waybill-template-overlay .wt-draft-preview-tools fieldset.wt-text-format-toolbar{display:flex;align-items:center;justify-content:center;gap:7px;min-width:0;margin:0;border:0;padding:0;background:transparent}
.waybill-template-overlay .wt-draft-preview-tools fieldset.wt-text-format-toolbar legend{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.waybill-template-overlay .wt-draft-preview-tools .wt-format-group{display:flex;align-items:center;gap:4px}
.waybill-template-overlay .wt-draft-preview-tools .wt-text-format-toolbar button{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:38px;height:36px;margin:0;border:1px solid #cbdce9;border-radius:8px;background:#fff;color:#385b77;font-size:15px;font-weight:700;line-height:1;cursor:pointer}
.waybill-template-overlay .wt-draft-preview-tools .wt-text-format-toolbar button:hover{border-color:#8ebadd;background:#edf6fc}
.waybill-template-overlay .wt-draft-preview-tools .wt-text-format-toolbar button.active{border-color:#2e78b7;background:#2e78b7;color:#fff;box-shadow:0 4px 10px rgba(46,120,183,.18)}
.waybill-template-overlay .wt-draft-preview-tools .wt-format-divider{flex:0 0 1px;width:1px;height:30px;background:#d7e2eb}
.waybill-template-overlay .wt-draft-preview-tools .wt-text-format-toolbar button.wt-format-position{width:94px;padding:0 10px;background:#2e78b7;color:#fff;font-size:11px;font-weight:800;white-space:nowrap}
.waybill-template-overlay .wt-draft-preview-tools .wt-format-size{display:flex;align-items:center;gap:7px;margin:0;color:#536b80}
.waybill-template-overlay .wt-draft-preview-tools .wt-format-size>span{font-size:8px;font-weight:800;letter-spacing:.35px;text-transform:uppercase}
.waybill-template-overlay .wt-draft-preview-tools .wt-format-size>input{box-sizing:border-box;width:62px;height:36px;margin:0;border:1px solid #cbdce9;border-radius:8px;padding:0 8px;background:#fff;color:#263d52;font-size:11px;text-align:center}
.waybill-template-overlay .wt-draft-preview-tools .wt-text-format-toolbar:disabled{opacity:.55;pointer-events:none}
.waybill-template-overlay .wt-preview-refresh-state{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.waybill-template-overlay .wt-draft-preview-modal.is-refreshing .waybill-preview-scroll{opacity:.72}
@media(max-width:1180px){.waybill-template-overlay .wt-draft-preview-tools{grid-template-columns:1fr}.waybill-template-overlay .wt-draft-preview-tools fieldset.wt-text-format-toolbar{flex-wrap:wrap}.waybill-template-overlay .wt-draft-preview-tools .wt-format-divider{display:none}}
@media(max-width:860px){.waybill-template-overlay .wt-draft-preview-tools .wt-range-picker-body{grid-template-columns:1fr}.waybill-template-overlay .wt-draft-preview-tools .wt-range-picker-arrow{margin:auto;transform:rotate(90deg)}}
@media(max-width:640px){.waybill-template-overlay .wt-draft-preview-tools{margin:8px;padding:9px}.waybill-template-overlay .wt-draft-preview-tools .wt-text-format-toolbar button{width:34px;height:34px}.waybill-template-overlay .wt-draft-preview-tools .wt-format-size>input{height:34px}.waybill-template-overlay .wt-draft-preview-tools .wt-coordinate-controls{grid-template-columns:repeat(3,minmax(48px,1fr))}.waybill-template-overlay .wt-draft-preview-tools .wt-coordinate-row{grid-column:1/-1}}

/* Calibrate preview typography to the physical A4 page used by the PDF renderer. */
.waybill-preview-sheet,.wt-page-editor-sheet{container-type:inline-size}
.waybill-template-overlay .waybill-preview-cell{font-family:Arial,"Liberation Sans",sans-serif}

/* Coordinate menus use the same visual language as the rest of the application. */
.waybill-template-overlay .wt-coordinate-select{position:relative;min-width:0}
.waybill-template-overlay .wt-coordinate-native{position:absolute!important;width:1px!important;height:1px!important;margin:0!important;padding:0!important;border:0!important;opacity:0!important;pointer-events:none!important}
.waybill-template-overlay .wt-coordinate-trigger{display:flex;align-items:center;justify-content:space-between;box-sizing:border-box;width:100%;height:39px;margin:0;border:1px solid #d5e0ea;border-radius:11px;padding:0 11px;background:#fff;color:#324557;font:500 11px Inter,Arial,sans-serif;line-height:1;text-align:left;cursor:pointer;outline:0;box-shadow:none}
.waybill-template-overlay .wt-coordinate-trigger i{display:block;flex:0 0 9px;width:9px;height:9px;margin-left:8px;border-right:2px solid #60758a;border-bottom:2px solid #60758a;transform:translateY(-2px) rotate(45deg);transition:transform .15s ease}
.waybill-template-overlay .wt-coordinate-trigger:hover{border-color:#a9bfd2;background:#fbfdff}
.waybill-template-overlay .wt-coordinate-trigger:focus,.waybill-template-overlay .wt-coordinate-select.is-open .wt-coordinate-trigger{border-color:#72a4d0;box-shadow:0 0 0 3px #eaf3fb}
.waybill-template-overlay .wt-coordinate-select.is-open .wt-coordinate-trigger i{transform:translateY(2px) rotate(225deg)}
.waybill-template-overlay .wt-coordinate-trigger:disabled{border-color:#e1e7ec;background:#f3f5f7;color:#a6b0b8;cursor:not-allowed;box-shadow:none}
.waybill-template-overlay .wt-coordinate-trigger:disabled i{border-color:#aeb8c0}
.waybill-template-overlay .wt-coordinate-menu{position:absolute;z-index:80;top:calc(100% + 5px);left:0;right:0;box-sizing:border-box;max-height:224px;overflow-y:auto;padding:5px;border:1px solid #d4e0ea;border-radius:11px;background:#fff;box-shadow:0 12px 28px rgba(31,65,95,.18);scrollbar-width:thin;scrollbar-color:#9ba9b5 transparent}
.waybill-template-overlay .wt-coordinate-menu[hidden]{display:none!important}
.waybill-template-overlay .wt-coordinate-menu [data-coordinate-choice]{display:flex;align-items:center;box-sizing:border-box;width:100%;min-height:32px;margin:0;border:0;border-radius:7px;padding:6px 10px;background:#fff;color:#324557;font:500 12px Inter,Arial,sans-serif;text-align:left;cursor:pointer;outline:0}
.waybill-template-overlay .wt-coordinate-menu [data-coordinate-choice]:hover,.waybill-template-overlay .wt-coordinate-menu [data-coordinate-choice]:focus{background:#edf5fb;color:#245b89}
.waybill-template-overlay .wt-coordinate-menu [data-coordinate-choice].is-selected{background:#2f7dbd;color:#fff;font-weight:800}
.waybill-template-overlay .wt-coordinate-row input[data-coordinate-row],.waybill-template-overlay .wt-draft-preview-tools .wt-coordinate-row input[data-coordinate-row]{border-color:#d5e0ea!important;border-radius:11px!important;background:#fff!important;color:#324557!important;font-weight:500!important;text-align:left!important;box-shadow:none!important}
.waybill-template-overlay .wt-coordinate-row input[data-coordinate-row]:focus,.waybill-template-overlay .wt-draft-preview-tools .wt-coordinate-row input[data-coordinate-row]:focus{border-color:#72a4d0!important;box-shadow:0 0 0 3px #eaf3fb!important}
.waybill-template-overlay .wt-draft-preview-tools .wt-coordinate-trigger{height:31px;border-radius:9px;padding:0 9px;font-size:10px}
.waybill-template-overlay .wt-draft-preview-tools .wt-coordinate-menu{max-height:208px;border-radius:9px}
.waybill-template-overlay .wt-draft-preview-tools .wt-coordinate-menu [data-coordinate-choice]{min-height:30px;font-size:11px}
