/* V78: purpose-built responsive full-width viewer on top of V77 stable styles */
.dv-body.v78-workspace .dv-wrap{max-width:none;padding:10px 14px 20px;min-height:calc(100dvh - 68px)}
.dv-body.v78-workspace .dv-hero,.dv-body.v78-workspace .dv-doc-cards,.dv-body.v78-workspace .dv-footer{display:none}
.dv-body.v78-workspace .dv-topbar{min-height:54px;padding:6px 18px;box-shadow:none;border-bottom:1px solid #234d60}
.dv-body.v78-workspace .dv-mark{width:35px;height:35px;border-radius:9px}
.dv-body.v78-workspace .dv-tabs{margin:0 0 8px;gap:5px}
.dv-body.v78-workspace .dv-tab{flex:0 1 auto;min-width:160px;padding:8px 18px;border-radius:9px;font-size:12px}
.v78-workspace-title{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:7px}.v78-workspace-title strong{font-size:17px}.v78-workspace-title span{font-size:11px;color:#648396;margin-left:10px}.v78-status-pill{border-radius:30px;background:#e4f6f1;color:#187f77;padding:6px 12px;font-size:10px;font-weight:800}
.v78-toolbar{display:flex;align-items:center;gap:5px;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:thin;padding:6px 6px;background:#fff;border:1px solid #d6e4ea;border-radius:11px;margin-bottom:9px;box-shadow:0 3px 14px #0b3c4c0b}
.v78-toolbar button{flex:0 0 auto;border:1px solid transparent;background:#fff;color:#16445b;border-radius:7px;min-height:36px;padding:7px 10px;font-size:12px;font-weight:800;white-space:nowrap}
.v78-toolbar button:hover,.v78-toolbar button[aria-expanded=true]{background:#eaf5f5;border-color:#c6e7e4}
.v78-toolbar .v78-focus-btn{margin-left:auto;background:#0c3e55;color:white;padding:8px 14px}
.v78-toolbar .v78-focus-btn:hover{background:#166b71;color:white}
.v78-divider{height:26px;width:1px;flex:0 0 1px;background:#d5e4e9;margin:0 3px}
.dv-body.v78-workspace .dv-columns{grid-template-columns:minmax(0,1.02fr) minmax(0,.98fr);gap:9px;min-height:0;height:calc(100dvh - 220px)}
.dv-body.v78-workspace #panel-viewer .dv-card{border-radius:12px;padding:12px;box-shadow:none;display:flex;flex-direction:column;overflow:auto;scrollbar-width:thin;min-height:0}
.dv-body.v78-workspace #panel-viewer .dv-card h2{font-size:14px;margin:0}
.dv-body.v78-workspace #panel-viewer .dv-muted{margin:0 0 7px;font-size:11px}
.dv-body.v78-workspace .dv-code-shell{flex:1;min-height:240px;height:auto;max-height:none;border-radius:9px}
.dv-body.v78-workspace .dv-sheet{flex:1;min-height:250px;background:#eaf0f4;padding:12px;max-height:none;overflow:auto;border-style:solid}
.dv-body.v78-workspace .dv-sheet svg{max-height:none;max-width:100%;height:auto;box-shadow:0 5px 22px #001f3530}
.dv-body.v78-workspace .v78-legacy-actions,.dv-body.v78-workspace .v78-original-controls{display:none!important}
.dv-body.v78-workspace #panel-viewer .dv-card .v78-preview-navigation{margin:7px 0!important}
.dv-body.v78-workspace #panel-viewer .dv-card .dv-row .dv-button{padding:8px 12px}
.dv-body.v78-workspace #panel-viewer .dv-card .dv-status{min-height:18px;margin:6px 0 0;font-size:11px}
.dv-body.v78-workspace #panel-viewer .dv-results:empty{display:none}
.v78-settings-panel,.v78-transform-panel{position:fixed;z-index:100;top:142px;right:17px;width:min(450px,calc(100vw - 34px));max-height:calc(100dvh - 160px);overflow:auto;border:1px solid #cbdfe7;background:#fff;box-shadow:0 18px 60px #03263738;border-radius:15px;padding:18px}
.v78-settings-panel[hidden],.v78-transform-panel[hidden],.v78-warnings-panel[hidden],.v78-notice[hidden]{display:none!important}
.v78-settings-panel header,.v78-transform-panel header,.v78-dialog header{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px;font-size:16px}
.v78-dismiss,.v78-dialog header button{background:#eff5f7;color:#1c465b;border:0;border-radius:8px;padding:5px 12px;font-size:20px;cursor:pointer}
#v78-moved-controls .dv-controls{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.v78-help-note{background:#f2f7f8;color:#647d8c;padding:10px 12px;border-left:3px solid #9acac5;border-radius:4px;font-size:11px;margin:10px 0}
.v78-remember{display:flex;gap:8px;font-size:12px;align-items:center}
.v78-transform-panel>label{font-size:12px;font-weight:700;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:7px 0}
.v78-transform-panel select{width:55%;padding:8px;border:1px solid #ccdade;border-radius:8px}
.v78-notice{background:#fffbea;border:1px solid #f4dfa8;position:fixed;right:20px;bottom:22px;max-width:min(560px,90vw);padding:14px 17px;z-index:150;border-radius:12px;box-shadow:0 12px 35px #0c2b3b36;font-size:12px;color:#785114}
.v78-notice.error{background:#fff0eb;color:#a13e27;border-color:#ebc6bd}
.v78-dialog{padding:22px;border:1px solid #cadde4;border-radius:16px;box-shadow:0 15px 70px #071e3b60;width:min(680px,calc(100vw - 28px));max-height:90dvh;color:#123c51;font-family:Manrope,system-ui,sans-serif}
.v78-dialog::backdrop{background:#061b29a8}.v78-dialog form{margin:0}.v78-dialog footer{display:flex;justify-content:flex-end;gap:8px;margin-top:14px}
.v78-image-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.v78-image-picture{border-radius:10px;background:#edf3f6;border:1px dashed #d5e0e6;padding:14px;display:flex;flex-direction:column;align-items:center;gap:6px}.v78-image-picture canvas{max-width:100%;max-height:200px;object-fit:contain;background:white}.v78-image-picture small{font-size:10px;color:#627c90}
.v78-image-fields{display:grid;grid-template-columns:1fr 1fr;gap:10px}.v78-image-fields label{font-size:11px;font-weight:800;display:flex;flex-direction:column;gap:5px}.v78-image-fields input{width:100%;min-width:0;border-radius:8px;border:1px solid #cbdce5;padding:9px}
.v78-help-dialog{width:min(600px,calc(100vw - 28px))}.v78-help-dialog p{font-size:12px}.v78-help-dialog code{background:#e9f0f3;border-radius:5px;padding:2px 5px}
#v78-help-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}#v78-help-grid div{background:#f4f8fa;border:1px solid #dae7ea;padding:10px;border-radius:8px;font-size:11px}#v78-help-grid strong{display:block;color:#087d74}
.v78-mobile-view{display:none}
.dv-body.v78-focus .dv-topbar,.dv-body.v78-focus .dv-tabs,.dv-body.v78-focus .v78-workspace-title{display:none!important}
.dv-body.v78-focus .dv-wrap{padding:7px 10px 10px;min-height:100dvh}.dv-body.v78-focus .dv-columns{height:calc(100dvh - 64px)}
.dv-body.v78-focus .v78-toolbar{margin:0 0 7px}.dv-body.v78-focus .v78-toolbar .v78-focus-btn{background:#0b8882}
.dv-body.v78-workspace .dv-panel[hidden]{display:none!important}
@media(max-width:900px){.dv-body.v78-workspace .dv-columns{grid-template-columns:1fr;height:auto}.dv-body.v78-workspace #panel-viewer .dv-card{min-height:auto;overflow:visible}.dv-body.v78-workspace .dv-code-shell{height:310px;flex:none}.dv-body.v78-workspace .dv-sheet{min-height:400px;max-height:600px}.dv-body.v78-focus .dv-columns{height:auto}}
@media(max-width:600px){.dv-body.v78-workspace .dv-wrap{padding:6px 8px 22px}.dv-body.v78-workspace .dv-topbar{padding:6px 10px}.dv-body.v78-workspace .dv-top-actions a{padding:6px;font-size:10px}.dv-body.v78-workspace .dv-tabs{margin-bottom:6px}.dv-body.v78-workspace .dv-tab{flex:1;min-width:0}.v78-workspace-title{display:none}.v78-toolbar{padding:5px;margin-bottom:5px}.v78-toolbar button{padding:7px 9px;font-size:12px}.v78-toolbar .v78-focus-btn{margin-left:0}.v78-mobile-view{display:flex;gap:5px;margin:4px 0}.v78-mobile-view button{flex:1;border-radius:9px;border:1px solid #d6e4e8;background:white;padding:8px;font-weight:850;color:#24495b;font-size:12px}.v78-mobile-view button.is-active{background:#103d54;color:white}.dv-body.v78-workspace #panel-viewer .dv-card{display:none}.dv-body.v78-workspace:not(.v78-preview-mobile) #panel-viewer .dv-card:first-child{display:flex}.dv-body.v78-workspace.v78-preview-mobile #panel-viewer .dv-card:nth-child(2){display:flex}.dv-body.v78-workspace .dv-code-shell{height:calc(100dvh - 330px);min-height:290px}.dv-body.v78-workspace .dv-sheet{min-height:calc(100dvh - 380px);max-height:calc(100dvh - 300px)}.dv-body.v78-workspace #panel-viewer .dv-card{padding:9px}.dv-body.v78-workspace .v78-preview-heading .dv-muted{display:none}.v78-settings-panel,.v78-transform-panel{top:92px;right:7px;width:calc(100vw - 14px);max-height:calc(100dvh - 104px)}.v78-image-grid{grid-template-columns:1fr}.v78-image-fields{grid-template-columns:1fr 1fr}#v78-help-grid{grid-template-columns:1fr}.dv-body.v78-focus .dv-wrap{padding:5px}.dv-body.v78-focus .dv-sheet{max-height:calc(100dvh - 230px)} }
.dv-body.v78-barcode-page .v78-toolbar,.dv-body.v78-barcode-page .v78-mobile-view,.dv-body.v78-barcode-page .v78-workspace-title{display:none!important}
.dv-body.v78-barcode-page .dv-columns{height:auto!important;min-height:420px}.dv-body.v78-barcode-page .dv-card{overflow:visible!important}.dv-body.v78-barcode-page .dv-hero{display:none}

/* Keep a complete label visible at first load while retaining scrolling for zoomed detail. */
.dv-body.v78-workspace .dv-sheet{align-items:safe center;justify-content:safe center}
.dv-body.v78-workspace .dv-sheet svg{max-height:calc(100dvh - 335px);width:auto;max-width:100%;height:auto;flex-shrink:0}
@media(max-width:900px){.dv-body.v78-workspace .dv-sheet svg{max-height:450px}}
@media(max-width:600px){.dv-body.v78-workspace .dv-sheet svg{max-height:calc(100dvh - 370px)}}

/* V79 Notepad-mode: actual text and caret live in the SAME element; no duplicated syntax layer. */
.dv-body.v78-workspace .dv-code-shell { background:#112a3d; }
.dv-body.v78-workspace .dv-code-entry {
  position:absolute;inset:0;z-index:2;display:block;
  color:#e4f6ff!important;-webkit-text-fill-color:#e4f6ff!important;
  caret-color:#ffffff!important;background:#112a3d!important;
  white-space:pre!important;overflow-wrap:normal!important;word-break:normal!important;
  overflow:auto!important;tab-size:2;letter-spacing:0;
  font-family:Consolas,'Cascadia Code',ui-monospace,monospace!important;
  font-weight:400!important;font-size:14px!important;line-height:1.6!important;
  padding:15px 17px!important;text-align:left!important;
}
.dv-body.v78-workspace .dv-code-entry::selection{background:#357fa3!important;color:white!important}
.dv-body.v78-workspace .dv-code-entry:focus {outline:2px solid #48b7b0;outline-offset:-2px}
.dv-body.v78-workspace #label-stage {min-width:0}
.dv-body.v78-workspace .v78-preview-navigation {justify-content:flex-end!important}
@media(max-width:600px){.dv-body.v78-workspace .dv-code-entry{font-size:13px!important;padding:12px!important}}
