/* Omvia Cloud 2.0.9.6 — final light-theme visibility + Activity + scanner overlay authority.
   Additive and scoped; immersive Gallery viewer remains excluded. */
:root{--oc96-cyan:#13c8f7;--oc96-blue:#2676ff;--oc96-violet:#7758ff;--oc96-magenta:#e23dc7;--oc96-grad:linear-gradient(125deg,var(--oc96-cyan),var(--oc96-blue) 38%,var(--oc96-violet) 72%,var(--oc96-magenta));}
/* Light mode must never produce invisible controls. Neutral controls inherit dark text; primary controls keep brand gradient. */
html[data-theme="light"] body:not(.media-immersive-page) :where(button,.btn,.icon-btn,.ref-icon-button,.gallery-icon-btn,.gallery-square-btn,.gallery-sort,.gallery-filter-btn,.gallery-select-toggle,.files-action-button,.oc-btn,.ref-theme-toggle,.lang-toggle):not(.primary):not(.danger):not([data-danger]){color:#07152d!important;--oc-btn-surface:#fff!important}
html[data-theme="light"] body:not(.media-immersive-page) :where(button,.btn,.icon-btn,.ref-icon-button,.gallery-icon-btn,.gallery-square-btn,.gallery-sort,.gallery-filter-btn,.gallery-select-toggle,.files-action-button,.oc-btn,.ref-theme-toggle,.lang-toggle):not(.primary):not(.danger):not([data-danger]) :where(span,strong,small,svg){color:inherit!important}
html[data-theme="light"] body:not(.media-immersive-page) :where(.btn.primary,.files-action-button.primary,.oc-btn.primary,.ref-land-primary,.ref-mobile-create,.gallery-upload,.upload-fab,button.primary){background:var(--oc96-grad)!important;border-color:transparent!important;color:#fff!important;text-shadow:0 1px 1px rgba(0,0,0,.18)!important}
html[data-theme="light"] body:not(.media-immersive-page) :where(.btn.primary,.files-action-button.primary,.oc-btn.primary,.ref-land-primary,.ref-mobile-create,.gallery-upload,.upload-fab,button.primary) :where(span,strong,svg){color:#fff!important;stroke:currentColor!important}
html[data-theme="light"] body:not(.media-immersive-page) :where(.upload-fab,.ref-mobile-create){box-shadow:0 12px 28px rgba(86,72,255,.22)!important}
/* Files upload was observed becoming a white empty card in Light: lock its visual contract. */
html[data-theme="light"] body[data-omvia-route="files.php"] .files-action-button.primary{background:var(--oc96-grad)!important;color:#fff!important}
html[data-theme="light"] body[data-omvia-route="files.php"] .files-action-button.primary strong{display:inline!important;visibility:visible!important;opacity:1!important;color:#fff!important}
html[data-theme="light"] body[data-omvia-route="files.php"] .files-action-button.primary svg{display:block!important;visibility:visible!important;opacity:1!important;color:#fff!important}
/* Activity gets a hard-scoped geometry authority to prevent generic brand/card rules from oversizing it. */
body[data-omvia-route="activity.php"]{overflow-x:hidden!important}
body[data-omvia-route="activity.php"] .page-shell{min-height:100dvh!important;overflow-x:hidden!important}
body[data-omvia-route="activity.php"] .page-topbar{box-sizing:border-box!important;min-height:68px!important;height:auto!important;padding:12px clamp(14px,2.4vw,24px)!important;display:flex!important;align-items:center!important;gap:12px!important;overflow:hidden!important}
body[data-omvia-route="activity.php"] .desktop-page-brand{display:flex!important;align-items:center!important;min-width:0!important;max-width:176px!important;height:40px!important;flex:0 1 176px!important;overflow:hidden!important}
body[data-omvia-route="activity.php"] .desktop-page-brand .brand-logo{display:block!important;width:auto!important;height:34px!important;max-width:172px!important;max-height:34px!important;object-fit:contain!important;object-position:left center!important;margin:0!important;transform:none!important}
body[data-omvia-route="activity.php"] .mobile-brand{display:none!important}
body[data-omvia-route="activity.php"] .page-top-spacer{flex:1 1 auto!important;min-width:8px!important}
body[data-omvia-route="activity.php"] .page-header-actions{display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:8px!important;min-width:0!important;flex:0 0 auto!important}
body[data-omvia-route="activity.php"] .page-header-actions .icon-btn{width:40px!important;height:40px!important;min-width:40px!important;min-height:40px!important;padding:0!important}
body[data-omvia-route="activity.php"] .user-chip{min-width:0!important;max-width:210px!important;height:42px!important;padding:3px 8px 3px 4px!important;gap:8px!important;overflow:hidden!important}
body[data-omvia-route="activity.php"] .user-chip .avatar{width:34px!important;height:34px!important;min-width:34px!important;max-width:34px!important;max-height:34px!important}
body[data-omvia-route="activity.php"] .user-copy{min-width:0!important;overflow:hidden!important}body[data-omvia-route="activity.php"] .user-copy>*{overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
body[data-omvia-route="activity.php"] .page-main{box-sizing:border-box!important;width:min(960px,calc(100% - 32px))!important;max-width:960px!important;margin:0 auto!important;padding:20px 0 80px!important}
body[data-omvia-route="activity.php"] .page-return-row{margin:0 0 14px!important}
body[data-omvia-route="activity.php"] .page-heading{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:end!important;gap:18px!important;margin:0 0 16px!important;padding:0!important}
body[data-omvia-route="activity.php"] .page-heading>div{min-width:0!important}body[data-omvia-route="activity.php"] .page-heading .eyebrow{font-size:10px!important;letter-spacing:.15em!important}body[data-omvia-route="activity.php"] .page-heading h1{font-size:clamp(32px,4.4vw,46px)!important;line-height:.98!important;letter-spacing:-.045em!important;margin:5px 0 7px!important}body[data-omvia-route="activity.php"] .page-heading p{font-size:13px!important;line-height:1.55!important;max-width:650px!important;margin:0!important}
body[data-omvia-route="activity.php"] .page-heading>.btn{height:40px!important;min-height:40px!important;padding:0 14px!important;align-self:end!important;white-space:nowrap!important}
body[data-omvia-route="activity.php"] .activity-page-card{box-sizing:border-box!important;width:100%!important;max-width:860px!important;margin:0 auto!important;padding:0!important;overflow:hidden!important;border-radius:18px!important}
body[data-omvia-route="activity.php"] .activity-page-card>.section-head{box-sizing:border-box!important;min-height:62px!important;padding:13px 16px!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important}
body[data-omvia-route="activity.php"] .activity-page-card>.section-head h2{font-size:16px!important;margin:0 0 3px!important}body[data-omvia-route="activity.php"] .activity-page-card>.section-head p{font-size:11px!important;margin:0!important}
body[data-omvia-route="activity.php"] .activity-page-card>.section-head .icon-btn{width:38px!important;height:38px!important;min-width:38px!important;min-height:38px!important;padding:0!important}
body[data-omvia-route="activity.php"] .activity-page-list{box-sizing:border-box!important;padding:8px!important;display:grid!important;gap:4px!important;overflow:hidden!important}
body[data-omvia-route="activity.php"] .activity-page-item{box-sizing:border-box!important;display:grid!important;grid-template-columns:38px minmax(0,1fr)!important;align-items:center!important;gap:11px!important;min-height:58px!important;padding:9px 10px!important;margin:0!important;border-radius:11px!important;overflow:hidden!important}
body[data-omvia-route="activity.php"] .activity-page-icon{box-sizing:border-box!important;width:38px!important;height:38px!important;min-width:38px!important;max-width:38px!important;max-height:38px!important;border-radius:11px!important;display:grid!important;place-items:center!important;overflow:hidden!important}
body[data-omvia-route="activity.php"] .activity-page-icon svg{width:17px!important;height:17px!important;max-width:17px!important;max-height:17px!important}
body[data-omvia-route="activity.php"] .activity-page-copy{min-width:0!important;overflow:hidden!important;display:grid!important;gap:3px!important}body[data-omvia-route="activity.php"] .activity-page-copy strong{font-size:12.5px!important;line-height:1.3!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}body[data-omvia-route="activity.php"] .activity-page-copy>span{font-size:10px!important;line-height:1.25!important;color:var(--muted)!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
/* Scanner overlay remains visible while camera is live. Detection result is drawn on top of the scanning guide. */
.document-scanner-shell .scanner-stage.is-camera [data-scanner-detection]{display:block!important;visibility:visible!important;opacity:1!important;z-index:8!important;mix-blend-mode:normal!important}
.document-scanner-shell .scanner-stage.is-camera .scanner-corner{opacity:.58!important;z-index:7!important}
@media(max-width:760px){
 body[data-omvia-route="activity.php"] .desktop-page-brand{display:none!important}body[data-omvia-route="activity.php"] .mobile-brand{display:flex!important;width:40px!important;height:40px!important;min-width:40px!important;flex:0 0 40px!important}body[data-omvia-route="activity.php"] .mobile-brand img{width:38px!important;height:38px!important;max-width:38px!important;max-height:38px!important;object-fit:contain!important}
 body[data-omvia-route="activity.php"] .page-topbar{padding-left:max(14px,env(safe-area-inset-left))!important;padding-right:max(14px,env(safe-area-inset-right))!important}
 body[data-omvia-route="activity.php"] .user-copy{display:none!important}body[data-omvia-route="activity.php"] .user-chip{width:40px!important;min-width:40px!important;height:40px!important;padding:2px!important;border-radius:13px!important}body[data-omvia-route="activity.php"] .user-chip .avatar{width:34px!important;height:34px!important}
 body[data-omvia-route="activity.php"] .page-main{width:100%!important;max-width:none!important;padding:18px max(14px,var(--oc-auto-gutter,14px)) calc(118px + env(safe-area-inset-bottom))!important}
 body[data-omvia-route="activity.php"] .page-heading{grid-template-columns:1fr!important;align-items:start!important;gap:11px!important}body[data-omvia-route="activity.php"] .page-heading>.btn{justify-self:start!important}
 body[data-omvia-route="activity.php"] .activity-page-card{max-width:none!important;border-radius:16px!important}
}
@media(max-width:430px){body[data-omvia-route="activity.php"] .page-header-actions{gap:6px!important}body[data-omvia-route="activity.php"] .page-header-actions .icon-btn{width:38px!important;height:38px!important;min-width:38px!important;min-height:38px!important}body[data-omvia-route="activity.php"] .activity-page-item{grid-template-columns:34px minmax(0,1fr)!important;gap:8px!important;padding:8px!important}body[data-omvia-route="activity.php"] .activity-page-icon{width:34px!important;height:34px!important;min-width:34px!important;max-width:34px!important;max-height:34px!important}body[data-omvia-route="activity.php"] .activity-page-copy strong{font-size:12px!important}}


/* 2.0.9.6 mobile/PWA header: one compact top row + Search below. */
@media(max-width:960px){
  body:not(.media-immersive-page) :where(.ref-topbar,.gallery-topbar){display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;grid-template-rows:auto auto!important;align-items:center!important;column-gap:8px!important;row-gap:10px!important;min-width:0!important;overflow:visible!important}
  body:not(.media-immersive-page) :where(.ref-mobile-brand,.gallery-mobile-brand){grid-column:1!important;grid-row:1!important;min-width:0!important;max-width:156px!important;overflow:hidden!important}
  body:not(.media-immersive-page) .ref-mobile-brand img{display:block!important;width:auto!important;height:auto!important;max-width:156px!important;max-height:42px!important;object-fit:contain!important;object-position:left center!important}
  body:not(.media-immersive-page) .gallery-mobile-brand img{width:36px!important;height:36px!important;max-width:36px!important;max-height:36px!important;flex:0 0 36px!important}
  body:not(.media-immersive-page) .gallery-mobile-brand strong{font-size:17px!important;line-height:1!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  body:not(.media-immersive-page) :where(.ref-search,.gallery-search){grid-column:1/-1!important;grid-row:2!important;width:100%!important;max-width:none!important;margin:0!important;min-width:0!important}
  body:not(.media-immersive-page) :where(.ref-top-actions,.gallery-top-actions){grid-column:2!important;grid-row:1!important;display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:6px!important;width:auto!important;min-width:0!important;justify-self:end!important;overflow:visible!important}
  body:not(.media-immersive-page) :where(.omvia-display-controls,.omvia-display-controls.omvia-mobile-utility-row){display:flex!important;align-items:center!important;justify-content:flex-end!important;flex-wrap:nowrap!important;gap:6px!important;width:auto!important;max-width:none!important;margin:0!important;padding:0!important;position:static!important;inset:auto!important;transform:none!important}
  body:not(.media-immersive-page) :where(.ref-top-actions,.gallery-top-actions,.scanner-top-actions,.page-header-actions,.topbar-actions) :where(.ref-icon-button,.gallery-icon-btn,.icon-btn,.ref-avatar-button,.gallery-account,.scanner-account-button,.user-chip,.lang-toggle,[data-theme-toggle]),body:not(.media-immersive-page) .omvia-display-controls>*{box-sizing:border-box!important;width:40px!important;min-width:40px!important;max-width:40px!important;height:40px!important;min-height:40px!important;max-height:40px!important;padding:0!important;margin:0!important;border-radius:12px!important;display:grid!important;place-items:center!important;flex:0 0 40px!important;line-height:1!important}
  body:not(.media-immersive-page) .omvia-display-controls .lang-toggle{width:40px!important;min-width:40px!important;max-width:40px!important;padding:0!important}
  body:not(.media-immersive-page) .omvia-display-controls .lang-toggle .lang-code{font-size:10px!important;line-height:1!important;letter-spacing:.04em!important}
  body:not(.media-immersive-page) :where(.ref-avatar,.gallery-avatar,.scanner-avatar,.user-chip .avatar){width:36px!important;min-width:36px!important;max-width:36px!important;height:36px!important;min-height:36px!important;max-height:36px!important;border-radius:11px!important}
  body:not(.media-immersive-page) :where(.gallery-account>span:not(.avatar),.gallery-account>.svg,.user-chip .user-copy){display:none!important}
  body:not(.media-immersive-page) .page-topbar{box-sizing:border-box!important;min-width:0!important;max-width:100%!important;min-height:64px!important;height:auto!important;padding:10px max(12px,var(--oc-auto-gutter,12px))!important;align-items:center!important;gap:8px!important;overflow:hidden!important}
  body:not(.media-immersive-page) .page-topbar :where(.omvia-secondary-brand-mobile,.mobile-brand,.scanner-app-brand){min-width:0!important;max-width:150px!important;overflow:hidden!important}
  body:not(.media-immersive-page) .page-topbar :where(.omvia-secondary-brand-mobile,.mobile-brand,.scanner-app-brand) img{display:block!important;width:auto!important;height:auto!important;max-width:150px!important;max-height:40px!important;object-fit:contain!important;object-position:left center!important}
  body:not(.media-immersive-page) :where(.topbar-actions,.page-header-actions,.scanner-top-actions){margin-left:auto!important;display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:6px!important;min-width:0!important;flex:0 0 auto!important}
  body:not(.media-immersive-page) .page-main{max-width:100%!important;min-width:0!important}
  body:not(.media-immersive-page) :where(.page-heading,.section-head,.section-actions,.platform-row,.settings-row,.device-row){min-width:0!important}
  body:not(.media-immersive-page) :where(.page-heading h1,.section-head h2,.platform-row strong){overflow-wrap:anywhere!important}
  body:not(.media-immersive-page) :where(button,.btn,.icon-btn,.ref-icon-button,.gallery-icon-btn,.files-action-button) svg{max-width:22px!important;max-height:22px!important;flex:0 0 auto!important}
}
@media(max-width:390px){
  body:not(.media-immersive-page) :where(.ref-mobile-brand,.gallery-mobile-brand){max-width:132px!important}
  body:not(.media-immersive-page) .ref-mobile-brand img{max-width:132px!important;max-height:38px!important}
  body:not(.media-immersive-page) :where(.ref-top-actions,.gallery-top-actions,.scanner-top-actions,.page-header-actions,.topbar-actions){gap:5px!important}
  body:not(.media-immersive-page) :where(.ref-top-actions,.gallery-top-actions,.scanner-top-actions,.page-header-actions,.topbar-actions) :where(.ref-icon-button,.gallery-icon-btn,.icon-btn,.ref-avatar-button,.gallery-account,.scanner-account-button,.user-chip,.lang-toggle,[data-theme-toggle]),body:not(.media-immersive-page) .omvia-display-controls>*{width:37px!important;min-width:37px!important;max-width:37px!important;height:37px!important;min-height:37px!important;max-height:37px!important;flex-basis:37px!important;border-radius:11px!important}
  body:not(.media-immersive-page) .omvia-display-controls .lang-toggle{width:37px!important;min-width:37px!important;max-width:37px!important}
  body:not(.media-immersive-page) :where(.ref-avatar,.gallery-avatar,.scanner-avatar,.user-chip .avatar){width:33px!important;min-width:33px!important;max-width:33px!important;height:33px!important;min-height:33px!important;max-height:33px!important}
}

/* Light semantic guard: no white-on-white controls. */
html[data-theme="light"] body:not(.media-immersive-page) :where(.btn.soft,.btn:not(.primary):not(.danger),.icon-btn,.ref-icon-button,.gallery-icon-btn,.gallery-square-btn,.gallery-sort,.gallery-filter-btn,.gallery-select-toggle,.files-action-button:not(.primary),.ref-quick-grid>:is(button,a),.ref-filter,.ref-nav-link,.platform-row button,.section-actions button){color:#07152d!important;-webkit-text-fill-color:currentColor!important}
html[data-theme="light"] body:not(.media-immersive-page) :where(.btn.soft,.btn:not(.primary):not(.danger),.icon-btn,.ref-icon-button,.gallery-icon-btn,.gallery-square-btn,.gallery-sort,.gallery-filter-btn,.gallery-select-toggle,.files-action-button:not(.primary),.ref-quick-grid>:is(button,a)) :where(svg,path,use,strong,span){color:inherit!important;-webkit-text-fill-color:currentColor!important}
html[data-theme="light"] body:not(.media-immersive-page) :where(.files-action-button.primary,.ref-mobile-create,.upload-fab,.btn.primary,button.primary){background:var(--oc96-grad)!important;color:#fff!important;-webkit-text-fill-color:#fff!important;border-color:transparent!important}
html[data-theme="light"] body:not(.media-immersive-page) :where(.files-action-button.primary,.ref-mobile-create,.upload-fab,.btn.primary,button.primary) :where(svg,strong,span){color:#fff!important;-webkit-text-fill-color:#fff!important;stroke:currentColor!important}
body:not(.media-immersive-page) :where(.ref-mobile-create,.upload-fab){background:var(--oc96-grad)!important;color:#fff!important;-webkit-text-fill-color:#fff!important;border:0!important}
body:not(.media-immersive-page) :where(.ref-mobile-create,.upload-fab) svg{color:#fff!important;stroke:currentColor!important;opacity:1!important;visibility:visible!important}

/* Persistent scanner analyzer guide. Real detected quadrilateral is still drawn on the detection canvas. */
.document-scanner-shell .scanner-stage{isolation:isolate!important}
.document-scanner-shell .scanner-analysis-guide{position:absolute!important;inset:0!important;z-index:6!important;pointer-events:none!important;display:none!important;overflow:hidden!important;border-radius:inherit!important}
.document-scanner-shell .scanner-stage.is-camera .scanner-analysis-guide{display:block!important}
.document-scanner-shell .scanner-analysis-guide .sag-corner{position:absolute!important;width:52px!important;height:52px!important;opacity:.92!important;filter:drop-shadow(0 0 7px rgba(119,88,255,.28))}
.document-scanner-shell .scanner-analysis-guide .sag-tl{left:8%!important;top:9%!important;border-left:3px solid #13c8f7!important;border-top:3px solid #13c8f7!important;border-radius:13px 0 0 0!important}
.document-scanner-shell .scanner-analysis-guide .sag-tr{right:8%!important;top:9%!important;border-right:3px solid #2676ff!important;border-top:3px solid #2676ff!important;border-radius:0 13px 0 0!important}
.document-scanner-shell .scanner-analysis-guide .sag-bl{left:8%!important;bottom:9%!important;border-left:3px solid #7758ff!important;border-bottom:3px solid #7758ff!important;border-radius:0 0 0 13px!important}
.document-scanner-shell .scanner-analysis-guide .sag-br{right:8%!important;bottom:9%!important;border-right:3px solid #e23dc7!important;border-bottom:3px solid #e23dc7!important;border-radius:0 0 13px 0!important}
.document-scanner-shell .scanner-analysis-guide .sag-scanline{position:absolute!important;left:10%!important;right:10%!important;height:2px!important;top:14%!important;background:linear-gradient(90deg,transparent,#13c8f7 15%,#2676ff 42%,#7758ff 70%,#e23dc7 88%,transparent)!important;box-shadow:0 0 12px rgba(38,118,255,.42)!important;animation:oc96ScannerSweep 2.05s ease-in-out infinite alternate!important;opacity:.82!important}
.document-scanner-shell .scanner-analysis-guide.is-tracking .sag-corner{opacity:.36!important}.document-scanner-shell .scanner-analysis-guide.is-tracking .sag-scanline{opacity:.34!important}
.document-scanner-shell .scanner-analysis-guide.is-locked .sag-corner{opacity:.18!important}.document-scanner-shell .scanner-analysis-guide.is-locked .sag-scanline{opacity:.18!important}
@keyframes oc96ScannerSweep{from{top:14%}to{top:84%}}
@media(max-width:520px){.document-scanner-shell .scanner-analysis-guide .sag-corner{width:40px!important;height:40px!important}.document-scanner-shell .scanner-analysis-guide .sag-tl,.document-scanner-shell .scanner-analysis-guide .sag-bl{left:6%!important}.document-scanner-shell .scanner-analysis-guide .sag-tr,.document-scanner-shell .scanner-analysis-guide .sag-br{right:6%!important}}
