/* Omvia Cloud 2.0.9.4 — global control palette + mobile header convergence.
   Final additive authority; immersive Gallery viewer chrome remains excluded. */
html{--oc-brand-cyan:#13c8f7;--oc-brand-blue:#2676ff;--oc-brand-violet:#7758ff;--oc-brand-magenta:#e23dc7;--oc-brand-gradient:linear-gradient(125deg,var(--oc-brand-cyan),var(--oc-brand-blue) 38%,var(--oc-brand-violet) 72%,var(--oc-brand-magenta));}

/* App controls use the Omvia palette without turning every neutral action into a neon block. */
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-land-secondary,.ref-theme-toggle):not(.danger):not([data-danger]){
  --oc-btn-surface:var(--panel,#fff);
  border:1px solid transparent!important;
  background:linear-gradient(var(--oc-btn-surface),var(--oc-btn-surface)) padding-box,var(--oc-brand-gradient) border-box!important;
  color:var(--text,#07152d);
  box-shadow:none;
}
html[data-theme="dark"] 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-land-secondary,.ref-theme-toggle):not(.danger):not([data-danger]){--oc-btn-surface:var(--panel,#0d1a2d);color:var(--text,#f5f8fd)}
body:not(.media-immersive-page) :where(button,.btn,.icon-btn,.ref-icon-button,.gallery-icon-btn,.gallery-square-btn,.gallery-sort,.gallery-filter-btn,.files-action-button,.oc-btn,.ref-land-secondary,.ref-theme-toggle):not(.danger):not([data-danger]):hover,
body:not(.media-immersive-page) :where(button,.btn,.icon-btn,.ref-icon-button,.gallery-icon-btn,.gallery-square-btn,.gallery-sort,.gallery-filter-btn,.files-action-button,.oc-btn,.ref-land-secondary,.ref-theme-toggle):not(.danger):not([data-danger]):focus-visible{
  filter:saturate(1.08);
  box-shadow:0 8px 24px color-mix(in srgb,var(--oc-brand-blue) 14%,transparent)!important;
}
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){background:var(--oc-brand-gradient)!important;border-color:transparent!important;color:#fff!important}


/* Mobile/PWA: utility controls live in the top header row, never below Search. */
@media(max-width:960px){
  .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:10px!important;row-gap:12px!important}
  .ref-mobile-brand,.gallery-mobile-brand{grid-column:1!important;grid-row:1!important;min-width:0!important}
  .ref-search,.gallery-search{grid-column:1/-1!important;grid-row:2!important;margin:0!important;width:100%!important}
  .ref-top-actions,.gallery-top-actions{display:flex!important;grid-column:2!important;grid-row:1!important;align-items:center!important;justify-content:flex-end!important;gap:7px!important;min-width:0!important;width:auto!important;justify-self:end!important}
  .ref-top-actions>.ref-help,.ref-top-actions>.home-mode-button{display:none!important}
  .gallery-top-actions>.gallery-icon-btn{display:none!important}
  .gallery-top-actions>a[href*="notifications.php"]{display:grid!important}
  .ref-top-actions .ref-icon-button,.gallery-top-actions .gallery-icon-btn,.ref-avatar-button,.gallery-account,.omvia-display-controls .lang-toggle,.omvia-display-controls [data-theme-toggle]{width:42px!important;min-width:42px!important;max-width:42px!important;height:42px!important;min-height:42px!important;max-height:42px!important;border-radius:13px!important;padding:0!important;margin:0!important;display:grid!important;place-items:center!important;flex:0 0 42px!important}
  .omvia-display-controls{display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:7px!important;margin:0!important;padding:0!important;width:auto!important;max-width:none!important;position:static!important;transform:none!important;flex-wrap:nowrap!important}
  .omvia-display-controls.omvia-mobile-utility-row{display:flex!important;margin:0!important;max-width:none!important;gap:7px!important}
  .omvia-display-controls.omvia-mobile-utility-row>*{width:42px!important;min-width:42px!important;max-width:42px!important;height:42px!important;min-height:42px!important;max-height:42px!important;flex:0 0 42px!important;border-radius:13px!important;padding:0!important}
  .omvia-display-controls .lang-toggle .lang-code{font-size:10px!important;font-weight:900!important;letter-spacing:.06em!important}
  .ref-avatar,.gallery-avatar{width:42px!important;height:42px!important;min-width:42px!important;min-height:42px!important;border-radius:13px!important}
  .gallery-account>span:not(.avatar),.gallery-account>.svg{display:none!important}
}
@media(max-width:520px){
  .ref-topbar,.gallery-topbar{column-gap:8px!important;row-gap:10px!important}
  .ref-top-actions,.gallery-top-actions,.omvia-display-controls{gap:5px!important}
  .ref-top-actions .ref-icon-button,.gallery-top-actions .gallery-icon-btn,.ref-avatar-button,.gallery-account,.omvia-display-controls .lang-toggle,.omvia-display-controls [data-theme-toggle],.omvia-display-controls.omvia-mobile-utility-row>*{width:39px!important;min-width:39px!important;max-width:39px!important;height:39px!important;min-height:39px!important;max-height:39px!important;flex-basis:39px!important;border-radius:12px!important}
  .ref-avatar,.gallery-avatar{width:39px!important;height:39px!important;min-width:39px!important;min-height:39px!important;border-radius:12px!important}
  .ref-mobile-brand img{max-width:min(49vw,188px)!important}
  .gallery-mobile-brand strong{font-size:18px!important;white-space:nowrap!important}
}
