.formatter-grid{display:grid;grid-template-columns:310px minmax(0,1fr);gap:22px;align-items:start}.format-controls{padding:20px;max-height:82vh;overflow:auto;position:sticky;top:18px}.format-controls h3{font-size:16px;margin:0 0 14px}.format-controls h3:not(:first-child){margin-top:26px}.format-controls label{display:grid;gap:7px;margin:14px 0;font-size:14px}.format-controls .check-label{display:flex;align-items:flex-start}.format-controls small{font-size:13px;color:#526879;display:block;line-height:1.5}.format-part{display:flex;align-items:center;gap:8px;margin:5px 0}.format-part button{flex:1;border:0;border-radius:6px;text-align:left;background:#f0f4f7;padding:9px 12px;color:#20354a;font-size:14px}.format-part button.active{background:#142c42;color:white}.format-part small{color:inherit;font-size:12px}.format-part input{width:18px;height:18px}.format-filebar,.format-preview-toolbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:18px 0}.format-filebar strong{flex:1;overflow-wrap:anywhere}.format-preview-toolbar{justify-content:space-between}.format-preview-toolbar span{font-size:13px}.format-preview{background:#dfe6ec;border:1px solid #c5d0d8;border-radius:10px;overflow:auto;padding:25px;max-height:80vh}.a4-preview{position:relative;box-sizing:border-box;background:white;color:#111;box-shadow:0 3px 14px #20354a26;margin:auto}.a4-preview table{table-layout:fixed;border-collapse:collapse;font-size:inherit}.a4-preview td{font-size:inherit;border:0;padding:2px 4px;white-space:pre-wrap;overflow-wrap:anywhere;color:#111;background:transparent;line-height:1.25;vertical-align:middle;cursor:cell}.a4-preview td:focus,.a4-preview td:hover{outline:1px solid #167761;outline-offset:-1px;background:#eaf5f0}.a4-preview .amount{text-align:right;font-variant-numeric:tabular-nums}.a4-preview .format-heading td{font-weight:700}.a4-preview .format-total td{font-weight:700;border-top:1px solid #111;border-bottom:3px double #111}.format-page-foot{position:absolute;bottom:18px;left:35px;color:#526879;font:11px Arial}.office-text-preview{background:white;padding:35px;color:#111;max-width:760px;margin:auto}.office-text-preview p{color:inherit;font:inherit;white-space:pre-wrap}.format-upload{position:relative;cursor:pointer}.format-upload input{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%}.formatter-empty{padding:36px;text-align:center}.formatter-empty p{max-width:650px;margin:14px auto}.format-cell-panel{padding:20px;margin:16px 0}.format-cell-panel summary{font-weight:600;cursor:pointer}.format-cell-panel .form-grid{margin-bottom:14px}.journal-meta{padding:20px}.journal-meta input{min-width:0}#journal-list{margin-bottom:22px}#journal-bridge{margin-top:24px;overflow:auto}#journal-bridge .slim-note{padding:15px}#journal-lines input{min-width:90px;max-width:130px}#journal-lines select{min-width:170px;max-width:340px}#journal-errors{padding:0 20px}#format-error:empty{display:none}.format-preview-column{min-width:0}#format-warnings p{font-size:14px;margin:6px 0}#format-form input,#format-form select{width:100%;min-width:0}#format-form input[type=checkbox]{width:18px;flex:0 0 18px}#format-cell-panel[hidden],#format-workspace[hidden],#format-empty[hidden],#journal-editor[hidden]{display:none!important}@media(max-width:1050px){.formatter-grid{grid-template-columns:260px minmax(0,1fr)}}@media(max-width:780px){.formatter-grid{grid-template-columns:1fr}.format-controls{position:static;max-height:none}.format-preview{padding:12px}.format-filebar strong{flex-basis:100%}}
.format-guide{display:flex;gap:12px;flex-wrap:wrap;margin:12px 0 20px;padding:16px;background:#edf5f2;border:1px solid #d0e7de;border-radius:12px;color:#234f42;font-size:13px}.format-guide span{display:flex;gap:8px;align-items:center;flex:1;min-width:140px}.format-guide b{display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:#167761;color:white;font-size:12px}.format-empty-icon{font-size:42px;color:#167761;margin-bottom:10px}.format-filebar>div{flex:1;min-width:180px}.format-filebar strong{display:block;font-size:17px}.format-filebar small{display:block;margin-top:5px;color:#526879}.format-controls{padding:20px}.format-controls h3{line-height:1.4}.format-search input{width:100%;min-width:0}.format-selection-actions{display:flex;gap:4px;flex-wrap:wrap;margin-bottom:10px}.format-part small{display:block}.format-active-context{border-top:1px solid #dbe4e8;border-bottom:1px solid #dbe4e8;margin:20px -2px 6px;padding:14px 0}.format-active-context strong{font-size:13px;color:#167761;overflow-wrap:anywhere}.format-active-context .check-label{margin-bottom:0}.format-active-context input{width:18px;height:18px}.format-boundaries{display:grid;grid-template-columns:1fr 1fr;gap:0 12px}.format-boundaries label:last-child{grid-column:1/-1}.format-advanced{border:1px solid #dbe4e8;border-radius:8px;padding:12px;margin:14px 0}.format-advanced summary,.format-limitations summary{font-size:13px;font-weight:600;cursor:pointer;line-height:1.5}.format-advanced small{margin-top:8px}.format-presets{display:flex;gap:5px;flex-wrap:wrap}.format-presets .btn{padding:8px 10px}.format-page-tools{display:flex;align-items:center;gap:7px;flex-wrap:wrap}.format-page-tools label{display:flex;align-items:center;gap:6px;font-size:12px}.format-page-tools select{width:auto;min-width:56px;padding:7px}.format-preview-toolbar strong,.format-preview-toolbar span{display:block}.format-preview-toolbar span{margin-top:5px;color:#526879}.format-preview{background:repeating-linear-gradient(135deg,#e3eaf0,#e3eaf0 8px,#e6ecf1 8px,#e6ecf1 16px);padding:22px;max-height:78vh}.format-preview-caption{font-size:12px;line-height:1.6;margin:10px 3px;color:#526879}.a4-preview{min-width:0}.a4-preview td{padding:0 3px;line-height:1.25}.format-row-tools{display:flex;align-items:center;flex-wrap:wrap;gap:7px;margin:16px 0}.format-row-tools strong{font-size:13px;margin-right:5px}.format-cell-panel p{font-size:13px;line-height:1.6}.format-preflight{padding:20px;margin:16px 0}.format-preflight h3{font-size:15px;margin:0 0 10px}.format-preflight small{font-size:12px;color:#526879;line-height:1.6}.format-check-ok{color:#167761;font-weight:600;font-size:14px}.format-check-neutral{font-size:14px;color:#526879}.format-check-error{color:#a03232;font-size:14px;font-weight:600}.format-check-warning{font-size:13px;color:#745711;background:#fff8e8;border-left:3px solid #c99125;padding:10px 12px}.format-check-item{width:100%;display:grid;gap:5px;background:#fff3f2;color:#783030;border:1px solid #efc3bd;padding:12px;text-align:left;border-radius:8px;margin:10px 0;cursor:pointer;font-size:13px;line-height:1.5}.format-check-item small{color:inherit}.format-check-item:hover{background:#ffe9e6}.format-limitations p{font-size:13px;line-height:1.6}.format-controls>small{margin-top:8px}.format-controls .btn.full{white-space:normal}#format-cell-panel[hidden],#format-workspace[hidden],#format-empty[hidden]{display:none!important}@media(min-width:1250px){.formatter-grid{grid-template-columns:340px minmax(0,1fr)}}@media(max-width:780px){.format-controls{max-height:none;position:static}.format-guide{gap:10px;padding:12px}.format-guide span{min-width:130px}.format-filebar{gap:8px}.format-filebar>div{flex-basis:100%}.format-filebar .btn{flex:1;font-size:13px}.format-preview-toolbar{align-items:flex-start}.format-page-tools{gap:5px}.format-preview{padding:10px}.format-preview-column{overflow:hidden}.format-preflight,.format-cell-panel{padding:16px}}
.a4-preview td{padding:0 3px;line-height:1.25}.format-preview{max-height:78vh;padding:10px}.formatter-empty .compact-actions{justify-content:center;flex-wrap:wrap}.format-controls h3{line-height:1.4}
