/* =========================================================
   The suite shell: what every app's rail + topbar needs on top of portal.css.

   portal.css is the InsightAndroid concept sheet (generated, not hand-edited). The concept keeps
   the rail's collapsed and drawer state on <body>; the suite's apps are Blazor layouts and keep it
   on their .app wrapper, so these rules make the concept's --rail-w follow that wrapper. They were
   in the CMS's admin.css, which is why the RMA Portal's and the CRM's rails did not collapse.

   Loaded after portal.css by every app with the flat material (CMS, customer portal, RMA, CRM).
   ========================================================= */

/* Brand block and icons */
/* Every app carries its full name ("CaptureTech License Manager"): one that does not fit the rail breaks into two even
   lines ("CaptureTech / Service Desk") instead of leaving one word alone on the second. */
html[data-ui="next"] .rail .brand .word{margin-left:6px;min-width:0;line-height:1.12;text-wrap:balance;}
html[data-ui="next"] .rail .brand svg{height:22px;width:auto;}
html[data-ui="next"] .auth-head .brand svg{height:22px;width:auto;margin-right:2px;}
html[data-ui="next"] .rail .item svg.ico{width:16px;height:16px;flex-shrink:0;}
html[data-ui="next"] .scope svg.s-chev{width:11px;height:11px;}
/* The topbar's scope ("CaptureTech | Back office", "Ordering for | Noordhaven"): its small label and its value share one
   baseline. Centred one by one, each in a line box of its own size, the label sat a pixel above the value. One line box as
   high as the control (32px less its border) keeps the pair in the middle; the chevron is centred on its own. */
html[data-ui="next"] .scope{align-items:baseline;line-height:30px;}
html[data-ui="next"] .scope > .s-label,html[data-ui="next"] .scope > .s-value{line-height:inherit;}
html[data-ui="next"] .scope > svg,html[data-ui="next"] .scope > .s-chev{align-self:center;}
html[data-ui="next"] main{display:block;}

/* Collapse: the rail and the shell both read --rail-w from the layout's .app wrapper. */
html[data-ui="next"] .app{min-height:100vh;}
html[data-ui="next"] .app.rail-collapsed{--rail-w:60px;}

/* Rail footer: two quiet lines, gone when collapsed. */
html[data-ui="next"] .rail-foot small{display:block;font-size:11px;color:var(--ink-4);line-height:1.5;}
html[data-ui="next"] .rail.collapsed .rail-foot{display:none;}
/* The version after the app's name: as quiet as the line it sits in, a link only on hover; it opens "What's new". */
html[data-ui="next"] .rail-foot .rail-version{all:unset;cursor:pointer;color:inherit;font:inherit;}
html[data-ui="next"] .rail-foot .rail-version:hover{color:var(--ink-2);text-decoration:underline;}
html[data-ui="next"] .rail-foot .rail-version:focus-visible{outline:2px solid var(--blue);outline-offset:2px;border-radius:2px;}
html[data-ui="next"] .whats-new section + section{margin-top:16px;}
html[data-ui="next"] .whats-new h4{margin:0 0 6px;font-size:14px;}
html[data-ui="next"] .whats-new ul{margin:0;padding-left:18px;}
html[data-ui="next"] .whats-new li{margin:2px 0;line-height:1.45;overflow-wrap:anywhere;}
/* The rail's C sits behind the navigation and the footer, never over them. */
html[data-ui="next"] .rail > .brand,html[data-ui="next"] .rail > nav,html[data-ui="next"] .rail > .rail-foot{position:relative;z-index:1;}

/* Responsive grids of the Ui components */
html[data-ui="next"] .grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr));}
html[data-ui="next"] .grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr));}
html[data-ui="next"] .grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr));}
@media (max-width:1180px){
  html[data-ui="next"] .grid-cols-3,html[data-ui="next"] .grid-cols-4{grid-template-columns:repeat(2,minmax(0,1fr));}
}

/* Below 1024px the rail is a drawer over the page. */
@media (max-width:1023px){
  html[data-ui="next"] .app,html[data-ui="next"] .app.rail-collapsed{--rail-w:0px;}
  html[data-ui="next"] .rail.open{translate:0 0;box-shadow:var(--shadow-pop);}
  html[data-ui="next"] .app.rail-open .rail-scrim{opacity:1;visibility:visible;}
}
@media (max-width:900px){
  html[data-ui="next"] .userchip .u-name,html[data-ui="next"] .userchip .u-role{display:none;}
  html[data-ui="next"] .topbar .scope{max-width:40vw;}
  html[data-ui="next"] .topbar .s-value{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block;}
}
@media (max-width:640px){
  html[data-ui="next"] .grid,html[data-ui="next"] .grid[style]{grid-template-columns:minmax(0,1fr) !important;}
  html[data-ui="next"] .stat .stat-value{font-size:24px;}
  html[data-ui="next"] .page{padding:12px 12px 32px;}
  html[data-ui="next"] .panel-head{flex-wrap:wrap;gap:8px;}
  html[data-ui="next"] .tbl-wrap{overflow-x:auto;}
}

/* ---------- SuiteBar: the shell without the rail (the customer portal, Authentication's own pages) ---------- */
html[data-ui="next"] .bar-shell{min-height:100vh;}
html[data-ui="next"] .bar-top{padding:0 16px;}
html[data-ui="next"] .bar-brand{display:inline-flex;align-items:center;gap:9px;color:var(--ink);font-family:var(--font-head);font-weight:700;font-size:15px;letter-spacing:-0.01em;}
html[data-ui="next"] .bar-brand:hover{color:var(--ink);}
html[data-ui="next"] .bar-page{max-width:1240px;margin:0 auto;}
html[data-ui="next"] .bar-skip{position:absolute;left:12px;top:-60px;z-index:200;padding:8px 12px;border-radius:var(--r-ctl);background:var(--surface);color:var(--blue);box-shadow:var(--shadow-pop);font-weight:600;}
html[data-ui="next"] .bar-skip:focus{top:10px;}
@media (max-width:640px){
  html[data-ui="next"] .bar-top .div{display:none;}
  html[data-ui="next"] .bar-brand span{display:none;}
}
