:root{
  --app-page-background:#f6f7f9;
  --app-surface:#ffffff;
  --app-surface-alt:#f8fafc;
  --app-text:#222222;
  --app-muted-text:#475569;
  --app-border:#d1d5db;
  --app-header-background:#1f2937;
  --app-header-text:#ffffff;
  --app-navigation-icons:#ffffff;
  --app-section-title:#2bff00;
  --app-glow:#0dff00;
}

html,body{min-height:100%;background:var(--app-page-background);color:var(--app-text)}
body{margin:0}
a{color:var(--bs-link-color)}
h1,h2,h3,h4,h5,h6,label,.form-label,.form-check-label{color:var(--app-text)}
.text-muted,.text-muted-themed,.form-text{color:var(--app-muted-text)!important}
.form-text{font-size:.8rem}

/* Toolbar and embedded SVG icons */
.pilot-toolbar{background:var(--app-header-background)!important;color:var(--app-header-text);border-bottom:1px solid var(--app-border)}
.pilot-toolbar .navbar-brand,.pilot-toolbar .nav-link{color:var(--app-header-text)!important}
.pilot-toolbar .navbar-brand{font-weight:800;white-space:nowrap}
.app-version-badge{display:inline-flex;align-items:center;margin-left:.45rem;padding:.18rem .42rem;border:1px solid color-mix(in srgb,var(--app-header-text) 38%,transparent);border-radius:999px;color:var(--app-header-text);font-size:.72rem;font-weight:800;line-height:1}
.toolbar-link{display:inline-flex;align-items:center;gap:.38rem;border-radius:.45rem;margin:.12rem;padding:.5rem .62rem!important;font-weight:650;white-space:nowrap}
.toolbar-link:hover,.toolbar-link:focus{background:color-mix(in srgb,var(--app-header-text) 13%,transparent)}
.toolbar-link.active{background:color-mix(in srgb,var(--app-glow) 18%,transparent);box-shadow:0 0 0 1px color-mix(in srgb,var(--app-glow) 65%,transparent),0 0 10px color-mix(in srgb,var(--app-glow) 45%,transparent)}
.app-icon,.toolbar-icon,.brand-icon,.menu-card-icon,.heading-icon{display:inline-block;flex:0 0 auto;vertical-align:-.125em}
.toolbar-icon{width:1.05rem;height:1.05rem;color:var(--app-navigation-icons)}
.brand-icon{width:1.45rem;height:1.45rem;color:var(--app-navigation-icons)}
.menu-card-icon{width:2rem;height:2rem;color:var(--bs-primary)}
.heading-icon{width:1.4rem;height:1.4rem;color:var(--app-section-title)}
.navbar-toggler{border-color:color-mix(in srgb,var(--app-header-text) 48%,transparent)}

