/* Shared file explorer (Documents and Drawings) */
.fx{display:grid;gap:10px;min-width:0}
.fx-bar{display:flex;align-items:center;gap:8px;min-width:0;background:#fff;border:1px solid #d8e1ea;border-radius:10px;padding:6px 8px}
.fx-up{flex:none;width:38px;min-width:38px;min-height:38px;padding:0;font-size:18px;font-weight:700}
.fx-up:disabled{opacity:.35}
.fx-crumbs{display:flex;align-items:center;gap:2px;min-width:0;flex:1;overflow-x:auto;scrollbar-width:none;white-space:nowrap}
.fx-crumbs::-webkit-scrollbar{display:none}
.fx-crumbs button{flex:none;border:0;background:none;min-height:36px;padding:0 8px;border-radius:6px;font-weight:600;color:#475467;cursor:pointer;box-shadow:none}
.fx-crumbs button:hover{background:#eef4f7}
.fx-crumbs button[aria-current]{color:#17365d;font-weight:800}
.fx-sep{color:#98a2b3;flex:none}
.fx-search{flex:0 1 240px;width:240px;min-width:120px;min-height:38px}
.fx-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.fx-toolbar>button{min-height:38px}
.fx-spacer{flex:1}
.fx-views{display:inline-flex;border:1px solid #d0d5dd;border-radius:8px;overflow:hidden}
.fx-views button{border:0;border-radius:0;min-height:36px;min-width:40px;padding:0 10px;background:#fff;font-size:16px;box-shadow:none}
.fx-views button[aria-pressed=true]{background:#147783;color:#fff}
[data-fx-select][aria-pressed=true]{background:#17365d;color:#fff;border-color:#17365d}
.fx-selbar{display:flex;flex-wrap:wrap;align-items:center;gap:8px;background:#e6f3f8;border:1px solid #b9dbe7;border-radius:10px;padding:6px 10px}
.fx-selbar[hidden]{display:none}
.fx-selbar strong{margin-right:auto;color:#17365d}
.fx-selbar button{min-height:34px;padding:0 12px}
.fx-note{margin:0;color:#667085;font-size:14px}
.fx-empty{padding:28px 12px;text-align:center;color:#667085;background:#fff;border:1px dashed #d0d5dd;border-radius:10px}
.fx-items{display:grid;gap:6px}
.fx-item{position:relative;cursor:default;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;border-radius:10px;outline:none}
.fx-item:focus-visible{box-shadow:0 0 0 2px #2e7d9a}
.fx-svg{display:block;width:100%;height:100%}
.fx-name{color:#10243f;font-weight:600;overflow-wrap:break-word;word-break:normal;hyphens:none}
.fx-more{border:0;background:none;box-shadow:none;min-height:32px;min-width:32px;padding:0;font-size:18px;line-height:1;color:#667085;border-radius:6px;cursor:pointer}
.fx-more:hover{background:#e4ecf2;color:#17365d}
.fx-check{display:none}
.is-selecting .fx-check{display:block;position:absolute;width:20px;height:20px;border:2px solid #98a2b3;border-radius:5px;background:#fff;z-index:1}
.is-selecting .fx-folder .fx-check{visibility:hidden}
.fx-item.is-selected .fx-check{background:#147783;border-color:#147783}
.fx-item.is-selected .fx-check::after{content:"✓";display:block;color:#fff;font:700 13px/16px Arial,sans-serif;text-align:center}
.fx-item.is-selected{background:#dcedf5;box-shadow:inset 0 0 0 1px #9fc9db}
/* Big icons */
.fx[data-fx-layout=icons] .fx-items{grid-template-columns:repeat(auto-fill,minmax(118px,1fr));gap:8px}
.fx[data-fx-layout=icons] .fx-item{display:flex;flex-direction:column;align-items:center;text-align:center;padding:12px 6px 10px;gap:6px;min-width:0}
.fx[data-fx-layout=icons] .fx-item:hover:not(.is-selected){background:#eef4f7}
.fx[data-fx-layout=icons] .fx-icon{width:58px;height:58px;display:flex;align-items:center;justify-content:center}
.fx[data-fx-layout=icons] .fx-folder .fx-icon{width:66px}
.fx[data-fx-layout=icons] .fx-name{font-size:13px;line-height:1.25;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;max-width:100%}
.fx[data-fx-layout=icons] .fx-type,.fx[data-fx-layout=icons] .fx-date,.fx[data-fx-layout=icons] .fx-by{display:none}
.fx[data-fx-layout=icons] .fx-sub{font-size:11px;color:#667085;line-height:1.2;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;max-width:100%}
.fx[data-fx-layout=icons] .fx-sub:empty{display:none}
.fx[data-fx-layout=icons] .fx-more{position:absolute;top:2px;right:2px;opacity:0}
.fx[data-fx-layout=icons] .fx-item:hover .fx-more,.fx[data-fx-layout=icons] .fx-item:focus-within .fx-more,.fx[data-fx-layout=icons] .fx-item.is-selected .fx-more{opacity:1}
.fx[data-fx-layout=icons] .is-selecting .fx-check{top:6px;left:6px}
/* List */
.fx[data-fx-layout=list] .fx-items{gap:0;background:#fff;border:1px solid #d8e1ea;border-radius:10px;overflow:hidden}
.fx-head,.fx[data-fx-layout=list] .fx-item{display:grid;grid-template-columns:34px minmax(0,1fr) 150px 110px 140px 36px;align-items:center;gap:10px;padding:0 10px}
.fx-head{padding-top:0;padding-bottom:0;color:#667085;font-size:12px}
.fx-sort{border:0;background:none;box-shadow:none;padding:0;min-height:30px;text-align:left;font:inherit;font-weight:700;color:#667085;cursor:pointer}
.fx-sort.is-on{color:#17365d}
.fx[data-fx-layout=list] .fx-item{min-height:46px;border-radius:0;border-top:1px solid #eef2f6}
.fx[data-fx-layout=list] .fx-item:first-child{border-top:0}
.fx[data-fx-layout=list] .fx-item:hover:not(.is-selected){background:#f5f9fb}
.fx[data-fx-layout=list] .fx-icon{width:28px;height:30px}
.fx[data-fx-layout=list] .fx-name{font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fx[data-fx-layout=list] .fx-type,.fx[data-fx-layout=list] .fx-date,.fx[data-fx-layout=list] .fx-by{font-size:13px;color:#475467;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fx[data-fx-layout=list] .fx-sub{display:none}
.fx[data-fx-layout=list] .is-selecting .fx-item{grid-template-columns:24px 34px minmax(0,1fr) 150px 110px 140px 36px}
.fx[data-fx-layout=list] .is-selecting .fx-check{position:static}
/* Drag targets */
.is-drag-active .fx-folder,.is-drag-active .fx-crumbs button:not([aria-current]){outline:2px dashed #9fbfcd;outline-offset:1px}
.fx-folder.is-drop-over,.fx-crumbs button.is-drop-over,.fx-up.is-drop-over{outline:2px solid #2e7d9a!important;background:#e6f3f8!important}
/* Menu */
.fx-menu{position:fixed;z-index:2147483000;min-width:190px;max-width:80vw;background:#fff;border:1px solid #d0d5dd;border-radius:10px;box-shadow:0 10px 30px rgba(16,24,40,.22);padding:5px;display:grid}
.fx-menu button{border:0;background:none;box-shadow:none;text-align:left;min-height:40px;padding:0 12px;border-radius:7px;font-weight:600;color:#17365d;cursor:pointer;white-space:nowrap}
.fx-menu button:hover,.fx-menu button:focus{background:#eef4f7;outline:none}
.fx-menu button.is-danger{color:#b42318}
.fx-menu hr{border:0;border-top:1px solid #eef2f6;margin:4px 2px}
/* Save As / move dialogs */
.fx-dialog{width:min(520px,calc(100vw - 24px));border:0;border-radius:14px;padding:18px;box-shadow:0 20px 50px rgba(16,24,40,.3)}
.fx-dialog form{display:grid;gap:12px}
.fx-dialog label{display:grid;gap:4px;font-size:13px;font-weight:700;color:#344054}
.fx-dialog .dialog-head{display:flex;align-items:center;justify-content:space-between;gap:10px}
.fx-dialog .dialog-head h2{margin:0;font-size:18px}
.fx-tree{max-height:min(46vh,340px);overflow:auto;border:1px solid #d8e1ea;border-radius:8px;padding:4px;display:grid;gap:1px;background:#fbfdfe}
.fx-tree button{display:flex;align-items:center;gap:8px;border:0;background:none;box-shadow:none;text-align:left;min-height:36px;padding:0 8px;border-radius:6px;font-weight:600;color:#17365d;cursor:pointer}
.fx-tree button .fx-tree-icon{width:22px;height:19px;flex:none}
.fx-tree button[aria-pressed=true]{background:#147783;color:#fff}
.fx-tree-new{display:flex;gap:6px}.fx-tree-new input{flex:1}
.fx-dialog .form-actions{display:flex;justify-content:flex-end;gap:8px}
.fx-dialog p{margin:0;color:#667085;font-size:13px}
@media(max-width:760px){
 .fx-bar{flex-wrap:wrap}
 .fx-search{flex:1 1 0;width:auto;order:3;min-width:0}
 .fx-views{order:4;flex:none}
 .fx-crumbs{flex:1 1 calc(100% - 50px)}
 .fx-toolbar{gap:6px}
 .fx-toolbar>button{min-height:36px;font-size:14px}
 .fx[data-fx-layout=icons] .fx-items{grid-template-columns:repeat(auto-fill,minmax(96px,1fr));gap:4px}
 .fx[data-fx-layout=icons] .fx-item{padding:10px 4px 8px}
 .fx[data-fx-layout=icons] .fx-icon{width:50px;height:50px}
 .fx[data-fx-layout=icons] .fx-folder .fx-icon{width:58px}
 .fx[data-fx-layout=icons] .fx-more{opacity:1;top:0;right:0;min-height:28px;min-width:28px;font-size:16px}
 .fx-head{display:none!important}
 .fx[data-fx-layout=list] .fx-item,.fx[data-fx-layout=list] .is-selecting .fx-item{grid-template-columns:30px minmax(0,1fr) 34px;grid-template-areas:"icon name more" "icon sub more";row-gap:0;padding:6px 8px;min-height:54px}
 .fx[data-fx-layout=list] .is-selecting .fx-item{grid-template-columns:22px 30px minmax(0,1fr) 34px;grid-template-areas:"check icon name more" "check icon sub more"}
 .fx[data-fx-layout=list] .fx-check{grid-area:check}
 .fx[data-fx-layout=list] .fx-icon{grid-area:icon}
 .fx[data-fx-layout=list] .fx-name{grid-area:name}
 .fx[data-fx-layout=list] .fx-sub{grid-area:sub;display:block;font-size:12px;color:#667085;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .fx[data-fx-layout=list] .fx-type,.fx[data-fx-layout=list] .fx-date,.fx[data-fx-layout=list] .fx-by{display:none}
 .fx[data-fx-layout=list] .fx-more{grid-area:more}
 .fx-toolbar>button{padding:0 12px}
}
.fx-choices{flex-wrap:wrap}
.fx-dialog textarea{min-height:64px}
.is-selecting .fx-item.is-fixed .fx-check{visibility:hidden}
.fx-back .fx-name{color:#147783}
.fx-back{cursor:pointer}
.is-drag-active .fx-back{outline:2px dashed #9fbfcd;outline-offset:1px}
.fx-back.is-drop-over{outline:2px solid #2e7d9a!important;background:#e6f3f8!important}
/* Photos and avatars as icons */
.fx-photo{display:block;width:100%;height:100%;object-fit:cover;border-radius:10px;background:#e4ecf2;box-shadow:0 1px 3px rgba(16,24,40,.18)}
.fx-avatar{display:flex;align-items:center;justify-content:center;width:100%;height:100%;border-radius:50%;color:#fff;font:700 18px/1 Arial,Helvetica,sans-serif;letter-spacing:.02em}
.fx[data-fx-layout=icons] .fx-icon.has-photo{width:100%;max-width:150px;height:96px}
.fx[data-fx-layout=icons] .fx-item:has(.fx-avatar) .fx-icon{width:56px;height:56px}
.fx[data-fx-layout=list] .fx-avatar{font-size:11px}
.fx[data-fx-layout=list] .fx-icon.has-photo{width:30px;height:30px}.fx[data-fx-layout=list] .fx-photo{border-radius:6px}
@media(max-width:760px){.fx[data-fx-layout=icons] .fx-icon.has-photo{height:78px}}
/* One photo look everywhere (site photos, plant and vehicle photos): square thumbnails with an Add tile */
.pg{display:grid;grid-template-columns:repeat(auto-fill,minmax(112px,1fr));gap:10px;padding:10px;border:1px dashed #c9d6e1;border-radius:12px;background:#f8fbfd;transition:background .15s,border-color .15s}
.pg.is-over{border-color:#2e7d9a;background:#e6f3f8}
.pg .site-photo-grid{display:contents}
.pg .pg-item,.pg .site-photo-grid figure.pg-item{position:relative;margin:0;display:flex;flex-direction:column;gap:4px;min-width:0;background:none;border:0;border-radius:0;overflow:visible}
.pg-thumb{display:block;width:100%;aspect-ratio:1;border-radius:10px;overflow:hidden;background:#e4ecf2;border:0;padding:0!important;box-shadow:0 1px 3px rgba(16,24,40,.16);cursor:zoom-in}
.pg .pg-thumb img,.pg .site-photo-grid .pg-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.pg-item.is-cover .pg-thumb{outline:3px solid #f59e0b;outline-offset:1px}
.pg-badge{position:absolute;left:6px;top:6px;background:#f59e0b;color:#fff;font:700 11px/1 Arial,Helvetica,sans-serif;padding:4px 7px;border-radius:999px;pointer-events:none}
.pg .pg-wait{background:#475467;color:#fff;margin:0;max-width:calc(100% - 12px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pg-tools{position:absolute;right:5px;top:5px;display:flex;gap:4px}
.pg-tools button{min-height:28px;min-width:28px;width:28px;height:28px;padding:0;border-radius:50%;border:0;background:rgba(16,24,40,.62);color:#fff;font-size:14px;line-height:1;cursor:pointer;box-shadow:none}
.pg-tools button:hover{background:#17365d}.pg-tools .pg-del:hover{background:#b42318}
.pg-add{aspect-ratio:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;border:2px dashed #9fbfcd!important;border-radius:10px;background:#fff;color:#147783;cursor:pointer;min-height:0;padding:0;font:inherit;box-shadow:none}
.pg-add span{font-size:32px;line-height:1;font-weight:300}.pg-add small{font-weight:700;font-size:12px}
.pg-add:hover,.pg-add:focus-visible{background:#eef7fa;border-color:#147783!important;outline:none}
@media(pointer:fine){.pg-camera{display:none}}
.pg-head{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 10px;margin:0 0 8px}.pg-head h3,.pg-head strong{margin:0;color:#17365d;font-size:16px}.pg-head small{color:#667085;flex:1;min-width:160px}
.pg-link{border:0!important;background:none!important;color:#147783;font-weight:700;min-height:30px;padding:0 4px;box-shadow:none;cursor:pointer}
.pg-caption{display:grid;gap:4px;margin-top:10px;font-size:13px;font-weight:700;color:#344054}
.pg-status{margin:6px 0 0;color:#667085;font-size:13px}.pg-status:empty{display:none}
.pg .pg-item figcaption{padding:0;font-size:11px;color:#667085;display:grid;gap:2px;overflow-wrap:anywhere}
.pg .pg-item figcaption small{margin:0}
.pg-item figcaption details summary{cursor:pointer;color:#147783;font-weight:700;font-size:12px;min-height:24px}
.pg-item figcaption textarea{min-height:60px;font-size:13px}
.pg-item figcaption .error:empty{display:none}
@media(max-width:760px){.pg{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;padding:6px}.pg-add span{font-size:26px}}
/* Crew licence and White Card photos in the same style */
.credential-photo [data-photo-view] img{width:84px;height:84px;object-fit:cover;border-radius:10px;border:0;box-shadow:0 1px 3px rgba(16,24,40,.16)}
.credential-photo-add{flex-direction:column;justify-content:center;min-height:84px;min-width:84px;padding:6px 10px;border:2px dashed #9fbfcd;border-radius:10px;background:#fff;font-size:12px;text-align:center}
.credential-photo-add:hover{background:#eef7fa;border-color:#147783}
.document-photo-gallery>summary{font-weight:700}
