/* Omvia Cloud v1.9.15 — Universal Geometry / Padding / Responsive Authority
   Stable Core v1.9.14 remains the anti-loop runtime authority. This file is layout-only. */
:root{
  --oc1915-page-x:clamp(22px,3vw,42px);
  --oc1915-page-y:clamp(24px,3vw,38px);
  --oc1915-gap:20px;
  --oc1915-card-pad:clamp(18px,2vw,24px);
  --oc1915-sidebar:274px;
  --oc1915-mobile-x:16px;
}
html,body{max-width:100%;overflow-x:hidden}
body[data-omvia-route] *{box-sizing:border-box}
body[data-omvia-route] main,body[data-omvia-route] section,body[data-omvia-route] article,body[data-omvia-route] aside,body[data-omvia-route] header,body[data-omvia-route] nav{min-width:0}

/* Primary workspace — one geometry on Dashboard and Files. */
.ref-shell,.files-ref-shell{grid-template-columns:var(--oc1915-sidebar) minmax(0,1fr)!important;min-height:100dvh!important}
.ref-sidebar{width:var(--oc1915-sidebar)!important;height:100dvh!important;min-height:0!important;position:sticky!important;top:0!important;padding:20px 16px 16px!important;gap:14px!important;overflow:hidden!important;display:flex!important;flex-direction:column!important}
.ref-brand{flex:0 0 auto!important;height:58px!important;padding:2px 8px!important}.ref-brand img{width:196px!important;max-width:100%!important}
.ref-nav{display:flex!important;flex-direction:column!important;gap:3px!important;flex:1 1 auto!important;min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important;padding:2px 5px 10px 0!important;scrollbar-width:thin!important;scrollbar-color:color-mix(in srgb,var(--blue) 30%,var(--line)) transparent!important;overscroll-behavior:contain!important}
.ref-nav::-webkit-scrollbar{width:7px}.ref-nav::-webkit-scrollbar-thumb{background:color-mix(in srgb,var(--blue) 24%,var(--line));border-radius:999px}.ref-nav::-webkit-scrollbar-track{background:transparent}
.ref-nav-label{display:block!important;padding:14px 13px 5px!important;font-size:9.5px!important;line-height:1!important;letter-spacing:.16em!important;font-weight:850!important;color:var(--muted)!important;text-transform:uppercase!important}
.ref-nav-link{flex:0 0 43px!important;min-height:43px!important;height:43px!important;padding:0 12px!important;border-radius:11px!important;gap:11px!important;font-size:13px!important;white-space:nowrap!important}
.ref-sidebar-storage{flex:0 0 auto!important;margin-top:0!important;padding:14px 15px!important;border-radius:14px!important}
.ref-main,.files-ref-main{min-width:0!important;width:100%!important}
.ref-topbar{padding:16px var(--oc1915-page-x)!important;gap:16px!important;min-height:80px!important}
.ref-topbar .ref-search{flex:1 1 620px!important;max-width:720px!important;min-width:220px!important}
.ref-heading,.files-heading{padding:28px var(--oc1915-page-x) 16px!important}
.ref-content-grid{padding:0 var(--oc1915-page-x) 48px!important;gap:22px!important;grid-template-columns:minmax(0,1fr) minmax(280px,320px)!important}
.ref-content-primary{gap:20px!important}.ref-card{border-radius:16px!important}
.files-action-card,.breadcrumbs,.file-browser-card,.photo-library-card{margin-left:var(--oc1915-page-x)!important;margin-right:var(--oc1915-page-x)!important;width:auto!important}
.files-action-card{padding:16px 18px!important}.breadcrumbs{margin-top:14px!important;margin-bottom:14px!important}
.file-browser-card,.photo-library-card{margin-bottom:48px!important}

/* Dashboard empty states — centered rather than sitting at the top/left of a table. */
.ref-recent-table [data-ref-recent-files],.ref-mobile-files{min-height:128px!important}
.ref-recent-table .ref-empty,.ref-recent-table .ref-loading,.ref-mobile-files .ref-empty,.ref-mobile-files .ref-loading{min-height:128px!important;width:100%!important;display:grid!important;place-items:center!important;text-align:center!important;padding:26px 18px!important;color:var(--muted)!important}
.ref-activity-list>.ref-empty,.ref-activity-list>.ref-loading{min-height:170px!important;display:grid!important;place-items:center!important;text-align:center!important}

