/* Opt-in Portal content spacing. Navigation and business workflows keep ownership. */
:root{--ukfp-content-gutter:16px;--ukfp-content-gap:12px;--ukfp-task-padding:12px;--ukfp-task-row-height:28px}
.portal-culture-line{display:none}
.welcome-copy{min-width:0}
.today-focus-error{justify-content:flex-start;gap:8px;border-color:#e1bd7c;background:#fffaf0;overflow-wrap:anywhere}
.today-focus-error p{margin:0;color:#805714}
.today-focus-error small{color:var(--muted)}
@media(max-width:640px){
  body[data-ukfp-content-layout="home"].is-logged-in:not(.today-focus-embed) .portal-header{justify-content:flex-start;padding:8px 0 12px!important}
  body[data-ukfp-content-layout="home"].is-logged-in .brand{flex-direction:row;align-items:center;gap:14px;text-align:left;width:100%}
  body[data-ukfp-content-layout="home"].is-logged-in .brand-logo-frame{width:76px;height:76px;flex-basis:76px;border-radius:16px}
  body[data-ukfp-content-layout="home"].is-logged-in .brand-copy{display:block;min-width:0}
  body[data-ukfp-content-layout="home"].is-logged-in .brand h1{font-size:22px;line-height:1.2;letter-spacing:.02em}
  body[data-ukfp-content-layout="home"].is-logged-in .brand p{margin-top:5px;font-size:12px;line-height:1.4;letter-spacing:0;font-weight:400;overflow-wrap:anywhere}
  body[data-ukfp-content-layout="home"].is-logged-in .user-bar{margin:8px 0 16px}
  body[data-ukfp-content-layout="home"].is-logged-in .welcome{align-items:flex-start;gap:10px;min-width:0}
  body[data-ukfp-content-layout="home"].is-logged-in .avatar{flex-shrink:0}
  body[data-ukfp-content-layout="home"].is-logged-in .user-name{font-size:16px;line-height:1.4;font-weight:600;overflow-wrap:anywhere}
  body[data-ukfp-content-layout="home"].is-logged-in .portal-culture-line{display:block;margin:5px 0 0;font-size:12px;font-weight:400;line-height:1.5;color:var(--muted,#5f7078);overflow-wrap:anywhere}
}
@media(max-width:980px){
  /* Override legacy mobile typography at the Home boundary, not globally.
     Keep editable controls at 16px so Safari need not zoom on focus. */
  body[data-ukfp-content-layout="home"] :is(input,select,textarea){font-size:16px!important}
  body[data-ukfp-content-layout="home"].is-logged-in .today-layer .summary-title h2{font-size:16px!important;line-height:1.35}
  body[data-ukfp-content-layout="home"]>.shell{width:100%;max-width:1460px;min-width:0;box-sizing:border-box}
  body[data-ukfp-content-layout="home"]>.shell>main{width:100%;max-width:100%;min-width:0}
  body[data-ukfp-content-layout="home"] :is(.welcome,.brand-copy,.attendance-metric>span:not(.status-dot)){min-width:0;overflow-wrap:anywhere}
  body[data-ukfp-content-layout] :is(.shell,.profile-shell,.profile-main,main,.portal-layer,#systemModules){box-sizing:border-box;min-width:0}
  body[data-ukfp-content-layout="home"].is-logged-in:not(.today-focus-embed)>.shell,
  body[data-ukfp-content-layout="profile"]>.profile-shell,
  body[data-ukfp-content-layout="management"] .ukfp-sidebar-layout>main{
    padding-left:var(--ukfp-content-gutter)!important;padding-right:var(--ukfp-content-gutter)!important;
    padding-left:max(var(--ukfp-content-gutter),env(safe-area-inset-left,0px))!important;
    padding-right:max(var(--ukfp-content-gutter),env(safe-area-inset-right,0px))!important;
  }
  body[data-ukfp-content-layout="home"].is-logged-in>.shell>main,
  body[data-ukfp-content-layout="profile"] .profile-main{padding-left:0!important;padding-right:0!important}
  body[data-ukfp-content-layout="home"].is-logged-in .portal-layer{padding-left:0;padding-right:0}
  html.today-focus-embed body[data-ukfp-content-layout="home"]>.shell,
  html.today-focus-embed body[data-ukfp-content-layout="home"]>.shell>main{padding-left:0!important;padding-right:0!important}
  html.today-focus-embed body[data-ukfp-content-layout="home"]>.shell>main{padding-top:0!important;padding-bottom:0!important}
  body[data-ukfp-content-layout="profile"] .profile-identity{min-width:0;overflow-wrap:anywhere}
  body[data-ukfp-content-layout="profile"] .profile-meta span{max-width:100%;overflow-wrap:anywhere}
  body[data-ukfp-content-layout="home"] .today-layer .employee-workspace{grid-auto-rows:auto;align-items:start;gap:var(--ukfp-content-gap)}
  body[data-ukfp-content-layout="home"] .today-layer .employee-workspace>:not(.today-focus-slot),
  body[data-ukfp-content-layout="home"] .today-layer .today-focus-slot>*{
    min-height:0;height:auto;min-width:0;box-sizing:border-box;padding:var(--ukfp-task-padding);
  }
  body[data-ukfp-content-layout="home"] .today-layer :is(.attendance-metrics,.warehouse-task-list){margin-top:8px;gap:2px}
  body[data-ukfp-content-layout="home"] .today-layer :is(.attendance-metric,.today-task-metric){min-height:var(--ukfp-task-row-height)}
  body[data-ukfp-content-layout="home"] .today-layer :is(.warehouse-summary,.home-diesel-balance){margin-top:8px}
  body[data-ukfp-content-layout="home"] .systems-layer .modules#systemModules{gap:var(--ukfp-content-gap)}
  body[data-ukfp-content-layout="home"] .systems-layer .module-card{box-sizing:border-box;min-width:0;width:100%;height:auto}
  body[data-ukfp-content-layout="home"] .systems-layer .module-card small{white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere;line-height:1.4}
}
@media(min-width:641px) and (max-width:760px){
  body[data-ukfp-content-layout="home"].is-logged-in.portal-system-view .systems-layer .modules#systemModules{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:360px){
  body[data-ukfp-content-layout="home"] .today-layer .attendance-metric{grid-template-columns:9px minmax(0,1fr) auto;gap:6px}
  body[data-ukfp-content-layout="home"] .today-layer .attendance-metric>span:not(.status-dot){min-width:0;overflow-wrap:anywhere}
  body[data-ukfp-content-layout="home"] .systems-layer .module-card{padding-left:8px;padding-right:8px}
}
