/* App picker (/apps): solid white cards over the power-plant photo (the same scene as the sign-in page). Scoped to .apps-container so no other website page is affected.
   Frappe's own apps.css and execution_dashboard's apps_screen.css are written into the page after this file, so rules that must win use "html body" and !important. */
/* page background: the power-plant photo, sharp and unblurred, filling the window; a faint shade at the top keeps the white heading readable */
html:has(.apps-container),html:has(.apps-container) body{min-height:100%;background:linear-gradient(180deg,rgba(9,22,42,.28),rgba(9,22,42,0) 45%),url(/assets/refex/images/login-mobile.jpg) center 58%/cover no-repeat fixed,#3d5f86}
html:has(.apps-container) .page-content-wrapper,html:has(.apps-container) main,.container:has(.apps-container){background:transparent!important}
html body .apps-container{width:min(100%,900px);background:transparent!important;border:0!important;box-shadow:none!important;padding:24px 20px;gap:0}
html body .apps-container .title{font-size:24px;font-weight:700;letter-spacing:-.4px;color:#fff;text-align:center;text-shadow:0 2px 14px rgba(0,0,0,.45)}
html body .apps-container .title::after{content:"Choose where you want to work today.";display:block;margin-top:4px;font-size:13.5px;font-weight:400;letter-spacing:0;color:rgba(255,255,255,.92)}
html body .apps-container .apps{width:100%;margin-top:22px;gap:14px;justify-items:stretch;align-items:stretch;grid-template-columns:repeat(auto-fit,minmax(170px,1fr))!important}
/* cards: same size, logo in a fixed-height box so every title lines up */
html body .apps-container .app-icon{--c:#2878b8;position:relative;overflow:hidden;width:auto;height:auto;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:12px;padding:20px 12px 16px;border-radius:16px;border:1px solid #fff;background:#fff;box-shadow:0 14px 32px -14px rgba(0,0,0,.5);transition:transform .35s cubic-bezier(.2,.8,.2,1),box-shadow .35s,border-color .3s}
html body .apps-container .app-icon:nth-child(4n+2){--c:#6cb83e}html body .apps-container .app-icon:nth-child(4n+3){--c:#e86828}html body .apps-container .app-icon:nth-child(4n+4){--c:#388898}
html body .apps-container .app-icon::after{content:"";position:absolute;left:0;right:0;bottom:0;height:3px;background:linear-gradient(110deg,#2878b8,#6cb83e 36%,#e86828 68%,#388898);transform:scaleX(0);transform-origin:left;transition:transform .5s cubic-bezier(.2,.8,.2,1)}
html body .apps-container .app-icon:hover{transform:translateY(-4px);border-color:#fff;box-shadow:0 22px 40px -16px rgba(0,0,0,.6)}
html body .apps-container .app-icon:hover::after{transform:scaleX(1)}
/* logos are shown exactly as supplied by each app: contained, never cropped or recoloured */
html body .apps-container .app-logo,html body .apps-container .app-logo[app-name]{width:100%!important;height:56px!important;display:flex;align-items:center;justify-content:center;border-radius:0;transform:none}
html body .apps-container .app-logo img,html body .apps-container .app-logo[app-name] img{width:auto!important;height:auto!important;max-width:min(100%,128px)!important;max-height:56px!important;object-fit:contain;transition:transform .35s cubic-bezier(.3,1.5,.5,1),filter .3s}
html body .apps-container .app-icon:hover .app-logo img{transform:translateY(-3px) scale(1.08);filter:drop-shadow(0 8px 8px rgba(13,95,110,.22))}
/* App logos: each app's own artwork is set as the background of its logo image (the stock image stays in the page but is hidden); the logo area is a little taller so the artwork reads clearly */
html body .apps-container .app-logo[app-name="erpnext"],html body .apps-container .app-logo[app-name="hrms"],html body .apps-container .app-logo[app-name="execution_dashboard"],html body .apps-container .app-logo[app-name="refex_fleet"]{height:72px!important}
html body .apps-container .app-logo[app-name="erpnext"] img{background:url(/assets/refex/images/erpnext-new.png) center/contain no-repeat;width:124px!important;height:72px!important;max-width:none!important;max-height:none!important;object-fit:none;object-position:-999px 0}
html body .apps-container .app-logo[app-name="hrms"] img{background:url(/assets/refex/images/hr-charcoal.png) center/contain no-repeat;width:124px!important;height:72px!important;max-width:none!important;max-height:none!important;object-fit:none;object-position:-999px 0}
html body .apps-container .app-logo[app-name="execution_dashboard"] img{background:url(/assets/refex/images/execution-logo.svg) center/contain no-repeat;width:124px!important;height:72px!important;max-width:none!important;max-height:none!important;object-fit:none;object-position:-999px 0}
html body .apps-container .app-logo[app-name="refex_fleet"] img{background:url(/assets/refex/images/fleet-new.png) center/contain no-repeat;width:124px!important;height:72px!important;max-width:none!important;max-height:none!important;object-fit:none;object-position:-999px 0}
/* Frappe's own "set as default" tick stays, tucked inside the card so the card edge does not clip it */
html body .apps-container .set-default{top:8px;right:8px}
html body .apps-container .app-title{color:#12262b;font-size:14px;font-weight:600;letter-spacing:0;line-height:1.25;text-align:center;min-width:0}
/* Logout: filled dark teal with white text, so it stands out on the photo */
html body .apps-container .logout-btn{margin-top:20px;display:inline-flex;align-items:center;gap:8px;padding:6px 16px;border:1px solid rgba(255,255,255,.7);border-radius:10px;background:#0d5560!important;color:#fff!important;box-shadow:0 8px 20px -10px rgba(0,0,0,.55)}
html body .apps-container .logout-btn:hover{background:#0a464f!important}
html body .apps-container .logout-btn:focus-visible{outline:2px solid #fff;outline-offset:2px}
@media (max-width:900px){html body .apps-container .apps{grid-template-columns:repeat(auto-fit,minmax(150px,1fr))!important}}
@media (max-width:575px){html body .apps-container{padding:20px 14px}html body .apps-container .apps{grid-template-columns:repeat(2,minmax(0,1fr))!important}html body .apps-container .title{font-size:20px}}
@media (prefers-reduced-motion:reduce){html body .apps-container .app-icon,html body .apps-container .app-logo img,html body .apps-container .app-icon::after{transition:none}html body .apps-container .app-icon:hover,html body .apps-container .app-icon:hover .app-logo img{transform:none}}