/* Gallery desktop — fixed/scrollable sidebar and one-line sort/view toolbar. */
.gallery-experience-shell{grid-template-columns:var(--oc1915-sidebar) minmax(0,1fr)!important;min-height:100dvh!important}
.gallery-sidebar{width:var(--oc1915-sidebar)!important;height:100dvh!important;min-height:0!important;position:sticky!important;top:0!important;padding:20px 16px 18px!important;gap:14px!important;overflow-y:auto!important;overflow-x:hidden!important;scrollbar-width:thin!important;scrollbar-color:color-mix(in srgb,var(--blue) 28%,var(--line)) transparent!important;overscroll-behavior:contain!important}
.gallery-sidebar::-webkit-scrollbar{width:7px}.gallery-sidebar::-webkit-scrollbar-thumb{background:color-mix(in srgb,var(--blue) 24%,var(--line));border-radius:999px}
.gallery-brand{flex:0 0 auto!important;padding:2px 6px 8px!important}.gallery-brand img{width:196px!important;max-width:100%!important}
.gallery-upload{flex:0 0 46px!important}.gallery-side-nav{display:flex!important;flex-direction:column!important;gap:3px!important}.gallery-side-nav a{min-height:42px!important;padding:0 11px!important}
.gallery-storage-mini,.gallery-quick-access{flex:0 0 auto!important}.gallery-quick-access{padding-bottom:4px!important}.gallery-quick-access>a{min-height:40px!important}
.gallery-workspace{min-width:0!important}.gallery-topbar{padding:16px var(--oc1915-page-x)!important;gap:15px!important}.gallery-main{padding:28px var(--oc1915-page-x) 54px!important;overflow:visible!important}
.gallery-heading-row{display:flex!important;align-items:flex-end!important;justify-content:space-between!important;gap:18px!important;flex-wrap:nowrap!important;min-width:0!important}
.gallery-heading-row>div:first-child{flex:1 1 auto!important;min-width:0!important}.gallery-view-controls{display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:8px!important;flex:0 0 auto!important;flex-wrap:nowrap!important;white-space:nowrap!important;min-width:max-content!important}
.gallery-sort{display:inline-flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;min-width:190px!important;width:auto!important;max-width:230px!important;height:44px!important;padding:0 14px!important;white-space:nowrap!important}.gallery-sort>span{white-space:nowrap!important}.gallery-square-btn{flex:0 0 44px!important;width:44px!important;height:44px!important;margin:0!important}
.gallery-albums{margin-top:22px!important;padding-bottom:8px!important;gap:12px!important;overflow-x:auto!important;overscroll-behavior-inline:contain!important}.gallery-toolbar{margin-top:20px!important;display:flex!important;justify-content:flex-end!important;align-items:center!important;gap:8px!important}
.gallery-photo-stream{margin-top:14px!important}.photo-library-empty{min-height:280px!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;text-align:center!important;padding:32px!important}
.gallery-admin-links{display:grid!important;gap:5px!important;padding:10px 0 0!important;border-top:1px solid var(--line)!important;margin-top:8px!important}.gallery-admin-links>span{font-size:9.5px;letter-spacing:.14em;font-weight:850;color:var(--muted);padding:2px 8px 5px}.gallery-admin-links a{min-height:40px;display:flex;align-items:center;gap:10px;padding:0 10px;border-radius:10px;text-decoration:none;color:var(--muted);font-size:12px}.gallery-admin-links a:hover{background:var(--panel-2);color:var(--text)}

/* Generic secondary pages — universal width and gutters. */
.page-shell,.account-shell{min-height:100dvh!important;padding-bottom:0!important}.page-topbar,.account-top{padding:14px var(--oc1915-page-x)!important;min-height:76px!important}.page-main,.account-main{width:min(1240px,calc(100% - (var(--oc1915-page-x) * 2)))!important;max-width:1240px!important;margin:0 auto!important;padding:var(--oc1915-page-y) 0 64px!important}
.page-main>.page-return-row,.account-main>.page-return-row{margin:0 0 20px!important}.page-heading,.account-hero{margin-bottom:22px!important}.section-card{border-radius:16px!important}.section-card>.section-head{padding:20px 22px!important;margin:0!important}.platform-two-col,.platform-three-col,.platform-metric-grid,.notification-layout,.account-layout{gap:20px!important}
.empty-state{width:100%!important;text-align:center!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;min-height:180px!important;padding:28px 20px!important}

/* Account is its own shell, never an admin grid. */
.account-shell{display:block!important}.account-main{display:block!important}.account-layout{align-items:start!important}

