*{margin:0;padding:0;box-sizing:border-box;}
:root{--primary-color:#0053eb;--secondary-color:orangered;--text-color:#202124;--light-gray:#f8f9fa;--medium-gray:#dadce0;--dark-gray:#5f6368;}
body{margin:0;background:#f0f0f0;color:#333;font-family:"Overpass",-apple-system,BlinkMacSystemFont,"Calibri",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",Arial,Helvetica,Geneva,Tahoma,Verdana,sans-serif;font-weight:400;font-size:12pt;line-height:1.5;min-height:100vh;display:flex;flex-direction:column;align-items:stretch;}
/* ReceiptFont shell header */
.rf-site-header{width:100%;overflow:visible;z-index:1010;background:#0053eb;padding-top:0.3em;position:relative;box-sizing:border-box;}
.rf-site-header .nav-menu1{margin-left:auto;margin-right:auto;max-width:1500px;padding:0 1em;box-sizing:border-box;display:flex;align-items:center;flex-wrap:wrap;gap:0.35rem 0.75rem;min-height:2.75rem;overflow:visible;}
.rf-site-header #logo{height:1.5em;line-height:1.5em;font-size:30px;color:#fff;font-weight:700;text-align:left;margin:0;flex-shrink:0;}
.rf-site-header #logo .logoIcon{font-family:rflogo;font-size:1.5em;font-weight:300;color:#0053eb;filter:contrast(40%) brightness(2);letter-spacing:3px;}
.rf-site-header #logo .logoIconRight{color:#fff;}
.rf-logo-home{text-decoration:none;color:inherit;flex-shrink:0;}
.rf-logo-home:hover{filter:brightness(1.06);}
.sbc-rf-tool-nav{flex:1 1 auto;min-width:0;display:flex;align-items:center;justify-content:flex-end;}
.sbc-rf-tool-title{color:#fff;font-weight:400;font-size:1rem;line-height:1.65rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.container,.sbc-rf-container{background:#fff;border-radius:0;box-shadow:none;max-width:1500px;width:100%;margin:0 auto;padding:15px 15px 28px;animation:none;box-sizing:border-box;}
.page-sbc .container{position:relative;padding-top:14px;margin-top:0;}
.page-sbc .sbc-help-container-corner{position:absolute;top:12px;right:12px;z-index:20;margin:0;box-shadow:0 1px 4px rgba(0,0,0,0.08);}
.page-sbc .sbc-page-lede{padding-right:40px;box-sizing:border-box;display:flex;flex-direction:column;align-items:flex-start;text-align:left;line-height:1.45;max-width:none;margin:0 0 12px;}
.page-sbc .sbc-page-lede-title{font-weight:700;font-size:0.95rem;color:#202124;}
.page-sbc .sbc-page-lede-sub{font-weight:400;font-size:0.85rem;color:#5f6368;}
@media screen and (max-width:768px){
.rf-site-header #logo{font-size:1.4em;line-height:2.2em;height:2.2em;}
.sbc-rf-tool-title{font-size:0.9rem;}
}
@keyframes fadeIn {
from{opacity:0;transform:translateY(-20px);}
to{opacity:1;transform:translateY(0);}
}
.header{text-align:center;margin-bottom:40px;}
.header h1{color:#333;font-size:2.5rem;margin-bottom:10px;display:flex;align-items:center;justify-content:center;gap:15px;}
.header h1::before{content:"🧾";font-size:2.5rem;}
.header p{color:#666;font-size:1.1rem;}
.upload-section{background:#f8f9fa;border:2px dashed #0053eb;border-radius:3px;padding:40px;text-align:center;cursor:pointer;transition:border-color 0.2s ease,background 0.2s ease;margin-bottom:30px;display:block;}
.upload-section:hover{background:#eef3ff;border-color:#0046c7;}
.upload-section.dragover{background:#e8f0ff;border-color:#0046c7;}
.upload-icon{font-size:4rem;margin-bottom:15px;}
.upload-text{color:#495057;font-size:1.1rem;margin-bottom:10px;}
.upload-subtext{color:#6c757d;font-size:0.9rem;}
.recent-uploads{background:#f9fafb;border:1px solid #e5e7eb;border-radius:6px;padding:15px;margin-bottom:20px;}
.recent-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px;}
.recent-header h3{margin:0;font-size:1.05rem;color:#333;}
.btn-small{padding:6px 10px;font-size:0.85rem;}
.recent-hint{margin:4px 0 10px;color:#666;font-size:0.9rem;}
.recent-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:10px;}
.recent-card{background:#fff;border:1px solid #e5e7eb;border-radius:8px;padding:10px;display:flex;flex-direction:column;gap:6px;box-shadow:0 1px 2px rgba(0,0,0,0.04);}
.recent-thumb{width:100%;height:120px;object-fit:cover;border-radius:6px;border:1px solid #eef2f7;}
.recent-meta{font-size:0.85rem;color:#555;line-height:1.3;}
.recent-actions{display:flex;justify-content:space-between;gap:6px;}
.btn-outline{background:#fff;color:#0053eb;border:1px solid #0053eb;border-radius:3px;box-shadow:none;}
.btn-outline:hover{background:#f3f7ff;}
.recent-empty{grid-column:1 / -1;text-align:center;color:#888;padding:10px 0;}
#fileInput{display:none;}
.btn{background:#0053eb;color:#fff;border:1px solid #0046c7;padding:12px 30px;border-radius:3px;font-size:1rem;font-weight:600;cursor:pointer;transition:background 0.2s ease;box-shadow:none;margin:10px;}
.btn:hover{background:#3367d6;}
.btn:active{background:#0046c7;}
.btn:disabled{background:#ccc;cursor:not-allowed;box-shadow:none;}
.btn-secondary{background:linear-gradient(135deg,#f093fb 0%,#f5576c 100%);}
.preview-section{display:none;margin-top:30px;animation:slideIn 0.5s ease-in;}
@keyframes slideIn {
from{opacity:0;transform:translateX(-20px);}
to{opacity:1;transform:translateX(0);}
}
.preview-section.active{display:block;}
.preview-title{font-size:1.5rem;color:#333;margin-bottom:20px;font-weight:600;}
.preview-image{width:100%;max-height:400px;object-fit:contain;border-radius:6px;box-shadow:0 4px 15px rgba(0,0,0,0.1);margin-bottom:20px;}
.receipt-data{background:#f8f9fa;border-radius:6px;padding:20px;margin-bottom:20px;}
.data-item{margin-bottom:15px;}
.data-label{font-weight:600;color:#495057;margin-bottom:5px;}
.data-value{color:#212529;padding:8px 12px;background:white;border-radius:5px;border:1px solid #dee2e6;}
.items-list{list-style:none;padding:0;}
.items-list li{padding:8px 12px;background:white;border-radius:5px;border:1px solid #dee2e6;margin-bottom:5px;}
.button-group{display:flex;justify-content:center;gap:15px;flex-wrap:wrap;margin-top:20px;}
.loading{display:none;text-align:center;padding:20px;}
.loading.active{display:block;}
.spinner{border:4px solid #f3f3f3;border-top:4px solid #0053eb;border-radius:50%;width:50px;height:50px;animation:spin 1s linear infinite;margin:0 auto 15px;}
@keyframes spin {
0%{transform:rotate(0deg);}
100%{transform:rotate(360deg);}
}
.loading-text{color:#495057;font-size:1.1rem;}
.alert{padding:15px 20px;border-radius:10px;margin-bottom:20px;display:none;}
.alert.active{display:block;animation:fadeIn 0.3s ease-in;}
.alert-success{background:#d4edda;color:#155724;border:1px solid #c3e6cb;}
.alert-error{background:#f8d7da;color:#721c24;border:1px solid #f5c6cb;}
.alert-info{background:#d1ecf1;color:#0c5460;border:1px solid #bee5eb;}
/* Module Test Section */
.module-test-section{margin-top:20px;margin-bottom:20px;padding:20px;background:#f8f9fa;border-radius:10px;display:block;/* Always visible */}
.module-test-section h3{margin-bottom:15px;color:#333;}
.btn-module{background:linear-gradient(135deg,#f093fb 0%,#f5576c 100%);margin:5px;}
.btn-module:hover{background:linear-gradient(135deg,#f5576c 0%,#f093fb 100%);}
/* Module Results Styles */
.module-results{margin-top:30px;background:#f8f9fa;border-radius:10px;padding:20px;animation:slideIn 0.5s ease-in;}
.module-content{margin-top:15px;}
.ocr-summary{display:flex;gap:20px;margin-bottom:20px;padding:15px;background:white;border-radius:8px;border-left:4px solid #0053eb;}
.summary-item{font-size:1rem;color:#495057;}
.ocr-full-text{margin-bottom:20px;padding:15px;background:white;border-radius:8px;}
.ocr-full-text h4{color:#333;margin-bottom:10px;font-size:1.1rem;}
.full-text-content{background:#f8f9fa;padding:15px;border-radius:5px;white-space:pre-wrap;word-wrap:break-word;font-family:'Courier New',monospace;font-size:0.9rem;line-height:1.6;color:#212529;max-height:300px;overflow-y:auto;}
.ocr-lines{margin-bottom:20px;}
.ocr-lines h4{color:#333;margin-bottom:15px;font-size:1.1rem;}
.ocr-line{background:white;border-radius:8px;padding:15px;margin-bottom:15px;border-left:3px solid #0046c7;}
.line-header{display:flex;align-items:center;gap:15px;margin-bottom:10px;}
.line-number{background:#0053eb;color:white;padding:4px 12px;border-radius:15px;font-size:0.85rem;font-weight:600;}
.line-text{flex:1;font-weight:600;color:#333;font-size:1rem;}
.line-blocks{margin-top:10px;padding-top:10px;border-top:1px solid #dee2e6;}
.text-block{display:flex;align-items:center;gap:10px;padding:8px;margin-bottom:5px;background:#f8f9fa;border-radius:5px;font-size:0.9rem;}
.block-text{font-weight:600;color:#495057;min-width:100px;}
.block-info{color:#6c757d;font-size:0.85rem;}
.block-confidence{color:#28a745;font-weight:600;font-size:0.85rem;margin-left:auto;}
.ocr-normalized{margin-top:20px;padding:15px;background:white;border-radius:8px;}
.ocr-normalized h4{color:#333;margin-bottom:15px;font-size:1.1rem;}
.normalized-lines{background:#f8f9fa;padding:15px;border-radius:5px;}
.normalized-line{display:flex;align-items:center;gap:10px;padding:10px;margin-bottom:8px;background:white;border-radius:5px;font-family:'Courier New',monospace;font-size:0.95rem;}
.line-num{color:#0053eb;font-weight:600;min-width:30px;}
.line-content{flex:1;color:#212529;}
.line-length{color:#6c757d;font-size:0.85rem;}
/* Logo Detection Results Styles */
.logo-summary{display:flex;flex-wrap:wrap;gap:15px;margin-bottom:20px;padding:15px;background:white;border-radius:8px;border-left:4px solid #f5576c;}
.summary-item.success{color:#28a745;}
.summary-item.error{color:#dc3545;}
.logo-details{margin-top:20px;padding:15px;background:white;border-radius:8px;}
.logo-details h4{color:#333;margin-bottom:15px;font-size:1.1rem;}
.logo-info-box{background:#f8f9fa;padding:15px;border-radius:5px;}
.logo-info-box p{margin:8px 0;color:#495057;font-size:0.95rem;}
/* Barcode Handler Results Styles */
.barcode-summary{display:flex;gap:20px;margin-bottom:20px;padding:15px;background:white;border-radius:8px;border-left:4px solid #0053eb;}
.barcode-list{margin-top:20px;}
.barcode-list h4{color:#333;margin-bottom:15px;font-size:1.1rem;}
.barcode-item{background:white;border-radius:8px;padding:15px;margin-bottom:15px;border-left:3px solid #0046c7;}
.barcode-header{display:flex;align-items:center;gap:15px;margin-bottom:10px;}
.barcode-number{background:#0053eb;color:white;padding:4px 12px;border-radius:15px;font-size:0.85rem;font-weight:600;}
.barcode-type{color:#495057;font-weight:600;font-size:0.95rem;}
.barcode-info{margin-top:10px;padding-top:10px;border-top:1px solid #dee2e6;}
.barcode-info p{margin:5px 0;color:#495057;font-size:0.9rem;}
.barcode-info code{background:#f8f9fa;padding:2px 6px;border-radius:3px;font-family:'Courier New',monospace;color:#e83e8c;font-size:0.9rem;}
.barcode-empty{text-align:center;padding:40px;background:white;border-radius:8px;color:#6c757d;}
.barcode-empty .hint{margin-top:10px;font-size:0.9rem;color:#adb5bd;}
@media (max-width: 768px) {
.container{padding:20px;}
.page-sbc .container{padding-top:10px;margin-top:0;}
.page-sbc .sbc-help-container-corner{top:8px;right:8px;}
.page-sbc .sbc-page-lede{padding-right:36px;}
.page-sbc .sbc-page-lede-title{font-size:0.8125rem;}
.page-sbc .sbc-page-lede-sub{font-size:0.6875rem;}
.header h1{font-size:2rem;}
.upload-section{padding:20px;}
.sbc-upload-compact.upload-section{padding:10px 12px;}
.button-group{flex-direction:column;}
.sbc-workbench .button-group{flex-direction:row;}
.btn{width:100%;}
.sbc-workbench .btn{width:auto;max-width:100%;}
.ocr-summary{flex-direction:column;gap:10px;}
.line-header{flex-direction:column;align-items:flex-start;}
.text-block{flex-direction:column;align-items:flex-start;}
.normalized-line{flex-direction:column;align-items:flex-start;}
}
/* Same Barcode/QR Code Generator page */
/* Collapse when neither alert nor loading is visible (no reserved strip). */
.sbc-decode-status{margin:0;min-height:0;position:relative;}
.sbc-decode-status:has(#sbcAlert.active),
.sbc-decode-status:has(#sbcLoading.active){margin:10px 0 12px;}
.page-sbc .sbc-decode-status #sbcAlert.sbc-upload-alert{margin-top:0;}
.page-sbc .sbc-decode-status .loading.sbc-decode-loading{padding:0;border:none;background:transparent;}
.page-sbc .sbc-decode-status .loading.sbc-decode-loading.active{display:flex;flex-direction:row;align-items:center;gap:14px;justify-content:flex-start;padding:10px 16px;margin:0;border-radius:10px;border:1px solid #dee2e6;background:#f8f9fa;box-sizing:border-box;text-align:left;}
.page-sbc .sbc-decode-status .loading.sbc-decode-loading.active .spinner{margin:0;flex-shrink:0;}
.page-sbc .sbc-decode-status .loading.sbc-decode-loading .loading-text{margin:0;font-size:calc(1rem - 2px);color:#495057;}
.page-sbc #sbcAlert.sbc-upload-alert{padding:10px 16px;font-size:calc(1rem - 2px);line-height:1.45;}
.page-sbc #sbcAlert.sbc-upload-alert.active{display:flex;flex-direction:row;align-items:flex-start;gap:10px;}
.page-sbc #sbcAlert .sbc-upload-alert-msg{flex:1;min-width:0;}
.page-sbc #sbcAlert .sbc-alert-close{flex-shrink:0;margin:-2px -4px 0 0;padding:0 6px;border:none;background:transparent;color:inherit;opacity:0.65;font-size:1.25rem;line-height:1;cursor:pointer;border-radius:4px;}
.page-sbc #sbcAlert .sbc-alert-close:hover{opacity:1;background:rgba(0,0,0,0.06);}
.page-sbc #sbcAlert.alert-error .sbc-alert-close:hover{background:rgba(0,0,0,0.08);}
.page-sbc #sbcAlert.alert-success .sbc-alert-close:hover{background:rgba(0,0,0,0.06);}
.sbc-workbench{display:grid;/* Upload and preview columns equal width;center = Type and Data (1.2fr = 75% of former 2fr vs sides). */ grid-template-columns:minmax(0,1fr) minmax(0,1.2fr) minmax(0,1fr);gap:16px;margin-top:12px;align-items:stretch;min-height:420px;}
.sbc-upload-column .sbc-upload-compact.upload-section{flex:1 1 auto;min-height:0;height:100%;align-self:stretch;}
.sbc-upload-column.sbc-card,
.sbc-mid-panel,
.sbc-gen-panel{min-width:0;display:flex;flex-direction:column;height:100%;min-height:0;}
.sbc-mid-panel .preview-title{flex-shrink:0;}
.sbc-mid-panel .sbc-type-list-inline{flex-shrink:0;}
.sbc-mid-panel .sbc-data-field{flex:1 1 auto;display:flex;flex-direction:column;min-height:0;margin-bottom:10px;}
.sbc-mid-panel .sbc-data-field .sbc-textarea{flex:1 1 auto;min-height:120px;}
.sbc-mid-panel .sbc-generate-row{flex-shrink:0;margin-top:auto;margin-bottom:0;}
.sbc-gen-panel .sbc-field,
.sbc-gen-panel .sbc-qr-options{flex-shrink:0;}
.sbc-gen-panel .sbc-qr-wrap{flex:0 1 auto;min-height:220px;width:100%;align-self:stretch;padding:0;}
.sbc-gen-panel.sbc-linear-1d .sbc-qr-wrap{min-height:var(--sbc-bar-preview-min, 220px);padding:10px 8px;box-sizing:border-box;}
.sbc-qr-body.sbc-linear-1d .sbc-qr-zoom-viewport{width:100%;}
.sbc-qr-body.sbc-linear-1d .sbc-qr-zoom-viewport img{width:100%;height:var(--sbc-bar-height, 120px);max-width:100%;object-fit:fill;}
.sbc-qr-body.sbc-has-qr-image .sbc-qr-zoom-viewport{cursor:zoom-in;}
.sbc-qr-lightbox{border:none;padding:0;margin:0;max-width:none;width:100%;max-height:none;height:100%;background:transparent;}
.sbc-qr-lightbox::backdrop{background:rgba(15,23,42,0.72);}
.sbc-qr-lightbox-inner{position:relative;display:flex;align-items:center;justify-content:center;min-height:100vh;width:100%;padding:56px 20px 24px;box-sizing:border-box;}
.sbc-qr-lightbox-img{max-width:min(96vw,1200px);max-height:88vh;width:auto;height:auto;object-fit:contain;border-radius:8px;box-shadow:0 24px 64px rgba(0,0,0,0.45);image-rendering:-moz-crisp-edges;image-rendering:crisp-edges;image-rendering:pixelated;}
.sbc-qr-lightbox-close{position:fixed;top:16px;right:20px;z-index:2;width:42px;height:42px;border-radius:50%;border:1px solid rgba(255,255,255,0.45);background:rgba(255,255,255,0.12);color:#fff;font-size:1.5rem;line-height:1;cursor:pointer;}
.sbc-qr-lightbox-close:hover{background:rgba(255,255,255,0.22);}
.sbc-gen-panel .sbc-actions-below-qr{flex-shrink:0;}
.sbc-card{background:#f8f9fa;border:1px solid #dadce0;border-radius:3px;padding:18px;}
#sbcFile{display:none;}
.sbc-upload-compact.upload-section{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:150px;padding:10px 12px;margin-bottom:0;position:relative;overflow:hidden;text-align:center;box-sizing:border-box;}
.sbc-upload-compact.sbc-has-preview{justify-content:flex-start;align-items:center;}
.sbc-upload-hint-row{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;width:max-content;max-width:calc(100% - 24px);position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);z-index:5;flex-shrink:0;padding:10px 14px;margin:0;background:rgba(255,255,255,0.94);border-radius:8px;box-shadow:0 2px 12px rgba(0,0,0,0.1);pointer-events:none;opacity:1;visibility:visible;transition:opacity .2s ease,visibility .2s ease;}
#sbcUpload.sbc-has-preview .sbc-upload-hint-row{opacity:0;visibility:hidden;}
#sbcUpload.sbc-has-preview:hover .sbc-upload-hint-row,#sbcUpload.sbc-has-preview:focus-within .sbc-upload-hint-row,#sbcUpload.sbc-has-preview.dragover .sbc-upload-hint-row{opacity:1;visibility:visible;}
.sbc-upload-hint-icon{flex-shrink:0;font-size:calc(1.65rem + 3px);line-height:1;}
.sbc-upload-hint-text{margin:0;color:#495057;font-size:calc(0.92rem + 1px);line-height:1.35;text-align:center;max-width:100%;}
.sbc-upload-compact.sbc-has-preview .sbc-upload-hint-text{color:#374151;}
.sbc-upload-preview{width:100%;flex:1 1 auto;min-height:0;max-height:240px;object-fit:contain;border-radius:4px;}
.sbc-upload-column .sbc-upload-preview{flex:1 1 auto;min-height:0;max-height:none;}
.sbc-field{margin-bottom:12px;}
.sbc-label{font-weight:700;color:#374151;margin-bottom:6px;}
.sbc-textarea{width:100%;min-height:120px;resize:vertical;border-radius:6px;border:1px solid #dee2e6;padding:12px;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:0.92rem;line-height:1.45;background:#ffffff;}
.sbc-input,
.sbc-select{width:100%;border-radius:5px;border:1px solid #dee2e6;padding:4px 10px;font-size:0.875rem;line-height:1.35;min-height:0;background:#fff;box-sizing:border-box;}
.sbc-select option[disabled]{color:#9ca3af;}
.sbc-row{display:grid;grid-template-columns:240px 1fr;gap:14px;align-items:start;}
.sbc-range{width:100%;}
.sbc-hint{font-size:0.9rem;color:#6b7280;margin-top:6px;}
.sbc-qr-wrap{display:flex;flex-direction:column;justify-content:center;align-items:center;min-height:220px;background:#fff;border:1px dashed #d1d5db;border-radius:6px;padding:0;gap:8px;position:relative;}
.sbc-qr-body:not(.sbc-has-qr-image) .sbc-qr-zoom-viewport{display:none;}
.sbc-qr-zoom-viewport{width:100%;max-width:100%;overflow:hidden;display:flex;align-items:center;justify-content:center;border-radius:4px;box-sizing:border-box;}
.sbc-qr-zoom-viewport img{display:block;max-width:100%;width:auto;height:auto;margin:0;image-rendering:-moz-crisp-edges;image-rendering:crisp-edges;image-rendering:pixelated;transform-origin:center center;transition:transform 0.2s ease;}
.sbc-qr-body.sbc-has-qr-image .sbc-qr-zoom-viewport:hover img{transform:scale(1.38);}
@media (prefers-reduced-motion:reduce){
.sbc-qr-zoom-viewport img{transition:none;}
.sbc-qr-body.sbc-has-qr-image .sbc-qr-zoom-viewport:hover img{transform:none;}
}
.sbc-qr-generating{position:absolute;inset:0;z-index:5;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:16px;border-radius:6px;background:rgba(255,255,255,0.88);backdrop-filter:blur(2px);}
.sbc-qr-generating[hidden]{display:none !important;}
.sbc-qr-generating-spinner{width:36px;height:36px;border:3px solid #e5e7eb;border-top-color:#0053eb;border-radius:50%;animation:spin 0.85s linear infinite;}
.sbc-qr-generating-label{font-size:0.95rem;font-weight:600;color:#4b5563;letter-spacing:0.02em;animation:sbc-generating-pulse 1.1s ease-in-out infinite;}
@keyframes sbc-generating-pulse {
0%,
100%{opacity:0.55;}
50%{opacity:1;}
}
.sbc-qr-error{width:100%;max-width:100%;margin:0;padding:8px 10px;font-size:0.86rem;line-height:1.45;color:#b91c1c;text-align:center;word-break:break-word;}
.sbc-actions-inline{justify-content:flex-start;margin-top:8px;margin-bottom:12px;}
.sbc-generate-row{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin-bottom:0;}
.sbc-workbench .btn{padding:6px 14px;font-size:0.8125rem;font-weight:600;margin:4px;border-radius:3px;box-shadow:none;}
.sbc-workbench .btn:hover{transform:none;background:#3367d6;}
.sbc-workbench .btn:active{background:#0046c7;}
.sbc-workbench .button-group{gap:8px;margin-top:10px;flex-wrap:wrap;justify-content:flex-start;}
.sbc-actions-below-qr{margin-top:12px;margin-bottom:0;}
.sbc-qr-options{margin-bottom:4px;}
.sbc-linear-options{margin-top:4px;}
.sbc-hrt-check-label{display:flex;align-items:center;gap:8px;margin:0;font-size:0.82rem;color:#374151;flex:1;min-width:0;cursor:pointer;}
.sbc-hrt-check-label input{flex-shrink:0;}
.sbc-linear-hrt-row .sbc-label{flex:0 0 5.4rem;}
.sbc-redecode-in-upload{position:absolute;right:10px;bottom:10px;z-index:4;margin:0;font-size:0.72rem;padding:5px 10px;pointer-events:auto;}
.sbc-inline-field{display:flex;flex-direction:row;align-items:center;gap:8px;margin-bottom:8px;}
.sbc-inline-field .sbc-label{flex:0 0 5.4rem;margin-bottom:0;font-size:0.82rem;white-space:nowrap;}
.sbc-inline-field .sbc-select,
.sbc-inline-field .sbc-input{flex:1;min-width:0;}
.sbc-data-label-row{margin-bottom:4px;}
.sbc-data-label-row .sbc-label{margin-bottom:0;}
.sbc-field.sbc-data-field .sbc-textarea{margin-top:0;}
.sbc-hint-compact{font-size:0.82rem;margin-top:6px;}
.sbc-code-size-field{margin-bottom:10px;}
.sbc-code-size-row{display:flex;flex-direction:row;align-items:center;gap:8px;width:100%;min-width:0;margin-top:10px;}
.sbc-code-size-row .sbc-label{flex:0 0 auto;margin-bottom:0;font-size:0.82rem;white-space:nowrap;}
.sbc-code-size-row .sbc-range{flex:1;min-width:0;}
.sbc-code-size-row .sbc-size-readout{flex:0 0 auto;margin:0;text-align:right;font-size:0.82rem;font-variant-numeric:tabular-nums;color:#6b7280;white-space:nowrap;}
.sbc-type-list{display:flex;flex-direction:column;gap:8px;width:100%;}
.sbc-type-list-inline{gap:6px;margin-bottom:2px;}
.sbc-type-wrap-inline{display:flex;flex-wrap:wrap;align-items:center;gap:5px 6px;width:100%;}
.sbc-type-wrap-inline .sbc-type-btn{flex:0 1 auto;margin:0;padding:3px 8px;font-size:0.72rem;line-height:1.25;border-radius:4px;white-space:nowrap;}
.sbc-type-wrap-inline .sbc-type-btn.active{box-shadow:0 0 0 1px #0053eb;}
.sbc-type-line{display:flex;flex-direction:column;align-items:stretch;width:100%;gap:4px;}
.sbc-type-line .sbc-type-group{margin-top:0;margin-bottom:0;width:100%;display:block;}
.sbc-type-line .sbc-type-wrap{margin-bottom:0;width:100%;display:flex;flex-direction:column;flex-wrap:nowrap;gap:0;}
.sbc-type-line .sbc-type-btn{width:100%;box-sizing:border-box;text-align:left;margin:0;border-radius:0;border:1px solid #d1d5db;border-bottom:none;}
.sbc-type-line .sbc-type-wrap .sbc-type-btn:last-child:not(.active){border-bottom:1px solid #d1d5db;}
.sbc-type-line .sbc-type-btn.active{position:relative;z-index:1;border-color:#0053eb;border-bottom:1px solid #0053eb;}
.sbc-type-line .sbc-type-btn.active + .sbc-type-btn{border-top:none;}
.sbc-card-title-row{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px;}
.sbc-card-title-row .preview-title{margin-bottom:0;}
.sbc-help-btn{flex-shrink:0;width:28px;height:28px;padding:0;margin:0;border-radius:50%;border:1px solid #c7cdd6;background:#fff;color:#4b5563;font-size:0.95rem;font-weight:700;line-height:1;cursor:pointer;}
.sbc-help-btn:hover{background:#f3f4f6;border-color:#9ca3af;}
.sbc-help-dialog{max-width:min(520px,calc(100vw - 32px));padding:0;border:1px solid #d1d5db;border-radius:10px;box-shadow:0 16px 48px rgba(0,0,0,0.18);}
.sbc-help-dialog::backdrop{background:rgba(15,23,42,0.35);}
.sbc-help-dialog-inner{position:relative;padding:18px 20px 20px;}
.sbc-help-close{position:absolute;top:10px;right:10px;width:32px;height:32px;border:none;background:transparent;font-size:1.35rem;line-height:1;color:#6b7280;cursor:pointer;}
.sbc-help-close:hover{color:#111827;}
.sbc-help-dialog-title{margin:0 36px 12px 0;font-size:1.05rem;}
.sbc-help-body{font-size:0.9rem;color:#374151;line-height:1.55;}
.sbc-help-body p{margin:0 0 10px;}
.sbc-help-body p:last-child{margin-bottom:0;}
.sbc-workbench .sbc-type-btn{padding:4px 7px;font-size:0.78rem;}
.sbc-workbench .sbc-type-wrap-inline .sbc-type-btn{padding:3px 8px;font-size:0.72rem;line-height:1.25;}
.sbc-empty{color:#6b7280;text-align:center;max-width:520px;line-height:1.5;}
.sbc-type-group{margin-top:8px;margin-bottom:6px;font-size:0.85rem;font-weight:700;color:#6b7280;text-transform:uppercase;letter-spacing:0.04em;}
.sbc-type-wrap{display:flex;flex-wrap:wrap;gap:3px;margin-bottom:8px;}
.sbc-type-btn{border:1px solid #d1d5db;background:#fff;color:#111827;border-radius:6px;padding:7px 10px;font-size:0.88rem;cursor:pointer;}
.sbc-type-btn.active{border-color:#0053eb;background:#e8f0ff;color:#0053eb;}
.sbc-type-btn.readonly{color:#6b7280;}
.sbc-gen-panel .sbc-actions-below-qr{margin-top:auto;}
/* Image Text OCR page — reuse SBC chrome, two-column workbench */
.ito-workbench{grid-template-columns:minmax(0,1fr) minmax(0,1.35fr);}
.ito-result-panel{min-width:0;display:flex;flex-direction:column;height:100%;min-height:0;}
.ito-result-panel .preview-title{flex-shrink:0;}
.ito-text-field{flex:1 1 auto;display:flex;flex-direction:column;min-height:0;margin-bottom:10px;}
.ito-text-field .ito-textarea{flex:1 1 auto;min-height:220px;}
.ito-meta{font-size:0.78rem;color:#6b7280;font-weight:500;margin-left:auto;}
.ito-actions{flex-shrink:0;margin-top:auto;}
.page-ito .sbc-decode-status #itoAlert.sbc-upload-alert{margin-top:0;}
.page-ito .sbc-decode-status .loading.sbc-decode-loading{padding:0;border:none;background:transparent;}
.page-ito .sbc-decode-status .loading.sbc-decode-loading.active{display:flex;flex-direction:row;align-items:center;gap:14px;justify-content:flex-start;padding:10px 16px;margin:0;border-radius:10px;border:1px solid #dee2e6;background:#f8f9fa;box-sizing:border-box;text-align:left;}
.page-ito .sbc-decode-status .loading.sbc-decode-loading.active .spinner{margin:0;flex-shrink:0;}
.page-ito .sbc-decode-status .loading.sbc-decode-loading .loading-text{margin:0;font-size:calc(1rem - 2px);color:#495057;}
.page-ito #itoAlert.sbc-upload-alert{padding:10px 16px;font-size:calc(1rem - 2px);line-height:1.45;}
.page-ito #itoAlert.sbc-upload-alert.active{display:flex;flex-direction:row;align-items:flex-start;gap:10px;}
.page-ito #itoAlert .sbc-upload-alert-msg{flex:1;min-width:0;}
.page-ito #itoAlert .sbc-alert-close{flex-shrink:0;margin:-2px -4px 0 0;padding:0 6px;border:none;background:transparent;color:inherit;opacity:0.65;font-size:1.25rem;line-height:1;cursor:pointer;border-radius:4px;}
.page-ito #itoAlert .sbc-alert-close:hover{opacity:1;background:rgba(0,0,0,0.06);}
#itoUpload.sbc-has-preview .sbc-upload-hint-row{opacity:0;visibility:hidden;}
#itoUpload.sbc-has-preview:hover .sbc-upload-hint-row,#itoUpload.sbc-has-preview:focus-within .sbc-upload-hint-row,#itoUpload.sbc-has-preview.dragover .sbc-upload-hint-row{opacity:1;visibility:visible;}
.sbc-decode-status:has(#itoAlert.active),
.sbc-decode-status:has(#itoLoading.active){margin:10px 0 12px;}
@media (max-width: 1200px) {
.sbc-workbench{grid-template-columns:1fr;min-height:0;}
.ito-workbench{grid-template-columns:1fr;}
.sbc-upload-column .sbc-upload-preview{max-height:280px;flex:0 1 auto;}
.sbc-row{grid-template-columns:1fr;}
}