/* v1.0.233: Same portal rail on the dashboard and in all standalone apps.
   This stylesheet is loaded after each module's CSS. */
.rail{display:flex;flex-direction:column;box-sizing:border-box;height:100dvh;max-height:100dvh;min-height:0;overflow:hidden}
.rail .rail-nav{display:flex;flex:1 1 auto;flex-direction:column;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:none}
.rail .rail-nav::-webkit-scrollbar{display:none}
.rail .rail-nav>.rail-separator{flex:0 0 auto}
.rail .rail-bottom{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:5px!important;align-content:end;justify-items:stretch;align-items:center;flex:0 0 auto;width:100%;margin-top:auto;padding:8px 0 4px;border-top:1px solid rgba(255,255,255,.25)}
.rail .rail-bottom .rail-compact-link{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:2px!important;flex:initial!important;width:100%!important;min-width:0!important;height:43px!important;min-height:43px!important;padding:3px 0!important;margin:0!important;box-sizing:border-box;overflow:visible;border-radius:10px}
.rail .rail-bottom .rail-compact-link .rail-icon{display:grid;place-items:center;width:100%;min-width:0;height:24px;flex:0 0 24px}
.rail .rail-bottom .rail-compact-link .rail-icon svg{width:21px;height:21px}
.rail .rail-bottom .rail-compact-link .rail-label{display:none!important;opacity:1!important;transform:none!important;line-height:1.15;text-align:center;color:#fff!important;white-space:nowrap}
.rail:hover .rail-bottom .rail-compact-link .rail-label{display:block!important}
.rail:hover .rail-bottom .rail-compact-link{height:56px!important;min-height:56px!important}
@media(max-width:760px){
  .rail{width:min(82vw,292px);overflow:hidden}
  .rail .rail-nav{align-items:stretch}
  .rail .rail-bottom{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important;padding:8px 0 max(10px,env(safe-area-inset-bottom))!important}
  .rail .rail-bottom .rail-compact-link,.rail:hover .rail-bottom .rail-compact-link{height:54px!important;min-height:54px!important}
  .rail .rail-bottom .rail-compact-link .rail-label{display:block!important;font-size:12px!important}
  .rail .rail-link.active{background:rgba(255,255,255,.22);border-radius:12px}
  .rail .rail-brand{flex:0 0 auto}
}

/* v1.0.233: Desktop navigation refinement. Presentation-only; no routing changes. */
@media (min-width:761px) {
  /* A compact Worktime subnav that does not leave a metre of empty pill to the right. */
  body.arbejdstid-in-portal.hmsEmbedded #embeddedSubnav {
    display:flex!important;align-items:center!important;justify-content:center!important;
    padding:10px 18px!important;min-height:70px!important;
    background:#f7f8f6!important;border-bottom:1px solid #e2eae6!important;
    box-shadow:0 5px 14px rgba(23,64,50,.035)!important;
  }
  body.arbejdstid-in-portal.hmsEmbedded #embeddedSubnav .embeddedNavStack.hms179-single {
    display:flex!important;align-items:center!important;justify-content:center!important;
    flex:0 1 auto!important;width:max-content!important;max-width:100%!important;
    min-width:0!important;gap:9px!important;margin:0 auto!important;
    border:0!important;padding:0!important;background:transparent!important;
  }
  /* One harmonious switch, not a detached pair of buttons. */
  body.arbejdstid-in-portal.hmsEmbedded #embeddedSubnav .embeddedNavStack.hms179-single > .hms180-area-toggle {
    display:grid!important;grid-template-columns:1fr 1fr!important;
    flex:0 0 144px!important;width:144px!important;min-width:144px!important;
    height:46px!important;min-height:46px!important;box-sizing:border-box!important;
    border-radius:16px!important;padding:4px!important;
    border:1px solid #c6d9d0!important;background:#e5f1ed!important;
    box-shadow:inset 0 1px 2px rgba(47,97,75,.045)!important;
  }
  body.arbejdstid-in-portal.hmsEmbedded #embeddedSubnav .embeddedNavStack.hms179-single > .hms180-area-toggle::before {
    top:4px!important;bottom:4px!important;left:4px!important;
    width:calc((100% - 8px)/2)!important;border-radius:12px!important;
    background:#fff!important;box-shadow:0 2px 7px rgba(34,79,61,.14)!important;
  }
  body.arbejdstid-in-portal.hmsEmbedded #embeddedSubnav .hms180-area-option {
    min-height:36px!important;padding:0 7px!important;font-size:13px!important;
    letter-spacing:.005em!important;line-height:1.2!important;
    color:#63786d!important;font-weight:500!important;
  }
  body.arbejdstid-in-portal.hmsEmbedded #embeddedSubnav .hms180-area-option[aria-pressed="true"] {
    color:#245f50!important;font-weight:700!important;
  }
  body.arbejdstid-in-portal.hmsEmbedded #embeddedSubnav .hms180-area-option[data-hms180-area="admin"][aria-pressed="true"] {
    color:#7f1513!important;
  }
  body.arbejdstid-in-portal.hmsEmbedded #embeddedSubnav .hms180-area-option:focus-visible {
    outline:2px solid #2d86a0!important;outline-offset:-1px!important;
  }
  body.arbejdstid-in-portal.hmsEmbedded #embeddedSubnav .embeddedNavStack.hms179-single > .hms179-area-divider {
    height:26px!important;opacity:.65!important;background:#c9d7d0!important;
    margin:0 1px!important;flex:0 0 1px!important;
  }
  /* The tab group follows its content. Overflow scroll remains available on narrow pc windows. */
  body.arbejdstid-in-portal.hmsEmbedded #embeddedSubnav .embeddedNavStack.hms179-single > .embeddedNavScroll:not([hidden]) {
    display:flex!important;flex:0 1 auto!important;width:max-content!important;
    min-width:0!important;max-width:min(680px,calc(100vw - 330px))!important;
    border:0!important;border-radius:17px!important;
    padding:0!important;margin:0!important;background:transparent!important;
    box-shadow:none!important;
  }
  body.arbejdstid-in-portal.hmsEmbedded #embeddedSubnav .embeddedNavScroll > .embeddedNavGroup {
    display:flex!important;flex:0 1 auto!important;width:max-content!important;
    min-width:0!important;max-width:100%!important;
    padding:4px!important;margin:0!important;gap:5px!important;
    border:1px solid #dce6df!important;border-radius:17px!important;
    background:#edf2ef!important;box-sizing:border-box!important;
  }
  body.arbejdstid-in-portal.hmsEmbedded #embeddedSubnav .embeddedNavScroll button[data-subview] {
    min-height:38px!important;padding:8px 13px!important;
    border-radius:12px!important;font-size:13px!important;
  }
  body.arbejdstid-in-portal.hmsEmbedded #embeddedSubnav .embeddedNavScroll button[data-subview]:focus-visible {
    outline:2px solid #2d86a0!important;outline-offset:-2px!important;
  }
  /* Keep the icon rail calm and legible instead of repeating oversized tile logos. */
  .rail {--hms231-expanded:218px;}
  .rail:hover,.rail:focus-within {
    width:var(--hms231-expanded)!important;
    box-shadow:10px 0 24px rgba(23,67,54,.12)!important;
  }
  .rail .rail-nav {gap:5px!important;}
  .rail .rail-nav .rail-link {min-height:46px!important;height:46px!important;border-radius:12px!important;}
  .rail .rail-nav .rail-icon {width:44px!important;min-width:44px!important;}
  .rail .rail-nav .rail-icon .app-logo-img {
    width:32px!important;height:32px!important;padding:3px!important;
    border-radius:9px!important;
  }
  .rail:hover .rail-nav .rail-label,.rail:focus-within .rail-nav .rail-label,
  .rail:hover .rail-brand-label,.rail:focus-within .rail-brand-label {
    opacity:1!important;transform:none!important;
  }
  .rail .rail-nav .rail-link:focus-visible {outline:2px solid white!important;outline-offset:-2px!important;}
  /* Links stay on the existing permission-controlled rail and remain scrollable. */
  .rail .rail-nav {overflow-y:auto!important;overscroll-behavior:contain;}
}
/* Mobile stays with the existing full-width touch targets and header switcher. */
@media(prefers-reduced-motion:reduce){
  .rail,.rail .rail-label,.rail .rail-brand-label {transition:none!important;}
}