/* Admin — sidebar and workspace both bounded; navigation always scrollable. */
.admin-shell{display:grid!important;grid-template-columns:280px minmax(0,1fr)!important;min-height:100dvh!important;padding:0!important}
.admin-sidebar{width:280px!important;height:100dvh!important;min-height:0!important;position:sticky!important;top:0!important;padding:18px 14px 14px!important;display:flex!important;flex-direction:column!important;overflow:hidden!important}
.admin-sidebar-brand{flex:0 0 auto!important;padding:4px 8px 12px!important}.admin-sidebar-brand img{width:194px!important;max-width:100%!important}
.admin-side-nav{display:flex!important;flex-direction:column!important;gap:3px!important;flex:1 1 auto!important;min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important;padding:0 5px 10px 0!important;scrollbar-width:thin!important;scrollbar-color:color-mix(in srgb,var(--blue) 28%,var(--line)) transparent!important;overscroll-behavior:contain!important}.admin-side-nav::-webkit-scrollbar{width:7px}.admin-side-nav::-webkit-scrollbar-thumb{background:color-mix(in srgb,var(--blue) 24%,var(--line));border-radius:999px}
.admin-nav-label{flex:0 0 auto!important;padding:13px 11px 5px!important}.admin-side-link{flex:0 0 42px!important;min-height:42px!important;height:42px!important;padding:0 11px!important;border-radius:10px!important;font-size:12.5px!important}.admin-sidebar-bottom{flex:0 0 auto!important;margin-top:8px!important;padding-top:10px!important;border-top:1px solid var(--line)!important}
.admin-workspace{min-width:0!important;width:100%!important}.admin-top{padding:14px 28px!important;min-height:78px!important}.admin-main{width:100%!important;max-width:1540px!important;margin:0 auto!important;padding:30px 32px 58px!important;min-width:0!important}.admin-main>*{max-width:100%!important}.admin-table-wrap{max-width:100%!important;overflow:auto!important}.admin-heading{gap:16px!important;margin-bottom:22px!important}


/* Notification badge is an overlay, never part of the button flow. */
.ref-icon-button.notification-trigger,.gallery-icon-btn.notification-trigger{position:relative!important}
.omvia-notification-badge{position:absolute!important;top:-6px!important;right:-6px!important;min-width:18px!important;height:18px!important;padding:0 5px!important;border-radius:999px!important;display:grid!important;place-items:center!important;font-size:10px!important;line-height:1!important;font-weight:850!important;z-index:4!important;transform:none!important;margin:0!important}
.omvia-notification-badge[hidden]{display:none!important}

/* Light/Dark branding surfaces stay theme-correct. */
.theme-logo{object-fit:contain!important;object-position:left center!important}.admin-brand-logo,.page-brand img,.ref-brand img,.gallery-brand img{max-height:52px!important}
html[data-theme="light"] .theme-logo{filter:none!important}html[data-theme="dark"] .theme-logo{filter:none!important}

