/* SME 0.47.0 — No-overlap KPI caps + licensed real equipment photography.
 * Employee portal only. No ticket, dispatch, scrolling, or business logic.
 * Licensed photos of identifiable Kubota equipment, with creator credits.
 */
body.sme-premium-ui:not(.customer-portal-mode):not(.command-wallboard) .app .content :is(.kpi,.dashboard-grid .dash-kpi){
 display:flex!important;flex-direction:column!important;align-items:stretch!important;
 justify-content:flex-start!important;gap:0!important;
 padding:0 13px 14px!important;min-height:139px!important;
 height:auto!important
}
/* Let long titles determine their own metal-strip height instead of placing
   an absolute label over the number. The old decorative ::before stays behind
   the real strip for compatibility with previous visual tests. */
body.sme-premium-ui:not(.customer-portal-mode):not(.command-wallboard) .app .content :is(.kpi,.dashboard-grid .dash-kpi) :is(.kpi-label,.dash-kpi-label){
 position:relative!important;inset:auto!important;top:auto!important;
 left:auto!important;right:auto!important;bottom:auto!important;
 z-index:2!important;
 display:flex!important;align-items:center!important;flex:none!important;
 width:calc(100% + 26px)!important;max-width:none!important;
 min-height:57px!important;height:auto!important;max-height:none!important;
 margin:0 -13px 12px!important;padding:9px 37px 9px 13px!important;
 background:linear-gradient(112deg,#dadadd,#a1a1a6 48%,#c4c4c8)!important;
 color:#171719!important;border-bottom:1px solid #727278!important;
 box-shadow:0 3px 7px rgba(0,0,0,.23)!important;
 font-size:clamp(9px,.78vw,11px)!important;line-height:1.25!important;
 letter-spacing:.025em!important;text-align:left!important;
 white-space:normal!important;overflow-wrap:break-word!important;
 word-break:normal!important;text-overflow:clip!important;
 -webkit-line-clamp:unset!important
}
body.sme-premium-ui:not(.customer-portal-mode):not(.command-wallboard) .app .content :is(.kpi,.dashboard-grid .dash-kpi) .sme-kpi-icon,
body.sme-premium-ui:not(.customer-portal-mode):not(.command-wallboard) .app .content :is(.kpi-label,.dash-kpi-label)>.sme-kpi-icon{
 position:absolute!important;left:auto!important;right:11px!important;
 top:50%!important;bottom:auto!important;transform:translateY(-50%)!important;
 width:19px!important;height:19px!important;flex:0 0 19px!important;
 margin:0!important;padding:0!important;z-index:3!important;
 color:#242427!important;background:transparent!important;border:0!important;
 pointer-events:none!important
}
body.sme-premium-ui:not(.customer-portal-mode):not(.command-wallboard) .app .content :is(.kpi,.dashboard-grid .dash-kpi) :is(.kpi-value,.dash-kpi-value){
 position:relative!important;inset:auto!important;z-index:1!important;
 display:block!important;flex:0 0 auto!important;
 margin:0!important;padding:0!important;min-height:0!important;
 line-height:1.18!important;
 font-size:clamp(20px,2.05vw,31px)!important;
 color:#f6f6f8!important;font-weight:900!important;
 white-space:normal!important;overflow-wrap:break-word!important;
 text-overflow:clip!important
}
body.sme-premium-ui:not(.customer-portal-mode):not(.command-wallboard) .app .content :is(.kpi,.dashboard-grid .dash-kpi) :is(.kpi-note,.dash-kpi-note){
 position:relative!important;z-index:1!important;flex:0 0 auto!important;
 margin-top:6px!important;color:#d8d8dc!important;line-height:1.4!important;
 white-space:normal!important;overflow-wrap:break-word!important
}
/* 0.48 — Full photo in taller, readable dashboard cards. */
body.sme-premium-ui:not(.customer-portal-mode):not(.command-wallboard) .app .content .sme-photo-gallery{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px!important;margin:2px 0 18px!important;min-width:0}
body.sme-premium-ui:not(.customer-portal-mode):not(.command-wallboard) .app .content .sme-photo-tile{display:flex;flex-direction:column;position:relative;isolation:isolate;min-width:0;height:265px;margin:0;overflow:hidden;border-radius:11px;background:#171719;border:1px solid #78787d;box-shadow:0 9px 23px rgba(0,0,0,.3)}
body.sme-premium-ui:not(.customer-portal-mode):not(.command-wallboard) .app .content .sme-photo-tile::before{content:'';position:absolute;inset:0 0 57px;z-index:0;pointer-events:none;background:linear-gradient(rgba(17,17,19,.67),rgba(17,17,19,.67)),linear-gradient(#242429,#18181b);filter:blur(12px);transform:scale(1.08)}
body.sme-premium-ui:not(.customer-portal-mode):not(.command-wallboard) .app .content .sme-photo-tile img{position:relative;z-index:1;display:block;width:100%;height:calc(100% - 57px);min-height:0;flex:1 1 auto;object-fit:contain;object-position:center;filter:saturate(.96) contrast(1.04)}
body.sme-premium-ui:not(.customer-portal-mode):not(.command-wallboard) .app .content .sme-photo-tile figcaption{position:relative;inset:auto;z-index:2;flex:0 0 57px;min-width:0;display:flex;flex-direction:column;justify-content:center;gap:3px;padding:7px 11px;background:linear-gradient(110deg,#333337,#202023)!important;border-top:1px solid #66666c;color:#f6f6f8!important}
body.sme-premium-ui:not(.customer-portal-mode):not(.command-wallboard) .app .content .sme-photo-tile figcaption b{color:#f6f6f8!important;font-weight:900!important;font-size:13px!important;line-height:1.2}
body.sme-premium-ui:not(.customer-portal-mode):not(.command-wallboard) .app .content .sme-photo-tile figcaption a{color:#d6d6db!important;font-size:10px!important;font-weight:650!important;line-height:1.2;text-decoration:underline;text-underline-offset:2px;overflow-wrap:anywhere}
body.sme-premium-ui:not(.customer-portal-mode):not(.command-wallboard) .app .content .sme-photo-credits{grid-column:1/-1;justify-self:end;font-size:10px!important;color:#d2d2d6!important;text-decoration:underline;text-underline-offset:2px}
body.sme-premium-ui:not(.customer-portal-mode):not(.command-wallboard) .app .content .sme-photo-tile:focus-within{outline:2px solid #f26a21;outline-offset:2px}
/* SME 0.55: full-bleed employee photography fades in from the left over charcoal.
   All images are assigned at runtime; gallery photos never repeat in panels.
   When a section has a body photo, the header stays solid titanium/carbon. */
body.sme-premium-ui:not(.customer-portal-mode):not(.command-wallboard) .app .content [data-sme-photo-surface="header"]{
 background-image:linear-gradient(90deg,rgba(16,16,19,.97) 0%,rgba(16,16,19,.90) 22%,rgba(16,16,19,.65) 44%,rgba(16,16,19,.29) 70%,rgba(16,16,19,.09) 100%),
 var(--sme-unique-photo)!important;
 background-color:#202023!important;
 background-position:center,right center!important;
 background-size:cover,cover!important;
 background-repeat:no-repeat!important
}
@media(min-width:701px) and (max-width:1150px){body.sme-premium-ui:not(.customer-portal-mode):not(.command-wallboard) .app .content .sme-photo-gallery{grid-template-columns:repeat(2,minmax(0,1fr))}body.sme-premium-ui:not(.customer-portal-mode):not(.command-wallboard) .app .content .sme-photo-tile:last-of-type{grid-column:1/-1;height:245px}}
@media(max-width:760px){
 body.sme-premium-ui:not(.customer-portal-mode):not(.command-wallboard) .app .content :is(.kpi,.dashboard-grid .dash-kpi){
  min-height:133px!important;padding:0 10px 12px!important
 }
 body.sme-premium-ui:not(.customer-portal-mode):not(.command-wallboard) .app .content :is(.kpi,.dashboard-grid .dash-kpi) :is(.kpi-label,.dash-kpi-label){
  width:calc(100% + 20px)!important;margin:0 -10px 10px!important;
  min-height:61px!important;padding:8px 30px 8px 10px!important;
  font-size:10px!important;line-height:1.28!important
 }
 body.sme-premium-ui:not(.customer-portal-mode):not(.command-wallboard) .app .content :is(.kpi,.dashboard-grid .dash-kpi) .sme-kpi-icon{
  right:7px!important;width:16px!important;height:16px!important
 }

 body.sme-premium-ui:not(.customer-portal-mode):not(.command-wallboard) .app .content .sme-photo-gallery{grid-template-columns:minmax(0,1fr);gap:10px!important}
 body.sme-premium-ui:not(.customer-portal-mode):not(.command-wallboard) .app .content .sme-photo-tile{height:240px;border-radius:9px}
 
}
@media(prefers-reduced-motion:reduce){body.sme-premium-ui:not(.customer-portal-mode):not(.command-wallboard) .app .content :is(.kpi,.dash-kpi,.sme-photo-tile){transition:none!important}}

/* Full-width, left-faded photography belongs to the CONTENT / body, never the
   header. A strong left-side overlay protects table and ticket legibility. */
body.sme-premium-ui:not(.customer-portal-mode):not(.command-wallboard) .app .content [data-sme-photo-surface="body"]{
 background-color:#202023!important;
 background-image:linear-gradient(90deg,rgba(19,19,22,.98) 0%,rgba(19,19,22,.91) 20%,rgba(19,19,22,.66) 42%,rgba(19,19,22,.28) 72%,rgba(19,19,22,.12) 100%),
 var(--sme-unique-photo)!important;
 background-repeat:no-repeat!important;
 background-position:center,right center!important;
 background-size:cover,cover!important
}
/* Preserve metallic department and card headers when their content has a photo.
   The header itself does not receive an equipment photograph. */
body.sme-premium-ui:not(.customer-portal-mode):not(.command-wallboard) .app .content [data-sme-photo-surface="body"] > :is(
 .panel-head,.dash-card-head,.dash-widget-head,.creator-panel-head,
 .tech-department-header,.tech-status-head,.dispatch-live-board-title,
 .file-folder-bar,.hbs-recon-head,.planner-head,.section-title
){
 /* Let the real equipment show through the title strip.
    A translucent charcoal fade replaces the opaque gray rectangle. */
 background-image:linear-gradient(90deg,rgba(17,17,19,.68),rgba(17,17,19,.12))!important;
 background-color:transparent!important;
 color:#f6f6f8!important;
 text-shadow:0 1px 3px rgba(0,0,0,.7)!important
}
body.sme-premium-ui:not(.customer-portal-mode):not(.command-wallboard) .app .content [data-sme-photo-surface="body"] > :is(
 .panel-head,.dash-card-head,.dash-widget-head,.creator-panel-head,
 .tech-department-header,.tech-status-head,.dispatch-live-board-title,
 .file-folder-bar,.hbs-recon-head,.planner-head,.section-title
) :is(b,strong,h2,h3,h4,small,.panel-title,.dash-card-title,.dash-widget-title,.tech-department-name){
 color:#f6f6f8!important;text-shadow:0 1px 4px rgba(0,0,0,.75)!important
}
@media(max-width:760px){
 body.sme-premium-ui:not(.customer-portal-mode):not(.command-wallboard) .app .content [data-sme-photo-surface="header"]{
  background-position:center,right center!important;background-size:cover,cover!important
 }
 body.sme-premium-ui:not(.customer-portal-mode):not(.command-wallboard) .app .content [data-sme-photo-surface="body"]{
  background-position:center,right center!important;background-size:cover,cover!important
 }
}

/* A visible photo remains in the shell header even when its route's main
   content is a tools/custom workspace or an empty-state page. */
body.sme-premium-ui:not(.customer-portal-mode):not(.command-wallboard) .app .content .shell > .page-head[data-sme-photo-surface="header"]{
 background-color:#202023!important;
 background-image:linear-gradient(90deg,rgba(16,16,19,.97) 0%,rgba(16,16,19,.89) 23%,rgba(16,16,19,.62) 46%,rgba(16,16,19,.25) 74%,rgba(16,16,19,.08) 100%),
 var(--sme-unique-photo)!important;
 background-position:center,right center!important;
 background-size:cover,cover!important;background-repeat:no-repeat!important
}


/* Photo headings: never add a second opaque gray label block over the image.
   This is cosmetic and does not alter toolbars or customer-facing pages. */
body.sme-premium-ui:not(.customer-portal-mode):not(.command-wallboard) .app .content .shell > .page-head[data-sme-photo-surface="header"] :is(.page-head-main,.title,.eyebrow,.subtitle){
 background:transparent!important;
 background-image:none!important;
 box-shadow:none!important
}
body.sme-premium-ui:not(.customer-portal-mode):not(.command-wallboard) .app .content .shell > .page-head[data-sme-photo-surface="header"] :is(.title,.subtitle,.eyebrow){
 text-shadow:0 2px 6px rgba(0,0,0,.78)!important
}