/* Theme-aware surfaces */
.card{background:var(--app-surface);color:var(--app-text);border-color:var(--app-border);box-shadow:0 1px 4px #0001}
.card-header,.card-footer{background:var(--app-surface-alt);color:var(--app-text);border-color:var(--app-border)}
.table{--bs-table-color:var(--app-text);--bs-table-bg:var(--app-surface);--bs-table-border-color:var(--app-border);--bs-table-striped-color:var(--app-text);--bs-table-striped-bg:color-mix(in srgb,var(--app-surface-alt) 82%,var(--app-border) 18%);--bs-table-hover-color:var(--app-text);--bs-table-hover-bg:color-mix(in srgb,var(--app-surface-alt) 72%,var(--app-glow) 10%)}
.table td,.table th{vertical-align:middle;border-color:var(--app-border)}
.form-control,.form-select,.form-check-input,textarea,input,select{background-color:var(--app-surface-alt);color:var(--app-text);border-color:var(--app-border)}
.form-control:focus,.form-select:focus,.form-check-input:focus{background-color:var(--app-surface-alt);color:var(--app-text);border-color:var(--app-glow);box-shadow:0 0 0 .2rem color-mix(in srgb,var(--app-glow) 22%,transparent)}
.form-control::placeholder,textarea::placeholder{color:var(--app-muted-text);opacity:.9}
.form-control:disabled,.form-control[readonly],.form-select:disabled{background-color:color-mix(in srgb,var(--app-surface-alt) 88%,var(--app-border) 12%);color:var(--app-muted-text)}
.modal-content,.dropdown-menu{background:var(--app-surface);color:var(--app-text);border-color:var(--app-border)}
.dropdown-item{color:var(--app-text)}
.dropdown-item:hover,.dropdown-item:focus{background:var(--app-surface-alt);color:var(--app-text)}

/* Imported Event Tracker status color hooks */
.alert-success{background:var(--status-color-done);color:var(--status-text-done);border-color:color-mix(in srgb,var(--status-color-done) 72%,#000 28%)}
.alert-danger{background:var(--status-color-not-done);color:var(--status-text-not-done);border-color:color-mix(in srgb,var(--status-color-not-done) 72%,#000 28%)}
.alert-warning{background:var(--status-color-upcoming);color:var(--status-text-upcoming);border-color:color-mix(in srgb,var(--status-color-upcoming) 72%,#000 28%)}
.alert-info{background:var(--status-color-skipped);color:var(--status-text-skipped);border-color:color-mix(in srgb,var(--status-color-skipped) 72%,#000 28%)}

.menu-card{text-decoration:none;color:inherit}
.menu-card .card{transition:outline-color .15s ease,transform .15s ease,box-shadow .15s ease}
.menu-card .card:hover,.menu-card .card:focus-within{outline:2px solid var(--app-glow);transform:translateY(-1px);box-shadow:0 0 14px color-mix(in srgb,var(--app-glow) 34%,transparent)}
.menu-card h2{color:var(--app-text)}

/* Settings and Event Tracker color profile components */
.settings-main-title,.settings-section-title{color:var(--app-section-title)!important;font-weight:800}
.settings-section{border-color:var(--app-border)}
.color-profile-toolbar{display:flex;align-items:flex-end;gap:.75rem;flex-wrap:wrap;padding:.8rem;border:1px solid var(--app-border);border-radius:.6rem;background:var(--app-surface-alt)}
.color-toolbar-form{display:flex;align-items:flex-end;gap:.55rem;flex-wrap:wrap;margin:0}
.color-toolbar-form label{min-width:220px}
.saved-profile-management{padding:.8rem;border:1px solid var(--app-border);border-radius:.6rem;background:var(--app-surface-alt)}
.color-swatch-section{margin:.9rem 0;padding:.9rem;border:1px solid var(--app-border);border-radius:.65rem;background:var(--app-surface-alt)}
.status-color-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:.65rem}
.status-color-control{display:grid;grid-template-columns:minmax(0,1fr) 3.25rem;grid-template-areas:"label picker" "code picker";align-items:center;gap:.2rem .65rem;margin:0;padding:.65rem;border:1px solid var(--app-border);border-radius:.5rem;background:var(--app-surface);color:var(--app-text)}
.status-color-control span{grid-area:label;font-weight:700;line-height:1.2}
.status-color-control input[type=color]{grid-area:picker;width:3.25rem;height:3rem;padding:.15rem;border:1px solid var(--app-border);border-radius:.45rem;background:var(--app-surface-alt);cursor:pointer}
.status-color-control code{grid-area:code;width:max-content;padding:.12rem .3rem;border-radius:.25rem;background:var(--app-surface-alt);color:var(--app-muted-text)}
.calendar-shadow-options{margin:.85rem 0 0;padding:.8rem;border:1px solid var(--app-border);border-radius:.55rem;background:var(--app-surface);color:var(--app-text)}
.calendar-shadow-options legend{float:none;width:auto;padding:0 .35rem;color:var(--app-section-title);font-size:1rem;font-weight:800}
.calendar-shadow-number-grid{display:grid;grid-template-columns:repeat(3,minmax(180px,1fr));gap:.65rem;margin-top:.65rem}
.calendar-shadow-number-grid label{display:flex;align-items:center;gap:.4rem;margin:0}
.calendar-shadow-number-grid input{width:5.5rem}

@media(max-width:991.98px){
  .app-version-badge{margin-right:auto}
  .toolbar-link{margin:.15rem 0}
}
@media(max-width:720px){
  .calendar-shadow-number-grid{grid-template-columns:1fr}
  .color-toolbar-form{width:100%}
  .color-toolbar-form label{flex:1 1 100%;min-width:0}
}

/* V004 account linking and User Management */
.account-summary-card,.hello-account-card,.user-management-card{border-color:var(--app-border)}
.account-details-grid{display:grid;grid-template-columns:minmax(150px,220px) minmax(0,1fr);gap:.45rem 1rem;margin:0}
.account-details-grid dt{font-weight:800;color:var(--app-muted-text)}
.account-details-grid dd{margin:0;overflow-wrap:anywhere}
.hello-link-status{margin-top:.75rem;padding:1rem;border:1px solid var(--app-border);border-radius:.65rem;background:var(--app-surface-alt)}
.hello-link-status.linked{border-left:6px solid var(--status-color-done)}
.hello-link-status.unlinked{border-left:6px solid var(--status-color-upcoming)}
.user-management-list{display:block}
.user-management-card .badge{font-size:.78rem}
.user-management-card details{padding:.75rem;border:1px solid var(--app-border);border-radius:.55rem;background:var(--app-surface-alt)}
.user-management-card summary{cursor:pointer;font-weight:800;color:var(--app-text)}
.user-editor-form{padding-bottom:.25rem}
.account-profile-form{margin-top:1rem;padding-top:1rem;border-top:1px solid var(--app-border)}

@media(max-width:640px){
  .account-details-grid{grid-template-columns:1fr;gap:.1rem}
  .account-details-grid dd{margin-bottom:.65rem}
}

/* V006 scan / OCR workflow */
.entry-scan-card,.compression-card,.scan-properties,.trash-card{border-color:var(--app-border)}
.scan-upload-grid{display:block}
.scan-drop-zone{border:2px dashed color-mix(in srgb,var(--app-glow) 45%,var(--app-border));border-radius:.85rem;padding:1.4rem;background:color-mix(in srgb,var(--app-surface-alt) 82%,var(--app-glow) 6%);text-align:center;transition:border-color .15s ease,box-shadow .15s ease,background .15s ease}
.scan-drop-zone.dragover{border-color:var(--app-glow);box-shadow:0 0 0 .2rem color-mix(in srgb,var(--app-glow) 22%,transparent);background:color-mix(in srgb,var(--app-surface-alt) 75%,var(--app-glow) 10%)}
.scan-drop-icon{font-size:2rem;line-height:1;margin-bottom:.4rem}
.scan-file-input{max-width:340px}
.scan-status .alert{margin-bottom:0}
.scan-preview-shell{padding:1rem;border:1px solid var(--app-border);border-radius:.75rem;background:var(--app-surface-alt)}
.scan-preview-stage{position:relative;width:100%;overflow:hidden;border-radius:.65rem;background:color-mix(in srgb,var(--app-surface) 75%,#000 25%)}
.scan-preview-stage img{display:block;width:100%;height:auto;max-width:100%}
.scan-image-tools .btn,.compression-card .btn{white-space:nowrap}
.btn-ocr{background:#c026d3;border-color:#c026d3;color:#fff}
.btn-ocr:hover,.btn-ocr:focus{background:#a21caf;border-color:#a21caf;color:#fff}
.scan-crop-overlay{position:absolute;inset:0;cursor:crosshair;background:rgba(0,0,0,.12)}
.scan-crop-selection{position:absolute;border:2px solid #0d6efd;background:rgba(13,110,253,.12);box-shadow:0 0 0 9999px rgba(0,0,0,.2)}
.crop-handle{position:absolute;width:14px;height:14px;border-radius:50%;background:#0d6efd;border:2px solid #fff}
.crop-handle-nw{top:-8px;left:-8px;cursor:nwse-resize}
.crop-handle-ne{top:-8px;right:-8px;cursor:nesw-resize}
.crop-handle-sw{bottom:-8px;left:-8px;cursor:nesw-resize}
.crop-handle-se{bottom:-8px;right:-8px;cursor:nwse-resize}
.btn-crop-confirm{min-width:180px;font-weight:700}
.scan-ocr-feedback pre{max-height:12rem;overflow:auto;margin-top:.75rem;padding:.8rem;border:1px solid var(--app-border);border-radius:.5rem;background:var(--app-surface-alt);color:var(--app-text)}
.ocr-populated{animation:ocrPulse 1.35s ease-in-out infinite alternate;border-color:#d946ef!important;box-shadow:0 0 0 .2rem rgba(217,70,239,.16),0 0 12px rgba(217,70,239,.45)!important}
@keyframes ocrPulse{from{box-shadow:0 0 0 .08rem rgba(217,70,239,.18),0 0 4px rgba(217,70,239,.25)}to{box-shadow:0 0 0 .22rem rgba(217,70,239,.12),0 0 15px rgba(217,70,239,.55)}}

@media(max-width:767.98px){
  .scan-image-tools{justify-content:flex-start}
  .scan-file-input{max-width:100%}
}

/* V008 OCR Manager — corrected interaction and compression layout */
.ocr-template-section,.ocr-region-stage-wrapper{border-color:var(--app-border)}
.ocr-save-dirty{animation:ocrSavePulse 1.1s ease-in-out infinite alternate;box-shadow:0 0 0 .2rem rgba(13,110,253,.15),0 0 15px rgba(13,110,253,.55)!important}
@keyframes ocrSavePulse{from{transform:scale(1);filter:brightness(1)}to{transform:scale(1.035);filter:brightness(1.18)}}
.ocr-template-entry-select{min-width:min(100%,320px)}

#ocr-background-collapsed{padding:.9rem;border:1px solid var(--app-border);border-radius:.65rem;background:var(--app-surface-alt)}
.ocr-collapsed-summary{display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap}
.ocr-collapsed-properties{display:flex;align-items:center;gap:.65rem 1.2rem;flex-wrap:wrap}
.ocr-crop-top-actions{display:flex;align-items:center;justify-content:center;gap:.65rem;margin-bottom:.75rem}
.scan-preview-shell,.ocr-region-stage-wrapper{max-width:100%;overflow:hidden}
.scan-preview-stage{max-width:100%;overflow:hidden}
.scan-preview-stage img{max-width:100%;height:auto;object-fit:contain}
.scan-crop-overlay{touch-action:none;z-index:4}
.scan-crop-selection{touch-action:none;z-index:5;cursor:move}
.crop-handle{z-index:7;touch-action:none;width:18px;height:18px}
.crop-handle-nw{top:-10px;left:-10px}
.crop-handle-ne{top:-10px;right:-10px}
.crop-handle-sw{bottom:-10px;left:-10px}
.crop-handle-se{bottom:-10px;right:-10px}

.ocr-compression-description{padding:.65rem .75rem;border:1px solid var(--app-border);border-radius:.5rem;background:var(--app-surface-alt);font-weight:650}
.ocr-compression-bubble{position:absolute;right:1rem;bottom:1rem;z-index:10;max-width:min(90%,420px);padding:.85rem 1rem;border:2px solid #0d6efd;border-radius:1rem;background:#dbeafe;color:#0b2e59;font-weight:800;box-shadow:0 12px 28px rgba(13,110,253,.28);opacity:0;transform:translateY(12px) scale(.96);transition:opacity .25s ease,transform .25s ease}
.ocr-compression-bubble.ocr-compression-bubble-show{opacity:1;transform:translateY(0) scale(1);animation:ocrBubblePulse .75s ease-in-out 2 alternate}
@keyframes ocrBubblePulse{from{box-shadow:0 12px 28px rgba(13,110,253,.28)}to{box-shadow:0 12px 34px rgba(13,110,253,.55),0 0 0 .3rem rgba(13,110,253,.12)}}

.ocr-region-stage-wrapper{padding:.75rem;border:1px solid var(--app-border);border-radius:.75rem;background:var(--app-surface-alt);max-width:100%}
.ocr-region-toolbar{min-height:2.2rem}
.ocr-overlay-view-controls,.ocr-magnification-controls{min-height:2rem}
.ocr-overlay-view-controls .form-check{padding:.35rem .55rem .35rem 2rem;border:1px solid var(--app-border);border-radius:.45rem;background:var(--app-surface)}
#ocr-zoom-select{width:92px}
.ocr-region-viewport{width:100%;max-width:100%;max-height:72vh;overflow:auto;border:1px solid var(--app-border);border-radius:.65rem;background:color-mix(in srgb,var(--app-surface) 75%,#000 25%)}
.ocr-region-stage{position:relative;width:100%;min-width:280px;min-height:240px;overflow:visible;background:transparent;transform-origin:top left}
.ocr-region-stage.ocr-no-image::before{content:'Upload or load a background image to define OCR fields.';position:absolute;inset:0;z-index:1;display:grid;place-items:center;padding:2rem;color:var(--app-muted-text);text-align:center;background:var(--app-surface-alt)}
.ocr-region-stage img{position:relative;z-index:1;display:block;width:100%;height:auto;max-width:none;object-fit:contain}
#ocr-region-layer{position:absolute;inset:0;z-index:3;pointer-events:auto;touch-action:none}
.ocr-template-region{position:absolute;z-index:4;min-width:28px;min-height:28px;border:2px solid #0d6efd;background:rgba(13,110,253,.12);cursor:move;touch-action:none;box-sizing:border-box}
.ocr-template-region.ocr-region-label{border-color:#fd7e14;background:rgba(253,126,20,.13)}
.ocr-template-region.selected{z-index:6;box-shadow:0 0 0 3px rgba(220,53,69,.38),0 0 12px rgba(220,53,69,.55)}
.ocr-template-region.locked{cursor:not-allowed;border-style:dashed}
.ocr-region-title{position:absolute;left:3px;top:3px;z-index:9;width:calc(100% - 33px);min-width:72px;max-width:230px;height:22px;padding:2px 6px;border:1px solid color-mix(in srgb,var(--app-border) 82%,transparent);border-radius:.3rem;background:color-mix(in srgb,var(--app-surface) 76%,transparent);color:var(--app-text);font-size:.75rem;font-weight:700;pointer-events:none;opacity:.88;backdrop-filter:blur(2px);transition:opacity .14s ease,visibility .14s ease}
.ocr-region-lock{position:absolute;right:3px;top:3px;z-index:10;width:24px;height:22px;padding:0;border:1px solid color-mix(in srgb,var(--app-border) 82%,transparent);border-radius:.3rem;background:color-mix(in srgb,var(--app-surface) 78%,transparent);color:var(--app-text);line-height:1;cursor:pointer;opacity:.9;backdrop-filter:blur(2px);transition:opacity .14s ease,visibility .14s ease}
.ocr-descriptions-hover-only .ocr-region-title,.ocr-descriptions-hover-only .ocr-region-lock{opacity:0;visibility:hidden}
.ocr-descriptions-hover-only .ocr-template-region:hover .ocr-region-title,.ocr-descriptions-hover-only .ocr-template-region:hover .ocr-region-lock,.ocr-descriptions-hover-only .ocr-template-region:focus-within .ocr-region-title,.ocr-descriptions-hover-only .ocr-template-region:focus-within .ocr-region-lock{opacity:.92;visibility:visible}
.ocr-hide-overlays .ocr-template-region,.ocr-template-region.ocr-region-filtered{opacity:0!important;visibility:hidden!important;pointer-events:none!important}
.ocr-resize-handle{position:absolute;z-index:11;width:18px;height:18px;border-radius:50%;background:#0d6efd;border:2px solid #fff;touch-action:none}
.ocr-region-label .ocr-resize-handle{background:#fd7e14}
.ocr-resize-handle.nw{left:-10px;top:-10px;cursor:nwse-resize}
.ocr-resize-handle.ne{right:-10px;top:-10px;cursor:nesw-resize}
.ocr-resize-handle.sw{left:-10px;bottom:-10px;cursor:nesw-resize}
.ocr-resize-handle.se{right:-10px;bottom:-10px;cursor:nwse-resize}
.ocr-defined-field-list{display:grid;gap:.55rem}
.ocr-defined-field-row{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.65rem .75rem;border:1px solid var(--app-border);border-radius:.5rem;background:var(--app-surface-alt)}
.ocr-defined-field-row.ocr-field-isolated{border-color:#0d6efd;box-shadow:0 0 0 .15rem rgba(13,110,253,.12)}
.ocr-defined-field-actions{display:flex;align-items:center;justify-content:flex-end;gap:.5rem;flex-wrap:wrap}

@media(max-width:767.98px){
  .ocr-collapsed-summary,.ocr-collapsed-properties{align-items:flex-start;flex-direction:column}
  .ocr-region-viewport{max-height:62vh}
  .ocr-region-title{max-width:150px;font-size:.65rem}
  .ocr-region-toolbar{align-items:flex-start!important}
  .ocr-overlay-view-controls,.ocr-magnification-controls{width:100%}
  .ocr-defined-field-row{align-items:flex-start;flex-direction:column}
}

/* V010 Add Logbook Entry scan workflow */
.scan-preview-shell{position:relative;max-width:100%;overflow:hidden}
.scan-preview-viewport{max-width:100%;overflow:auto;padding:.25rem;border-radius:.65rem;background:color-mix(in srgb,var(--app-surface) 70%,#000 30%)}
.scan-preview-stage{position:relative;min-width:240px;max-width:none;overflow:hidden;margin:0 auto;border-radius:.55rem;background:#111;transition:width .18s ease}
.scan-preview-stage img{display:block;width:100%;height:auto;max-width:none;user-select:none;-webkit-user-drag:none}
.scan-zoom-controls{display:flex;align-items:center;gap:.4rem;flex-wrap:wrap}
#scan-zoom-select{width:auto;min-width:145px}
.scan-crop-top-actions{display:flex;align-items:center;gap:.55rem}
.scan-crop-overlay{touch-action:none;z-index:4}
.scan-crop-selection{touch-action:none;z-index:5;cursor:move}
.crop-handle{z-index:7;touch-action:none;width:18px;height:18px}
.crop-handle-nw{top:-10px;left:-10px}
.crop-handle-ne{top:-10px;right:-10px}
.crop-handle-sw{bottom:-10px;left:-10px}
.crop-handle-se{bottom:-10px;right:-10px}
.scan-compression-description{padding:.7rem .8rem;border:1px solid var(--app-border);border-radius:.55rem;background:var(--app-surface-alt);font-weight:700}
.scan-compression-bubble{position:absolute;right:1rem;bottom:1rem;z-index:12;max-width:min(90%,520px);padding:.9rem 1.1rem;border:2px solid #0d6efd;border-radius:1rem;background:#dbeafe;color:#0b2e59;font-weight:850;box-shadow:0 12px 30px rgba(13,110,253,.3);opacity:0;transform:translateY(14px) scale(.94);transition:opacity .28s ease,transform .28s ease}
.scan-compression-bubble.scan-compression-bubble-show{opacity:1;transform:translateY(0) scale(1);animation:scanBubblePulse .72s ease-in-out 2 alternate}
@keyframes scanBubblePulse{from{box-shadow:0 12px 30px rgba(13,110,253,.28)}to{box-shadow:0 12px 38px rgba(13,110,253,.65),0 0 0 .28rem rgba(13,110,253,.12)}}
#scan-compress-button .spinner-border,#scan-ocr-button .spinner-border{margin-right:.4rem}
.scan-image-tools .btn:disabled{opacity:.52;filter:grayscale(.35)}

@media(max-width:767.98px){
  .scan-preview-stage{min-width:220px}
  .scan-zoom-controls{width:100%;justify-content:flex-end}
  #scan-zoom-select{min-width:130px}
}


/* V011 current user and User Management defaults */
.toolbar-current-user{display:inline-flex;align-items:center;gap:.35rem;margin:.12rem .25rem .12rem .55rem;padding:.38rem .58rem;border:1px solid color-mix(in srgb,var(--app-header-text) 34%,transparent);border-radius:999px;color:var(--app-header-text);font-size:.84rem;font-weight:750;white-space:nowrap}
.save-user-button.save-user-dirty{animation:saveUserPulse 1.05s ease-in-out infinite alternate;box-shadow:0 0 0 .2rem rgba(13,110,253,.18),0 0 16px rgba(13,110,253,.6)}
@keyframes saveUserPulse{from{transform:scale(1);filter:brightness(1)}to{transform:scale(1.04);filter:brightness(1.2)}}
@media(max-width:991.98px){.toolbar-current-user{margin:.25rem 0;align-self:flex-start}}

/* V012 Add Logbook Entry layout and controls */
.compression-card{overflow:hidden}
.compression-card-toggle{display:flex;width:100%;align-items:center;justify-content:space-between;gap:1rem;padding:1rem 1.1rem;border:0;border-bottom:1px solid transparent;background:var(--app-surface-alt);color:var(--app-text);text-align:left;font-weight:800}
.compression-card-toggle:hover,.compression-card-toggle:focus{background:color-mix(in srgb,var(--app-surface-alt) 86%,var(--app-glow) 8%)}
.compression-card-toggle[aria-expanded="true"]{border-bottom-color:var(--app-border)}
.compression-card-arrow{display:inline-grid;place-items:center;width:2rem;height:2rem;border:1px solid var(--app-border);border-radius:50%;background:var(--app-surface);color:var(--app-text);font-size:.9rem}
.compression-collapsed-actions{display:flex;align-items:center;gap:.8rem;flex-wrap:wrap;padding:.85rem 1.1rem;background:var(--app-surface)}
#scan-compress-defaults-button .spinner-border{margin-right:.4rem}

.entry-data-layout{display:grid;grid-template-columns:minmax(180px,25%) minmax(0,75%);gap:1.25rem;align-items:start}
.entry-data-image-column{position:sticky;top:1rem;min-width:0}
.entry-data-image-frame{display:grid;place-items:center;min-height:240px;max-height:72vh;overflow:auto;border:1px solid var(--app-border);border-radius:.75rem;background:color-mix(in srgb,var(--app-surface-alt) 78%,#000 22%)}
.entry-data-image-frame img{display:block;width:100%;height:auto;max-height:72vh;object-fit:contain}
.entry-data-image-placeholder{display:grid;place-items:center;min-height:240px;width:100%;padding:1rem;color:var(--app-muted-text);font-weight:750;text-align:center}
.entry-data-fields{min-width:0}
.entry-add-reference-button{min-width:2.8rem;font-size:1.35rem;font-weight:900;line-height:1}
.entry-existing-approach-list{display:flex;flex-wrap:wrap;gap:.45rem;max-height:240px;overflow:auto;padding:.75rem;border:1px solid var(--app-border);border-radius:.55rem;background:var(--app-surface-alt)}
.entry-existing-approach-item{display:inline-flex;align-items:center;padding:.3rem .55rem;border:1px solid var(--app-border);border-radius:999px;background:var(--app-surface);color:var(--app-text);font-size:.86rem}

/* Draw every combobox arrow using currentColor so it always matches the text. */
.form-select{
  --app-select-arrow-size:.42rem;
  appearance:none;
  -webkit-appearance:none;
  background-image:
    linear-gradient(45deg,transparent 50%,currentColor 50%),
    linear-gradient(135deg,currentColor 50%,transparent 50%);
  background-position:
    calc(100% - 1.05rem) 52%,
    calc(100% - .66rem) 52%;
  background-size:var(--app-select-arrow-size) var(--app-select-arrow-size),var(--app-select-arrow-size) var(--app-select-arrow-size);
  background-repeat:no-repeat;
  padding-right:2.35rem;
}
.form-select[multiple],.form-select[size]:not([size="1"]){background-image:none;padding-right:.75rem}

@media(max-width:991.98px){
  .entry-data-layout{grid-template-columns:1fr}
  .entry-data-image-column{position:static}
  .entry-data-image-frame{max-height:45vh}
  .entry-data-image-frame img{max-height:45vh}
}
@media(max-width:575.98px){
  .compression-collapsed-actions{align-items:flex-start;flex-direction:column}
}

/* V014 configurable Fields manager and operation controls */
.data-fields-table td{min-width:10rem}
.data-fields-table td:last-child{min-width:22rem}
.field-option-list{display:flex;flex-direction:column;gap:.4rem}
.field-option-row{display:flex;align-items:center;gap:.45rem;flex-wrap:wrap;padding:.42rem .55rem;border:1px solid var(--app-border);border-radius:.45rem;background:var(--app-surface-alt)}
.field-option-row>span{min-width:8rem;flex:1 1 auto;font-weight:650}
.field-default-input{max-width:22rem}
.field-reference-values{max-width:42rem;max-height:6.5rem;overflow:auto;padding:.45rem;border:1px solid var(--app-border);border-radius:.4rem;background:var(--app-surface-alt)}
.entry-operation-group{padding:.75rem;border:1px solid var(--app-border);border-radius:.55rem;background:var(--app-surface-alt)}
.entry-operation-group .form-check-label{font-weight:650}

/* V017 Report execution, multi-object WYSIWYG Report Builder, Reports Viewer, and asynchronous Fields manager */
.form-select,.form-select option{color:var(--app-text)}
.form-select{caret-color:currentColor}

.report-list-card{border:1px solid var(--app-border);border-radius:.7rem;background:var(--app-surface);overflow:hidden}
.report-list-row{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.85rem 1rem;border-bottom:1px solid var(--app-border)}
.report-list-row:last-child{border-bottom:0}
.report-list-name{min-width:0;flex:1 1 auto;font-weight:800;color:var(--app-text);text-decoration:none;overflow-wrap:anywhere}
.report-list-name:hover{text-decoration:underline}
.report-list-actions{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap}
.reports-inline-dialog{margin-top:1rem;padding:1rem;border:2px solid var(--app-border);border-radius:.65rem;background:var(--app-surface-alt);box-shadow:0 12px 28px color-mix(in srgb,#000 18%,transparent)}

.report-builder-section{overflow:hidden;border-color:var(--app-border)}
.report-builder-section-header{display:flex;width:100%;align-items:center;gap:.7rem;padding:.9rem 1rem;border:0;border-bottom:1px solid var(--app-border);background:var(--app-surface-alt);color:var(--app-text);font-size:1.15rem;font-weight:850;text-align:left}
.report-builder-section-header:hover,.report-builder-section-header:focus{background:color-mix(in srgb,var(--app-surface-alt) 88%,var(--app-glow) 12%)}
.report-builder-section-arrow{display:inline-grid;place-items:center;width:1.7rem;height:1.7rem;border:1px solid var(--app-border);border-radius:50%;background:var(--app-surface);color:var(--app-text);font-size:.72rem;flex:0 0 auto}
.report-builder-section-body{padding:1rem}
.report-section-collapsed .report-builder-section-body{display:none}
.report-config-subsection{padding:.9rem;border:1px solid var(--app-border);border-radius:.65rem;background:var(--app-surface-alt)}
.font-preview{margin-top:.45rem;padding:.55rem .7rem;border:1px solid var(--app-border);border-radius:.45rem;background:var(--app-surface);font-size:1.05rem;letter-spacing:.02em}
.report-save-button.report-save-dirty{animation:reportSavePulse 1s ease-in-out infinite alternate;box-shadow:0 0 0 .22rem color-mix(in srgb,var(--app-glow) 28%,transparent),0 0 20px color-mix(in srgb,var(--app-glow) 65%,transparent)}
@keyframes reportSavePulse{from{transform:scale(1);filter:brightness(1)}to{transform:scale(1.045);filter:brightness(1.24)}}

.report-rule-list{display:grid;gap:.55rem}
.report-rule-empty{padding:.85rem;border:1px dashed var(--app-border);border-radius:.55rem;color:var(--app-muted-text);background:var(--app-surface-alt)}
.report-rule-row{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.7rem .8rem;border:1px solid var(--app-border);border-radius:.55rem;background:var(--app-surface-alt)}
.report-inline-dialog{margin-top:1rem;padding:1rem;border:2px solid var(--app-border);border-radius:.65rem;background:var(--app-surface-alt);box-shadow:0 12px 30px color-mix(in srgb,#000 18%,transparent)}
.report-inline-dialog-header{margin-bottom:1rem;padding-bottom:.65rem;border-bottom:1px solid var(--app-border)}
.report-rule-checkbox-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:.5rem;padding:.75rem;border:1px solid var(--app-border);border-radius:.55rem;background:var(--app-surface)}
.report-rule-all-values{grid-column:1/-1;padding-bottom:.55rem;border-bottom:1px solid var(--app-border)}
.report-rule-value-option{margin:0}

.report-builder-palette{display:flex;align-items:stretch;gap:.75rem;flex-wrap:wrap;padding:.75rem;border:1px solid var(--app-border);border-radius:.6rem;background:var(--app-surface-alt)}
.report-builder-palette>div{min-width:min(100%,210px)}
.report-palette-object{min-width:130px;padding:.7rem 1rem;border:2px dashed #0d6efd;border-radius:.55rem;background:color-mix(in srgb,var(--app-surface) 88%,#0d6efd 12%);color:var(--app-text);font-weight:850;cursor:grab}
.report-palette-object:active{cursor:grabbing}
.report-format-toolbar{display:flex;align-items:end;gap:.45rem;flex-wrap:wrap;margin-bottom:.7rem;padding:.65rem;border:1px solid var(--app-border);border-radius:.55rem;background:var(--app-surface-alt)}
.report-layout-toolbar{display:flex;align-items:center;gap:.45rem;flex-wrap:wrap;padding:.5rem .6rem;border:1px solid var(--app-border);border-radius:.55rem;background:var(--app-surface-alt)}
.report-toolbar-group{display:inline-flex;align-items:center;gap:.25rem;padding-right:.35rem;border-right:1px solid var(--app-border)}
.report-toolbar-icon{width:1rem;height:1rem;display:block}
.report-icon-button,.report-zoom-label{display:inline-grid;place-items:center;min-width:32px;height:32px;padding:.25rem .45rem;border:1px solid var(--app-border);border-radius:.4rem;background:var(--app-surface);color:var(--app-text);line-height:1}
.report-icon-button:hover:not(:disabled),.report-icon-button:focus-visible:not(:disabled),.report-zoom-label:hover,.report-zoom-label:focus-visible{border-color:#0d6efd;background:color-mix(in srgb,var(--app-surface) 82%,#0d6efd 18%)}
.report-icon-button:disabled{opacity:.38;cursor:not-allowed}
.report-toggle-button.active,.report-toggle-button[aria-pressed="true"]{border-color:#0d6efd;background:#0d6efd;color:#fff;box-shadow:0 0 0 .15rem rgba(13,110,253,.16)}
.report-remove-selected{color:#dc3545}
.report-remove-selected:not(:disabled):hover{border-color:#dc3545;background:#dc3545;color:#fff}
.report-zoom-label{min-width:58px;font-size:.76rem;font-weight:800}
.report-preview-controls{display:flex;align-items:center;gap:.35rem;flex-wrap:wrap}
.report-preview-controls .form-check{display:inline-flex;align-items:center;gap:.35rem;padding:.25rem .45rem;border:1px solid var(--app-border);border-radius:.4rem;background:var(--app-surface)}
.report-preview-controls .form-check-input{margin:0}
.report-preview-position{min-width:58px;text-align:center;font-size:.78rem;font-weight:800;color:var(--app-muted-text)}
.report-canvas-help{margin-top:.35rem;color:var(--app-muted-text);font-size:.75rem}
.report-selection-lasso{position:absolute;z-index:30;border:1px dashed #0d6efd;background:rgba(13,110,253,.12);pointer-events:none}

.report-format-toolbar label{display:flex;align-items:center;gap:.35rem;margin:0;font-size:.82rem;font-weight:750}
.report-format-toolbar .form-select{min-width:90px}
.report-color-control input[type="color"]{width:42px;height:32px;padding:.12rem;border:1px solid var(--app-border);border-radius:.35rem;background:var(--app-surface)}
.report-existing-values{display:flex;flex-wrap:wrap;gap:.35rem;margin-top:.45rem;max-height:8.5rem;overflow:auto;padding:.35rem;border:1px solid var(--app-border);border-radius:.55rem;background:var(--app-surface)}
.report-existing-value-chip{display:inline-flex;align-items:center;gap:.35rem;max-width:100%;padding:.24rem .55rem;border:1px solid color-mix(in srgb,var(--app-border) 75%,#0d6efd 25%);border-radius:999px;background:var(--app-surface-alt);color:var(--app-text);font-size:.8rem;line-height:1.2;text-align:left}
.report-existing-value-chip:hover,.report-existing-value-chip:focus{border-color:#0d6efd;background:color-mix(in srgb,var(--app-surface) 84%,#0d6efd 16%)}
.report-existing-value-chip span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.report-existing-value-chip span:first-child{font-size:1rem;font-weight:900;line-height:1}

.report-paper-stage{position:relative;max-width:100%;min-height:150px;overflow:auto;resize:vertical;padding:.5rem;border:1px solid var(--app-border);border-radius:.65rem;background:var(--app-surface-alt);overscroll-behavior:contain;touch-action:none;cursor:default}
.report-paper-stage.report-stage-panning{cursor:grabbing;user-select:none}
.report-paper-zoom-shell{position:relative;width:max-content;height:max-content;min-width:1px;min-height:1px}
.report-paper-editor{display:grid;grid-template-columns:28px max-content;grid-template-rows:24px max-content;width:max-content;min-width:0}
.report-ruler-corner{grid-column:1;grid-row:1;border-right:1px solid #b8bec7;border-bottom:1px solid #b8bec7;background:#eef1f5}
.report-ruler{position:relative;overflow:hidden;background-color:#eef1f5;color:#30343b;font:9px/1 Arial,sans-serif;user-select:none}
.report-ruler-top{grid-column:2;grid-row:1;height:24px;border-bottom:1px solid #b8bec7;background-image:repeating-linear-gradient(to right,transparent 0,transparent calc(.125in - 1px),#9ba3ad calc(.125in - 1px),#9ba3ad .125in)}
.report-ruler-left{grid-column:1;grid-row:2;width:28px;border-right:1px solid #b8bec7;background-image:repeating-linear-gradient(to bottom,transparent 0,transparent calc(.125in - 1px),#9ba3ad calc(.125in - 1px),#9ba3ad .125in)}
.report-ruler-label{position:absolute;z-index:2;color:#20242a;font-weight:700}
.report-ruler-top .report-ruler-label{top:2px;transform:translateX(2px)}
.report-ruler-left .report-ruler-label{left:2px;transform:translateY(2px);writing-mode:horizontal-tb}
.report-layout-canvas{grid-column:2;grid-row:2;position:relative;box-sizing:border-box;overflow:hidden;border:1px solid #6f7680;border-radius:0;background-color:#fff;background-image:linear-gradient(to right,rgba(0,0,0,.055) 1px,transparent 1px),linear-gradient(to bottom,rgba(0,0,0,.055) 1px,transparent 1px),linear-gradient(to right,rgba(0,0,0,.11) 1px,transparent 1px),linear-gradient(to bottom,rgba(0,0,0,.11) 1px,transparent 1px);background-size:var(--report-grid-size,.0625in) var(--report-grid-size,.0625in),var(--report-grid-size,.0625in) var(--report-grid-size,.0625in),var(--report-grid-major-size,.25in) var(--report-grid-major-size,.25in),var(--report-grid-major-size,.25in) var(--report-grid-major-size,.25in);color:#111;font-family:var(--report-default-font,Arial,sans-serif);font-size:var(--report-default-size,11pt);box-shadow:0 2px 10px rgba(0,0,0,.18)}
.report-margin-guide{position:absolute;z-index:0;border:1px dashed rgba(220,53,69,.62);pointer-events:none}
.report-layout-object{position:absolute;z-index:1;min-width:18pt;min-height:12pt;box-sizing:border-box;border:1px solid rgba(13,110,253,.18);border-radius:0;background:transparent;color:#111;box-shadow:none;overflow:visible;touch-action:none}
.report-layout-object.selected{z-index:8;border-color:rgba(220,53,69,.92)!important;box-shadow:0 0 0 1px rgba(220,53,69,.32)}
.report-layout-object.primary-selected{box-shadow:0 0 0 2px rgba(220,53,69,.34)}
.report-layout-object-special{border-color:rgba(111,66,193,.2)}
.report-layout-object-aggregate{border-color:rgba(25,135,84,.2)}
.report-layout-object-field{border-color:rgba(253,126,20,.22);background:transparent}
.report-object-content{width:100%;height:100%;box-sizing:border-box;overflow:hidden;padding:1px;outline:none;background:transparent;line-height:1.08;white-space:normal;overflow-wrap:anywhere;scrollbar-width:none}
.report-object-content::-webkit-scrollbar{display:none}
.report-layout-object-field .report-object-content{display:flex;align-items:center;padding:1px;font-weight:800;user-select:none}
.report-object-move-handle{position:absolute;left:50%;bottom:-25px;z-index:12;width:22px;height:22px;padding:0;border:1px solid rgba(0,0,0,.42);border-radius:50%;background:#eef2ff;color:#111;box-shadow:0 1px 4px rgba(0,0,0,.28);cursor:move;touch-action:none;opacity:0;pointer-events:none}
.report-layout-object.selected .report-object-move-handle{opacity:1;pointer-events:auto}
.report-object-move-handle span{position:absolute;left:50%;top:50%;font-size:12px;line-height:1;transform:translate(-50%,-50%)}
.report-move-vertical{font-size:11px!important}
.report-object-resize-handle{position:absolute;z-index:11;display:block;opacity:0;pointer-events:none;touch-action:none}
.report-layout-object.selected .report-object-resize-handle{opacity:1;pointer-events:auto}
.report-object-resize-n,.report-object-resize-s{left:9px;right:9px;height:7px;cursor:ns-resize}
.report-object-resize-n{top:-4px}.report-object-resize-s{bottom:-4px}
.report-object-resize-e,.report-object-resize-w{top:9px;bottom:9px;width:7px;cursor:ew-resize}
.report-object-resize-e{right:-4px}.report-object-resize-w{left:-4px}
.report-object-resize-ne,.report-object-resize-se,.report-object-resize-sw,.report-object-resize-nw{width:10px;height:10px;border:1px solid #fff;border-radius:50%;background:#dc3545}
.report-object-resize-ne{right:-6px;top:-6px;cursor:nesw-resize}
.report-object-resize-se{right:-6px;bottom:-6px;cursor:nwse-resize}
.report-object-resize-sw{left:-6px;bottom:-6px;cursor:nesw-resize}
.report-object-resize-nw{left:-6px;top:-6px;cursor:nwse-resize}
.report-object-code{font-family:var(--report-monospace-font,"Courier New",monospace)!important}
.report-layout-object[data-block-style="h1"] .report-object-content{font-size:2em;font-family:var(--report-header-font,Arial,sans-serif);font-weight:800}
.report-layout-object[data-block-style="h2"] .report-object-content{font-size:1.7em;font-family:var(--report-header-font,Arial,sans-serif);font-weight:800}
.report-layout-object[data-block-style="h3"] .report-object-content{font-size:1.5em;font-family:var(--report-header-font,Arial,sans-serif);font-weight:750}
.report-layout-object[data-block-style="h4"] .report-object-content{font-size:1.3em;font-family:var(--report-header-font,Arial,sans-serif);font-weight:750}
.report-layout-object[data-block-style="h5"] .report-object-content{font-size:1.15em;font-family:var(--report-header-font,Arial,sans-serif);font-weight:700}
.report-layout-object[data-block-style="h6"] .report-object-content{font-size:1em;font-family:var(--report-header-font,Arial,sans-serif);font-weight:700}

.report-run-toolbar{position:sticky;top:.25rem;z-index:20;display:flex;align-items:center;justify-content:space-between;gap:.75rem;flex-wrap:wrap;margin-bottom:1rem;padding:.7rem;border:1px solid var(--app-border);border-radius:.6rem;background:color-mix(in srgb,var(--app-surface) 94%,transparent);backdrop-filter:blur(6px)}
.report-run-pages{display:grid;gap:1rem;justify-content:center;overflow:auto;padding:.5rem}
.report-run-page{position:relative;box-sizing:border-box;overflow:hidden;background:#fff;color:#111;box-shadow:0 3px 18px rgba(0,0,0,.25);font-family:var(--report-default-font,Arial,sans-serif)}
.report-run-margin-guide{position:absolute;border:1px dashed rgba(220,53,69,.26);pointer-events:none}
.report-run-object{position:absolute;box-sizing:border-box;overflow:hidden;border:1px solid transparent;border-radius:0;color:#111;line-height:1.08;overflow-wrap:anywhere}
.report-run-object-content{width:100%;height:100%;box-sizing:border-box;overflow:hidden;padding:1px}
.report-run-object-field{border-color:rgba(253,126,20,.24)}
.report-run-empty{padding:1rem;border:1px dashed var(--app-border);border-radius:.6rem;background:var(--app-surface-alt);text-align:center}
@media print{
  body{background:#fff!important}
  .pilot-toolbar,.report-run-toolbar,.alert,.app-version-badge{display:none!important}
  main.container{max-width:none!important;margin:0!important;padding:0!important}
  .report-run-pages{display:block;padding:0;overflow:visible}
  .report-run-page{break-after:page;margin:0;box-shadow:none}
  .report-run-page:last-child{break-after:auto}
  .report-run-margin-guide{display:none}
}

.fields-manager-toolbar{display:flex;align-items:end;gap:.65rem;flex-wrap:wrap;margin-bottom:1rem}
.fields-manager-toolbar .fields-search-control{min-width:min(100%,320px);flex:1 1 280px}
.fields-dialog-backdrop{position:fixed;inset:0;z-index:1060;display:grid;place-items:center;padding:1rem;background:rgba(0,0,0,.46)}
.fields-inline-dialog{width:min(760px,100%);max-height:90vh;overflow:auto;border:2px solid var(--app-border);border-radius:.7rem;background:var(--app-surface);color:var(--app-text);box-shadow:0 20px 60px rgba(0,0,0,.42)}
.fields-inline-dialog-header{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem;border-bottom:1px solid var(--app-border);background:var(--app-surface-alt)}
.fields-inline-dialog-body{padding:1rem}
.fields-inline-dialog-footer{display:flex;justify-content:flex-end;gap:.6rem;padding:1rem;border-top:1px solid var(--app-border);background:var(--app-surface-alt)}
.data-field-row-new{animation:dataFieldNewGlow 1.05s ease-in-out 4 alternate}
@keyframes dataFieldNewGlow{from{background:transparent;box-shadow:none}to{background:color-mix(in srgb,var(--app-glow) 20%,transparent);box-shadow:inset 0 0 18px color-mix(in srgb,var(--app-glow) 55%,transparent)}}
.field-ajax-status{position:sticky;top:.5rem;z-index:4}

@media(max-width:767.98px){
  .report-list-row,.report-rule-row{align-items:flex-start;flex-direction:column}
  .report-builder-palette{align-items:stretch;flex-direction:column}
  .report-builder-palette .btn{width:100%}
  .report-format-toolbar{align-items:stretch}
  .report-format-toolbar label{width:100%;justify-content:space-between}
  .report-format-toolbar .form-select{flex:1 1 auto}
  .report-layout-toolbar{align-items:stretch}
  .report-preview-controls{width:100%;margin-left:0!important}
  .report-preview-controls .form-check{flex:1 1 auto}
  .report-toolbar-group{border-right:0}
}

/* V018 unified full-page Report Builder canvas */
.report-floating-save-wrap{position:fixed;right:1.35rem;bottom:1.35rem;z-index:1050;display:flex;align-items:flex-end;justify-content:flex-end}
.report-floating-save{position:relative;min-width:88px;box-shadow:0 7px 24px rgba(0,0,0,.28)}
.report-active-section-bar{display:flex;align-items:center;gap:.65rem;flex-wrap:wrap;padding:.65rem .75rem;border:1px solid var(--app-border);border-radius:.6rem;background:var(--app-surface-alt)}
.report-section-tabs{display:inline-flex;align-items:center;gap:.25rem;flex-wrap:wrap}
.report-section-tab{padding:.38rem .65rem;border:1px solid var(--app-border);border-radius:999px;background:var(--app-surface);color:var(--app-text);font-size:.82rem;font-weight:800}
.report-section-tab:hover,.report-section-tab:focus-visible{border-color:#0d6efd;background:color-mix(in srgb,var(--app-surface) 84%,#0d6efd 16%)}
.report-section-tab.active,.report-section-tab[aria-pressed="true"]{border-color:#0d6efd;background:#0d6efd;color:#fff;box-shadow:0 0 0 .14rem rgba(13,110,253,.16)}
.report-active-section-hint{color:var(--app-muted-text);font-size:.78rem}
.report-builder-palette[data-unified-palette]{display:block}
.report-palette-text-controls,.report-palette-record-controls,.report-palette-aggregate-controls{display:flex;align-items:stretch;gap:.75rem;flex-wrap:wrap;width:100%}
.report-palette-text-controls>div,.report-palette-record-controls>div,.report-palette-aggregate-controls>div{min-width:min(100%,240px)}
.report-palette-aggregate-controls{margin-top:.7rem;padding-top:.7rem;border-top:1px solid var(--app-border)}
.report-paper-stage-unified{min-height:260px;resize:vertical}
.report-layout-canvas-unified{isolation:isolate}
.report-layout-canvas-unified .report-margin-guide{z-index:0}
.report-layout-canvas-unified .report-layout-object{z-index:4}
.report-layout-canvas-unified .report-layout-object.selected{z-index:12}
.report-layout-object{height:auto;min-height:10pt}
.report-object-content{min-height:0;height:100%;padding:0 1px;line-height:1.08}
.report-layout-object-field .report-object-content{padding:0 1px;line-height:1.08}
.report-section-divider{position:absolute;left:0;right:0;z-index:3;height:0;border-top:1.5px solid rgba(220,53,69,.92);pointer-events:none}
.report-divider-grip{position:absolute;left:50%;top:0;width:46px;height:13px;transform:translate(-50%,-50%);border:1px solid rgba(170,20,35,.75);border-radius:999px;background:rgba(255,235,238,.92);box-shadow:0 1px 4px rgba(0,0,0,.2);cursor:ns-resize;pointer-events:auto;touch-action:none}
.report-divider-grip::before{content:"";position:absolute;left:50%;top:50%;width:22px;height:3px;transform:translate(-50%,-50%);border-top:1px solid rgba(170,20,35,.75);border-bottom:1px solid rgba(170,20,35,.75)}
.report-divider-label{position:absolute;left:7px;z-index:2;max-width:100px;padding:.17rem .45rem;border:1px solid rgba(170,20,35,.62);border-radius:999px;background:rgba(255,245,246,.9);color:#7d101d;font:700 9px/1.1 Arial,sans-serif;white-space:nowrap;pointer-events:auto;transition:left .16s ease,right .16s ease,opacity .16s ease,transform .16s ease}
.report-divider-label:hover,.report-divider-label:focus-visible{opacity:1!important;background:#fff;border-color:#dc3545;color:#7d101d}
.report-divider-label-above{bottom:4px}
.report-divider-label-below{top:4px}
.report-section-divider.report-divider-labels-shifted .report-divider-label{left:auto;right:7px}
.report-section-divider.report-divider-labels-subdued .report-divider-label{opacity:.24;transform:scale(.88);transform-origin:left center}
.report-section-divider.report-divider-labels-subdued .report-divider-label:hover,.report-section-divider.report-divider-labels-subdued .report-divider-label:focus-visible{transform:scale(1)}
.report-layout-section-header{--section-accent:111,66,193}
.report-layout-section-records{--section-accent:253,126,20}
.report-layout-section-footer{--section-accent:25,135,84}
.report-layout-section-end_footer{--section-accent:13,110,253}
.report-layout-object:not(.selected){border-color:rgba(var(--section-accent,13,110,253),.13)}
.report-layout-object.selected{border-color:rgba(var(--section-accent,220,53,69),.94)!important}
@media(max-width:767.98px){
  .report-floating-save-wrap{right:.75rem;bottom:.75rem}
  .report-active-section-bar{align-items:flex-start;flex-direction:column}
  .report-palette-text-controls,.report-palette-record-controls,.report-palette-aggregate-controls{flex-direction:column}
  .report-palette-text-controls .btn,.report-palette-record-controls .btn,.report-palette-aggregate-controls .btn{width:100%}
}

/* V019 report color palettes, company query options, and Company reference dialog */
.report-query-options{display:grid;gap:.55rem;padding:.8rem;border:1px solid var(--app-border);border-radius:.6rem;background:var(--app-surface-alt)}
.report-query-options .form-check{display:flex;align-items:flex-start;gap:.5rem;margin:0}
.report-query-options .form-check-input{flex:0 0 auto;margin-top:.2rem}
.report-builder-status,.report-format-toolbar .alert{transition:opacity .35s ease}
.report-status-fading{opacity:0!important}
.report-color-picker{position:relative;align-self:end}
.report-color-picker>summary{display:flex;align-items:center;gap:.4rem;min-height:32px;padding:.3rem .5rem;border:1px solid var(--app-border);border-radius:.4rem;background:var(--app-surface);color:var(--app-text);font-size:.78rem;font-weight:750;cursor:pointer;list-style:none;user-select:none}
.report-color-picker>summary::-webkit-details-marker{display:none}
.report-color-picker[open]>summary,.report-color-picker>summary:hover{border-color:#0d6efd;background:color-mix(in srgb,var(--app-surface) 84%,#0d6efd 16%)}
.report-color-preview{display:inline-block;width:20px;height:20px;flex:0 0 20px;border:1px solid color-mix(in srgb,var(--app-border) 65%,#000 35%);border-radius:4px;background:var(--preview-color,#000)}
.report-color-preview-transparent{background-color:#fff;background-image:linear-gradient(45deg,#cfd3d8 25%,transparent 25%),linear-gradient(-45deg,#cfd3d8 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#cfd3d8 75%),linear-gradient(-45deg,transparent 75%,#cfd3d8 75%);background-position:0 0,0 5px,5px -5px,-5px 0;background-size:10px 10px}
.report-color-picker-panel{position:absolute;z-index:90;left:0;top:calc(100% + .35rem);width:min(290px,calc(100vw - 2rem));display:grid;gap:.7rem;padding:.75rem;border:1px solid var(--app-border);border-radius:.55rem;background:var(--app-surface);box-shadow:0 12px 32px rgba(0,0,0,.25)}
.report-color-native{display:flex;align-items:center;justify-content:space-between;gap:.65rem;margin:0;font-size:.8rem;font-weight:750}
.report-color-native input[type="color"]{width:54px;height:32px;padding:.1rem;border:1px solid var(--app-border);border-radius:.35rem;background:var(--app-surface)}
.report-color-swatch-group{display:grid;gap:.35rem}
.report-color-swatch-group strong{font-size:.75rem;color:var(--app-muted-text);text-transform:uppercase;letter-spacing:.035em}
.report-color-swatches{display:flex;flex-wrap:wrap;gap:.35rem;min-height:28px}
.report-color-swatch{position:relative;width:28px;height:28px;padding:0;border:1px solid color-mix(in srgb,var(--app-border) 62%,#000 38%);border-radius:6px;background:var(--swatch-color);box-shadow:inset 0 0 0 1px rgba(255,255,255,.28);cursor:pointer}
.report-color-swatch:hover,.report-color-swatch:focus-visible{outline:2px solid #0d6efd;outline-offset:1px}
.report-color-swatch-empty{align-self:center;color:var(--app-muted-text);font-size:.76rem;font-style:italic}
.entry-existing-company-list{display:flex;flex-wrap:wrap;gap:.45rem;max-height:240px;overflow:auto;padding:.75rem;border:1px solid var(--app-border);border-radius:.55rem;background:var(--app-surface-alt)}
.entry-existing-company-item{display:inline-flex;align-items:center;padding:.3rem .55rem;border:1px solid var(--app-border);border-radius:999px;background:var(--app-surface);color:var(--app-text);font-size:.86rem}
.entry-existing-company-item:hover,.entry-existing-company-item:focus-visible{border-color:#198754;background:color-mix(in srgb,var(--app-surface) 84%,#198754 16%)}
#report-builder-status{transition:opacity .35s ease}
.report-color-empty{align-self:center;color:var(--app-muted-text);font-size:.76rem;font-style:italic}
.report-run-page,.report-run-object{-webkit-print-color-adjust:exact;print-color-adjust:exact}


/* V020 grid interval, coordinate placement, corners, and floating Saved confirmation */
.report-grid-interval-control{display:flex;align-items:center;gap:.35rem;padding-right:.6rem;border-right:1px solid var(--app-border)}
.report-grid-interval-control label{margin:0;font-size:.74rem;font-weight:800;white-space:nowrap;color:var(--app-muted-text)}
.report-grid-interval-control input{width:86px}
.report-grid-interval-control select{width:84px}
.report-coordinate-controls{display:flex;align-items:center;gap:.4rem}
.report-coordinate-controls label{display:flex;align-items:center;gap:.25rem;margin:0;font-size:.78rem;font-weight:800;color:var(--app-text)}
.report-coordinate-controls input{width:78px}
.report-corners-control{display:flex;align-items:center;gap:.35rem;margin:0;font-size:.82rem;font-weight:750}
.report-corners-control .form-select{min-width:104px}
.report-floating-saved-message{position:absolute;right:calc(100% + .65rem);bottom:calc(100% - .2rem);display:block;color:#fff;font-size:1rem;font-weight:900;letter-spacing:.02em;text-shadow:0 1px 3px rgba(0,0,0,.9),0 0 8px rgba(0,0,0,.72);opacity:0;pointer-events:none;white-space:nowrap;transform:translateY(8px) scale(.92)}
.report-floating-saved-message.report-floating-saved-visible{animation:reportFloatingSavedShake 3s ease-out both}
@keyframes reportFloatingSavedShake{
  0%{opacity:0;transform:translateY(8px) scale(.92) rotate(0)}
  8%{opacity:1;transform:translateY(0) scale(1.06) rotate(0)}
  12%{transform:translateY(0) scale(1.04) rotate(-5deg)}
  17%{transform:translateY(0) scale(1.04) rotate(5deg)}
  22%{transform:translateY(0) scale(1.03) rotate(-4deg)}
  27%{transform:translateY(0) scale(1.02) rotate(4deg)}
  32%{transform:translateY(0) scale(1.01) rotate(-2deg)}
  38%,78%{opacity:1;transform:translateY(0) scale(1) rotate(0)}
  100%{opacity:0;transform:translateY(-8px) scale(.96) rotate(0)}
}
@media(max-width:767px){
  .report-grid-interval-control{width:100%;border-right:0;padding-right:0}
  .report-coordinate-controls{width:100%}
  .report-floating-saved-message{right:0;bottom:calc(100% + .45rem)}
}


/* V021 data-field typography, field-name hover tooltips, and printable object borders */
.report-border-control{display:flex;align-items:center;gap:.35rem;margin:0;font-size:.82rem;font-weight:750}
.report-border-control .form-select{min-width:104px}
.report-layout-object{--report-object-border-color:transparent}
.report-layout-object.selected{border-color:var(--report-object-border-color,transparent)!important;outline:1.5px solid rgba(var(--section-accent,220,53,69),.94);outline-offset:0}
.report-layout-object.primary-selected{outline-width:2.5px;box-shadow:0 0 0 1px rgba(220,53,69,.22)}
.report-layout-object-field[data-field-tooltip]::after{content:attr(data-field-tooltip);position:absolute;left:50%;bottom:calc(100% + 7px);z-index:45;max-width:260px;padding:.28rem .48rem;transform:translateX(-50%) translateY(3px);border:1px solid rgba(0,0,0,.22);border-radius:.38rem;background:rgba(22,26,31,.96);color:#fff;font:600 11px/1.25 Arial,sans-serif;white-space:normal;overflow-wrap:anywhere;opacity:0;pointer-events:none;transition:opacity .12s ease,transform .12s ease;box-shadow:0 5px 14px rgba(0,0,0,.24)}
.report-layout-object-field[data-field-tooltip]:hover::after{opacity:1;transform:translateX(-50%) translateY(0)}
.report-format-toolbar [data-format-command].active,.report-format-toolbar [data-format-command][aria-pressed="true"]{border-color:#0d6efd;background:#0d6efd;color:#fff}
.report-run-object{border-color:#000}
@media(max-width:767.98px){.report-border-control{width:100%;justify-content:space-between}.report-border-control .form-select{flex:1 1 auto}}
.report-layout-object-field .report-object-content{font-weight:inherit;font-style:inherit;text-decoration:inherit}


/* V022 persistent object heights, multi-selection formatting, boundary overlay, and wide field tooltips */
.report-object-content{white-space:normal;overflow-wrap:break-word;word-break:normal;hyphens:auto}
.report-layout-object-field .report-object-content{display:block;align-items:initial;white-space:normal;overflow-wrap:break-word;word-break:normal}
.report-layout-object-field[data-field-tooltip]::after{width:max-content;max-width:min(440px,calc(100vw - 2rem));white-space:normal;overflow-wrap:normal;word-break:normal;hyphens:none}
.report-layout-canvas.report-show-object-boundaries .report-layout-object[data-object-border-style="none"]{border-style:dotted!important;border-width:1px!important;border-color:rgba(220,53,69,.5)!important}
.report-format-toolbar [data-format-command].mixed{border-color:#6f42c1;background:linear-gradient(135deg,#6f42c1 0 48%,transparent 48% 52%,#fff 52% 100%);color:#fff;box-shadow:inset 0 0 0 1px rgba(111,66,193,.22)}
.report-run-object,.report-run-object-content{white-space:normal;overflow-wrap:break-word;word-break:normal;hyphens:auto}
.report-run-object-content{width:100%;height:100%;box-sizing:border-box;overflow:hidden;padding:1px}


/* V022 Hotfix V001: reliable direct text-box editing */
.report-layout-object:not(.report-layout-object-field) .report-object-content[contenteditable="true"]{cursor:text;user-select:text;-webkit-user-select:text;touch-action:auto}
.report-layout-object:not(.report-layout-object-field) .report-object-content[contenteditable="true"]:focus{caret-color:currentColor}

/* V024 Pilot Profile Editor and entry time calculators */
.pilot-profile-form-panel{width:100%;margin-bottom:1.5rem}
.pilot-profile-list-card{width:100%}
.pilot-profile-list-card .table{min-width:1100px}
.entry-calculate-time-button{min-width:2.8rem;display:inline-flex;align-items:center;justify-content:center}
.entry-calculate-time-button .toolbar-icon{width:1.15rem;height:1.15rem}

/* V025 user profile images, duplicate finder, navigation, and entry layout */
.toolbar-current-user{display:inline-flex;align-items:center;gap:.35rem;margin:.25rem .5rem;padding:.35rem .65rem;border:1px solid rgba(255,255,255,.36);border-radius:999px;color:var(--app-header-text,#fff);text-decoration:none;background:rgba(255,255,255,.1)}
.toolbar-current-user:hover,.toolbar-current-user:focus-visible{color:var(--app-header-text,#fff);background:rgba(255,255,255,.2);outline:2px solid rgba(255,255,255,.55)}
.user-editor-layout{display:flex;align-items:flex-start;gap:1.25rem}
.user-profile-image-panel{flex:0 0 25%;min-width:220px;padding:1rem;border:1px solid var(--app-border);border-radius:.7rem;background:var(--app-surface-alt)}
.user-profile-image-preview{display:block;width:100%;aspect-ratio:1/1;object-fit:cover;border-radius:.65rem;border:1px solid var(--app-border);background:var(--app-surface)}
.user-profile-upload-dropzone{display:flex;min-height:250px;flex-direction:column;align-items:center;justify-content:center;gap:1rem;padding:1rem;border:2px dashed var(--app-border);border-radius:.65rem;text-align:center;cursor:pointer;background:var(--app-surface)}
.user-profile-upload-dropzone.dragging{border-color:#198754;background:color-mix(in srgb,var(--app-surface) 82%,#198754 18%)}
.current-user-highlight{animation:v025CurrentUserGlow 2.4s ease-in-out 2;box-shadow:0 0 0 3px rgba(13,110,253,.38)}
@keyframes v025CurrentUserGlow{0%,100%{box-shadow:0 0 0 2px rgba(13,110,253,.2)}50%{box-shadow:0 0 0 6px rgba(13,110,253,.52)}}
.pilot-profile-list-card .table{min-width:0!important;font-size:.88rem}
.pilot-profile-list-card th,.pilot-profile-list-card td{white-space:normal;overflow-wrap:anywhere}
.entry-time-row,.entry-duration-row,.entry-calculated-time-row{padding-top:.35rem;padding-bottom:.35rem;border-top:1px solid color-mix(in srgb,var(--app-border) 70%,transparent)}
.duplicate-group-card{overflow:hidden}
.duplicate-record-summary{display:grid;gap:.2rem;height:100%;padding:.75rem;border:1px solid var(--app-border);border-radius:.55rem;background:var(--app-surface-alt)}
.duplicate-record-summary span{font-size:.86rem;color:var(--app-muted-text)}
.duplicate-record-selectors{display:grid;grid-template-columns:1fr 1fr;gap:1rem}
.duplicate-merge-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:.65rem;margin-bottom:1rem;padding:.75rem;border:1px solid var(--app-border);border-radius:.6rem;background:var(--app-surface-alt)}
.duplicate-comparison-table{display:grid;grid-template-columns:minmax(130px,.55fr) minmax(280px,1fr) 64px minmax(280px,1fr);align-items:stretch;border-top:1px solid var(--app-border);border-left:1px solid var(--app-border);background:var(--app-surface)}
.duplicate-comparison-table>div{min-width:0;padding:.55rem;border-right:1px solid var(--app-border);border-bottom:1px solid var(--app-border)}
.duplicate-comparison-header{position:sticky;top:0;z-index:4;font-weight:800;background:var(--app-surface-alt)}
.duplicate-field-label{font-weight:750;background:var(--app-surface-alt)}
.duplicate-value-cell{display:grid;gap:.45rem;align-content:start}
.duplicate-value-cell.duplicate-different{background:color-mix(in srgb,#ffc107 18%,var(--app-surface) 82%)}
.duplicate-value-cell.duplicate-conflict{background:color-mix(in srgb,#dc3545 22%,var(--app-surface) 78%);outline:2px solid rgba(220,53,69,.55);outline-offset:-2px}
.duplicate-row-arrows{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.35rem;background:var(--app-surface-alt)}
.duplicate-row-arrows button{width:38px;height:32px;border:1px solid var(--app-border);border-radius:.4rem;background:var(--app-surface);color:var(--app-text);font-size:1.2rem;line-height:1}
.duplicate-row-arrows button:hover{border-color:#0d6efd;background:color-mix(in srgb,var(--app-surface) 82%,#0d6efd 18%)}
.duplicate-attachment-preview{display:block;max-width:100%;max-height:280px;object-fit:contain;border:1px solid var(--app-border);border-radius:.4rem;background:#fff}
.duplicate-conflict-actions{display:flex;flex-wrap:wrap;gap:.35rem}
.duplicate-floating-save{position:fixed;right:1.5rem;bottom:1.5rem;z-index:1050;min-width:112px;box-shadow:0 8px 25px rgba(0,0,0,.32)}
.duplicate-floating-save.pulse-save{animation:v025PulseSave 1.25s ease-in-out infinite}
@keyframes v025PulseSave{0%,100%{box-shadow:0 8px 25px rgba(0,0,0,.32),0 0 0 0 rgba(25,135,84,.5);transform:scale(1)}50%{box-shadow:0 8px 25px rgba(0,0,0,.32),0 0 0 10px rgba(25,135,84,0);transform:scale(1.06)}}
.duplicate-trash-row{display:grid;grid-template-columns:1fr 1fr;gap:1rem;margin-top:1rem;padding:1rem;border:1px solid var(--app-border);border-radius:.6rem;background:var(--app-surface-alt)}
.duplicate-trash-row form:last-child{text-align:right}
@media(max-width:991.98px){.user-editor-layout{flex-direction:column}.user-profile-image-panel{width:100%;min-width:0;flex-basis:auto}.duplicate-comparison-table{grid-template-columns:120px minmax(220px,1fr) 54px minmax(220px,1fr);overflow:auto}.duplicate-record-selectors{grid-template-columns:1fr}}
@media(max-width:767.98px){.duplicate-comparison-table{display:block}.duplicate-comparison-header.duplicate-copy-heading{display:none}.duplicate-comparison-table>div{border-left:1px solid var(--app-border)}.duplicate-row-arrows{flex-direction:row}.duplicate-trash-row{grid-template-columns:1fr}.duplicate-trash-row form:last-child{text-align:left}.duplicate-floating-save{right:.75rem;bottom:.75rem}}


/* V026 user dropdown, report preview controls, and OCR processing overlay */
.toolbar-user-menu{position:relative;display:inline-flex;align-items:center;margin-left:.25rem;outline:none}
.toolbar-user-menu .toolbar-current-user{margin:.12rem 0}
.toolbar-user-caret{font-size:.72rem;line-height:1;opacity:.82;transition:transform .16s ease}
.toolbar-user-dropdown{position:absolute;top:calc(100% + .15rem);right:0;z-index:1080;min-width:100%;padding:.28rem;visibility:hidden;opacity:0;transform:translateY(-5px);transition:opacity .14s ease,transform .14s ease;background:var(--app-header-background);border:1px solid color-mix(in srgb,var(--app-header-text) 34%,transparent);border-radius:.55rem;box-shadow:0 10px 28px rgba(0,0,0,.28)}
.toolbar-user-menu:hover .toolbar-user-dropdown,.toolbar-user-menu:focus-within .toolbar-user-dropdown{visibility:visible;opacity:1;transform:translateY(0)}
.toolbar-user-menu:hover .toolbar-user-caret,.toolbar-user-menu:focus-within .toolbar-user-caret{transform:rotate(180deg)}
.toolbar-user-logout{display:flex;align-items:center;justify-content:flex-start;gap:.42rem;width:100%;padding:.42rem .52rem;border-radius:.38rem;color:var(--app-header-text);text-decoration:none;white-space:nowrap}
.toolbar-user-logout:hover,.toolbar-user-logout:focus-visible{color:var(--app-header-text);background:color-mix(in srgb,var(--app-header-text) 16%,transparent);outline:none}
.report-run-viewport{position:relative;height:calc(100vh - 12.5rem);min-height:28rem;overflow:auto;padding:.75rem;border:1px solid var(--app-border);border-radius:.7rem;background:color-mix(in srgb,var(--app-surface-alt) 88%,#000 12%);cursor:default;overscroll-behavior:contain}
.report-run-viewport.report-run-panning{cursor:grabbing;user-select:none}
.report-run-pages{min-width:max-content;align-content:start}
.report-run-page-shell{position:relative;flex:none;margin:0 auto}
.report-run-page{transform-origin:top left;will-change:transform}
.report-run-zoom-controls .btn{min-width:2.45rem;font-weight:800}
.report-run-zoom-value{min-width:4rem;padding:.36rem .5rem;border:1px solid var(--app-border);border-radius:.4rem;background:var(--app-surface);color:var(--app-text);font-weight:750;text-align:center}
.scan-ocr-processing-overlay{position:fixed;inset:0;z-index:2500;display:grid;place-items:center;padding:1rem;background:rgba(0,0,0,.48);backdrop-filter:blur(2px)}
.scan-ocr-processing-card{display:grid;justify-items:center;gap:.65rem;min-width:min(90vw,22rem);padding:1.6rem 1.8rem;border:1px solid rgba(255,255,255,.58);border-radius:1rem;background:color-mix(in srgb,var(--app-surface) 96%,transparent);color:var(--app-text);box-shadow:0 22px 70px rgba(0,0,0,.48);text-align:center}
.scan-ocr-processing-spinner{width:3.2rem;height:3.2rem;border-width:.34rem;color:#0d6efd}
.scan-ocr-processing-title{font-size:1.15rem;font-weight:850}
.scan-ocr-processing-detail{max-width:24rem;color:var(--app-muted);font-size:.92rem}
body.scan-ocr-processing-active{overflow:hidden}
@media(max-width:991.98px){.toolbar-user-menu{display:flex;flex-direction:column;align-items:flex-start;margin:.25rem 0}.toolbar-user-dropdown{position:static;display:block;width:100%;margin-top:.16rem;visibility:visible;opacity:1;transform:none;box-shadow:none}.toolbar-user-caret{display:none}.report-run-viewport{height:calc(100vh - 15rem);min-height:22rem}}
@media print{.report-run-viewport{height:auto;min-height:0;overflow:visible;padding:0;border:0;background:transparent}.report-run-page-shell{width:auto!important;height:auto!important;margin:0}.report-run-page{transform:none!important}.report-run-zoom-value{display:none!important}}


/* V027 current-user profile icon */
.toolbar-user-avatar{display:block;width:1.55rem;height:1.55rem;flex:0 0 1.55rem;object-fit:cover;border-radius:50%;border:1px solid color-mix(in srgb,var(--app-header-text) 48%,transparent);background:var(--app-surface-alt);box-shadow:0 0 0 1px color-mix(in srgb,var(--app-header-text) 14%,transparent)}