/* Mobile/PWA — universal gutters, exact 5-slot bottom nav, mathematically centered FAB. */
@media(max-width:900px){
 :root{--oc1915-page-x:var(--oc1915-mobile-x);--oc1915-page-y:22px}
 .ref-shell,.files-ref-shell,.gallery-experience-shell,.admin-shell{display:block!important;min-height:100dvh!important}
 .ref-sidebar,.gallery-sidebar,.admin-sidebar{display:none!important}
 .ref-topbar,.gallery-topbar,.page-topbar,.account-top,.admin-top{padding-left:var(--oc1915-mobile-x)!important;padding-right:var(--oc1915-mobile-x)!important}
 .ref-heading,.files-heading{padding:24px var(--oc1915-mobile-x) 14px!important}.ref-content-grid{display:block!important;padding:0 var(--oc1915-mobile-x) calc(112px + env(safe-area-inset-bottom))!important}.ref-content-primary{gap:16px!important}
 .files-action-card,.breadcrumbs,.file-browser-card,.photo-library-card{margin-left:var(--oc1915-mobile-x)!important;margin-right:var(--oc1915-mobile-x)!important}.files-action-card{padding:14px!important}
 .page-main,.account-main{width:calc(100% - (var(--oc1915-mobile-x) * 2))!important;padding:22px 0 calc(104px + env(safe-area-inset-bottom))!important}.admin-main{width:100%!important;padding:22px var(--oc1915-mobile-x) calc(100px + env(safe-area-inset-bottom))!important}
 .gallery-main{padding:22px var(--oc1915-mobile-x) calc(112px + env(safe-area-inset-bottom))!important}.gallery-heading-row{align-items:flex-start!important;flex-direction:column!important;gap:14px!important}.gallery-view-controls{width:100%!important;max-width:100%!important;justify-content:flex-start!important;overflow-x:auto!important;padding:1px 1px 6px!important;scrollbar-width:none!important}.gallery-view-controls::-webkit-scrollbar{display:none}.gallery-sort{min-width:174px!important}.gallery-albums{margin-top:8px!important}
 .section-card>.section-head{padding:18px!important}.section-card{border-radius:15px!important}

 /* Exact mobile nav. Button is absolute at viewport center; anchors are pinned to slots 1,2,4,5. */
 .ref-mobile-nav,.gallery-mobile-nav{position:fixed!important;left:0!important;right:0!important;bottom:0!important;width:100%!important;height:calc(82px + env(safe-area-inset-bottom))!important;min-height:82px!important;display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;align-items:center!important;padding:7px max(8px,env(safe-area-inset-right)) calc(7px + env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left))!important;border-radius:0!important;border-width:1px 0 0!important;z-index:5000!important;overflow:visible!important;transform:none!important}
 .ref-mobile-nav>a:nth-of-type(1),.gallery-mobile-nav>a:nth-of-type(1){grid-column:1!important}.ref-mobile-nav>a:nth-of-type(2),.gallery-mobile-nav>a:nth-of-type(2){grid-column:2!important}.ref-mobile-nav>a:nth-of-type(3),.gallery-mobile-nav>a:nth-of-type(3){grid-column:4!important}.ref-mobile-nav>a:nth-of-type(4),.gallery-mobile-nav>a:nth-of-type(4){grid-column:5!important}
 .ref-mobile-nav>a,.gallery-mobile-nav>a{height:58px!important;min-width:0!important;align-self:center!important;justify-self:stretch!important;margin:0!important;transform:none!important}
 .ref-mobile-create,.gallery-mobile-nav .upload-fab{position:absolute!important;left:50%!important;top:0!important;right:auto!important;bottom:auto!important;width:64px!important;height:64px!important;margin:0!important;transform:translate(-50%,-19px)!important;justify-self:auto!important;align-self:auto!important;z-index:3!important}
 .ref-mobile-create .svg,.gallery-mobile-nav .upload-fab .svg{width:28px!important;height:28px!important}
}
@media(max-width:520px){
 :root{--oc1915-mobile-x:14px}
 .ref-heading h1,.page-heading h1,.admin-heading h1{font-size:clamp(30px,10vw,39px)!important}.ref-card{padding:18px!important}.ref-storage-card{padding:20px!important}
 .page-topbar,.account-top,.admin-top{min-height:68px!important}.page-main,.account-main{padding-top:18px!important}
 .platform-two-col,.platform-three-col,.account-layout{display:grid!important;grid-template-columns:1fr!important;gap:14px!important}
 .gallery-main{padding-top:18px!important}.gallery-albums{grid-auto-columns:132px!important}.gallery-sort{height:42px!important;min-width:165px!important}.gallery-square-btn{width:42px!important;height:42px!important;flex-basis:42px!important}
}


/* Gallery keeps the same complete workspace navigation as Dashboard/Files. */
.gallery-sidebar>.ref-nav{flex:0 0 auto!important;min-height:0!important;overflow:visible!important;padding:0!important;gap:3px!important}
.gallery-sidebar>.ref-nav .ref-nav-label{padding-left:10px!important;padding-right:10px!important}
.gallery-sidebar>.ref-nav .ref-nav-link{min-height:40px!important;height:40px!important;flex-basis:40px!important;padding:0 10px!important}
.gallery-section-label{display:block!important;padding:14px 10px 6px!important;font-size:9.5px!important;line-height:1!important;letter-spacing:.16em!important;font-weight:850!important;color:var(--muted)!important}

/* Landing scale correction — keep the approved composition, reduce visual dominance. */
.ref-landing-body .ref-land-nav{width:min(1320px,calc(100% - 64px))!important}
.ref-landing-body .ref-land-logo{display:inline-flex!important;align-items:center!important;flex:0 0 auto!important}
.ref-landing-body .ref-land-logo img{width:154px!important;max-width:154px!important;max-height:34px!important;height:auto!important}
.ref-landing-body .ref-land-hero{width:min(1320px,calc(100% - 64px))!important;grid-template-columns:minmax(0,.88fr) minmax(520px,1.12fr)!important;gap:42px!important;min-height:440px!important}
.ref-landing-body .ref-device-showcase{height:398px!important;max-width:690px!important;width:100%!important;justify-self:end!important;margin-left:auto!important}
.ref-landing-body .ref-laptop{width:min(610px,100%)!important;height:356px!important;border-width:6px!important;border-radius:18px!important}
.ref-landing-body .ref-phone-shot{right:1%!important;bottom:4px!important;width:126px!important;max-width:19%!important;overflow:visible!important}
.ref-landing-body .ref-land-footer-brand img,.ref-landing-body .ref-land-footer img{width:136px!important;max-width:136px!important;max-height:31px!important;height:auto!important}
.ref-landing-body .ref-gallery-preview{min-height:112px!important;max-width:100%!important;gap:7px!important}
.ref-landing-body .ref-gallery-preview .land-product-shot{max-height:118px!important}
@media(max-width:1100px){
 .ref-landing-body .ref-land-nav,.ref-landing-body .ref-land-hero,.ref-landing-body .ref-feature-grid,.ref-landing-body .ref-land-detail-grid,.ref-landing-body .ref-land-bottom,.ref-landing-body .ref-land-footer{width:calc(100% - 40px)!important}
 .ref-landing-body .ref-land-hero{grid-template-columns:1fr!important;gap:24px!important}
 .ref-landing-body .ref-device-showcase{justify-self:center!important;margin:0 auto!important;max-width:640px!important;height:380px!important}
 .ref-landing-body .ref-laptop{width:min(580px,92vw)!important;height:338px!important}
 .ref-landing-body .ref-phone-shot{width:118px!important;max-width:22%!important;right:2%!important}
}
@media(max-width:700px){
 .ref-landing-body .ref-land-nav,.ref-landing-body .ref-land-hero,.ref-landing-body .ref-feature-grid,.ref-landing-body .ref-land-detail-grid,.ref-landing-body .ref-land-bottom,.ref-landing-body .ref-land-footer{width:calc(100% - 28px)!important}
 .ref-landing-body .ref-land-logo img{width:142px!important;max-width:142px!important;max-height:31px!important}
 .ref-landing-body .ref-device-showcase{height:270px!important;max-width:470px!important}
 .ref-landing-body .ref-laptop{width:min(430px,94vw)!important;height:248px!important;border-width:5px!important;border-radius:14px!important}
 .ref-landing-body .ref-phone-shot{width:88px!important;max-width:24%!important;right:0!important;bottom:0!important}
 .ref-landing-body .ref-land-footer-brand img,.ref-landing-body .ref-land-footer img{width:126px!important;max-width:126px!important}
}
@media(max-width:430px){
 .ref-landing-body .ref-land-logo img{width:134px!important;max-width:134px!important}
 .ref-landing-body .ref-device-showcase{height:236px!important}
 .ref-landing-body .ref-laptop{height:216px!important}
 .ref-landing-body .ref-phone-shot{width:76px!important;max-width:23%!important}
}

@media(max-width:960px){
  .gallery-view-controls{display:grid!important;grid-template-columns:minmax(0,1fr) repeat(3,42px)!important;align-items:center!important;justify-content:stretch!important;gap:8px!important;overflow:visible!important;padding:1px 0 0!important;min-width:0!important}
  .gallery-sort{min-width:0!important;width:100%!important;max-width:none!important;grid-column:1/2!important}
  .gallery-square-btn{width:42px!important;height:42px!important;flex:0 0 42px!important}
  .gallery-view-controls .gallery-square-btn{justify-self:stretch!important}
  .gallery-view-controls .gallery-square-btn:nth-of-type(2){grid-column:2}
  .gallery-view-controls .gallery-square-btn:nth-of-type(3){grid-column:3}
  .gallery-view-controls .gallery-square-btn:nth-of-type(4){grid-column:4}
  .gallery-toolbar{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:center!important;gap:8px!important}
  .gallery-select-toggle{min-width:0!important}
  .gallery-filter-btn{height:42px!important;padding:0 12px!important}
}
@media(max-width:560px){
  .gallery-view-controls{grid-template-columns:minmax(0,1fr) repeat(3,40px)!important;gap:7px!important}
  .gallery-square-btn{width:40px!important;height:40px!important;flex-basis:40px!important}
  .gallery-sort{height:40px!important;padding-inline:12px!important;font-size:15px!important}
  .gallery-toolbar{grid-template-columns:1fr auto!important}
  .gallery-filter-btn span{display:none!important}
  .gallery-filter-btn{width:40px!important;min-width:40px!important;padding:0!important;justify-content:center!important}
}
