/* Retter-Portal v1.2.71 – isolated mobile header. Desktop rules remain untouched. */
html body .rp-mobile-header{display:none!important;}

@media (max-width:760px){
  html body .app-shell .main > .topbar,
  html body .topbar{
    position:relative!important;
    top:auto!important;
    display:block!important;
    grid-template-columns:none!important;
    grid-template-rows:none!important;
    grid-template-areas:none!important;
    align-items:stretch!important;
    justify-items:stretch!important;
    gap:0!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    margin:0!important;
    padding:0!important;
    overflow:visible!important;
    border-radius:0 0 18px 18px!important;
  }
  html body .topbar .topbar-desktop-shell,
  html body .topbar .topbar-mobile-shell{display:none!important;}

  html body .topbar .rp-mobile-header,
  html body .topbar .rp-mobile-header *{
    box-sizing:border-box!important;
    writing-mode:horizontal-tb!important;
    text-orientation:mixed!important;
    word-break:normal!important;
    overflow-wrap:normal!important;
    hyphens:none!important;
    transform:none!important;
    translate:none!important;
    rotate:none!important;
  }

  html body .topbar .rp-mobile-header{
    position:relative!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    grid-auto-rows:auto!important;
    align-items:stretch!important;
    gap:9px!important;
    isolation:isolate!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    margin:0!important;
    padding:10px 12px 12px!important;
    overflow:visible!important;
  }

  html body .topbar .rp-mobile-header :is(
    .rp-mobile-header__top,
    .rp-mobile-header__brand,
    .rp-mobile-header__context,
    .rp-mobile-header__department,
    .rp-mobile-header__bottom,
    .rp-mobile-header__theme,
    .rp-mobile-header__account,
    .rp-mobile-header__logout
  ){
    position:relative!important;
    inset:auto!important;
    float:none!important;
    clear:none!important;
    width:auto!important;
    min-width:0!important;
    max-width:none!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    margin:0!important;
    overflow:visible!important;
  }

  html body .topbar .rp-mobile-header__top{
    display:grid!important;
    grid-template-columns:44px minmax(0,1fr) 76px!important;
    align-items:center!important;
    gap:8px!important;
    width:100%!important;
  }

  html body .topbar .rp-mobile-header__menu{
    position:static!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:44px!important;
    min-width:44px!important;
    max-width:44px!important;
    height:44px!important;
    min-height:44px!important;
    max-height:44px!important;
    margin:0!important;
    padding:0!important;
    border:1px solid var(--line)!important;
    border-radius:14px!important;
    background:var(--surface)!important;
    color:var(--text)!important;
    box-shadow:var(--shadow-sm)!important;
    font:900 1rem/1 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
  }

  html body .topbar .rp-mobile-header__brand{
    display:grid!important;
    grid-template-columns:28px minmax(0,1fr) auto!important;
    align-items:center!important;
    gap:7px!important;
    width:100%!important;
    min-height:44px!important;
    padding:5px 8px!important;
    border:1px solid var(--line-soft)!important;
    border-radius:14px!important;
    background:rgba(148,163,184,.06)!important;
    box-shadow:var(--shadow-sm)!important;
    overflow:hidden!important;
  }

  html body .topbar .rp-mobile-header__logo{
    position:relative!important;
    display:block!important;
    width:28px!important;
    min-width:28px!important;
    max-width:28px!important;
    height:28px!important;
    min-height:28px!important;
    max-height:28px!important;
    overflow:hidden!important;
  }
  html body .topbar .rp-mobile-header__logo img{
    position:absolute!important;
    inset:0!important;
    display:block!important;
    width:28px!important;
    min-width:28px!important;
    max-width:28px!important;
    height:28px!important;
    min-height:28px!important;
    max-height:28px!important;
    margin:0!important;
    object-fit:contain!important;
  }

  html body .topbar .rp-mobile-header__product{
    display:block!important;
    min-width:0!important;
    max-width:100%!important;
    margin:0!important;
    color:var(--muted)!important;
    font:950 .65rem/1 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
    letter-spacing:.07em!important;
    text-transform:uppercase!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }

  html body .topbar .rp-mobile-header__version{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    flex:0 0 auto!important;
    width:auto!important;
    min-width:52px!important;
    max-width:72px!important;
    height:27px!important;
    min-height:27px!important;
    max-height:27px!important;
    margin:0!important;
    padding:0 7px!important;
    border:1px solid var(--line)!important;
    border-radius:999px!important;
    background:var(--surface-2)!important;
    color:var(--text)!important;
    font:950 .61rem/1 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }

  html body .topbar .rp-mobile-header__logout{
    display:block!important;
    width:76px!important;
    min-width:76px!important;
    max-width:76px!important;
  }
  html body .topbar .rp-mobile-header__logout .btn{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:76px!important;
    min-width:76px!important;
    max-width:76px!important;
    height:44px!important;
    min-height:44px!important;
    max-height:44px!important;
    margin:0!important;
    padding:0 8px!important;
    border-radius:14px!important;
    font-size:.78rem!important;
    line-height:1!important;
    white-space:nowrap!important;
  }

  html body .topbar .rp-mobile-header__context{
    display:block!important;
    width:100%!important;
  }

  html body .topbar .rp-mobile-header__department{
    display:grid!important;
    grid-template-columns:auto minmax(0,1fr)!important;
    align-items:center!important;
    gap:9px!important;
    width:100%!important;
    min-height:48px!important;
    padding:5px 6px 5px 11px!important;
    border:1px solid var(--line-soft)!important;
    border-radius:15px!important;
    background:rgba(148,163,184,.06)!important;
    box-shadow:var(--shadow-sm)!important;
    overflow:hidden!important;
  }
  html body .topbar .rp-mobile-header__department>span{
    display:block!important;
    width:auto!important;
    min-width:max-content!important;
    max-width:none!important;
    color:var(--muted)!important;
    font:950 .63rem/1 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
    letter-spacing:.1em!important;
    text-transform:uppercase!important;
    white-space:nowrap!important;
  }
  html body .topbar .rp-mobile-header__department select,
  html body .topbar .rp-mobile-header__department strong{
    display:block!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    height:38px!important;
    min-height:38px!important;
    max-height:38px!important;
    margin:0!important;
    padding:0 34px 0 11px!important;
    border:1px solid var(--line-soft)!important;
    border-radius:12px!important;
    background:var(--surface-2)!important;
    color:var(--text)!important;
    font:950 .89rem/38px system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
  html body .topbar .rp-mobile-header__department strong{padding-right:11px!important;}

  html body .topbar .rp-mobile-header__bottom{
    display:grid!important;
    grid-template-columns:118px minmax(0,1fr)!important;
    align-items:center!important;
    gap:8px!important;
    width:100%!important;
  }

  html body .topbar .rp-mobile-header__theme{
    display:flex!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:2px!important;
    width:118px!important;
    min-width:118px!important;
    max-width:118px!important;
    height:40px!important;
    min-height:40px!important;
    max-height:40px!important;
    padding:3px!important;
    border:1px solid var(--line)!important;
    border-radius:999px!important;
    background:var(--surface)!important;
    box-shadow:var(--shadow-sm)!important;
  }
  html body .topbar .rp-mobile-header__theme .theme-dot{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    flex:0 0 auto!important;
    width:30px!important;
    min-width:30px!important;
    max-width:30px!important;
    height:32px!important;
    min-height:32px!important;
    max-height:32px!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    border-radius:999px!important;
    background:transparent!important;
    color:var(--muted)!important;
    font-size:.72rem!important;
    line-height:1!important;
  }
  html body .topbar .rp-mobile-header__theme .theme-dot.auto{
    width:48px!important;
    min-width:48px!important;
    max-width:48px!important;
    font-size:.72rem!important;
    font-weight:950!important;
  }
  html body .topbar .rp-mobile-header__theme .theme-dot.active,
  html body .topbar .rp-mobile-header__theme .theme-dot[aria-pressed="true"]{
    background:var(--surface-2)!important;
    color:var(--text)!important;
  }

  html body .topbar .rp-mobile-header__account{
    display:grid!important;
    grid-template-columns:auto minmax(0,1fr)!important;
    align-items:center!important;
    gap:7px!important;
    width:100%!important;
    min-height:40px!important;
    padding:4px 7px!important;
    border:1px solid var(--line-soft)!important;
    border-radius:14px!important;
    background:rgba(148,163,184,.06)!important;
    box-shadow:var(--shadow-sm)!important;
    overflow:hidden!important;
  }
  html body .topbar .rp-mobile-header__account .topbar-role-badge{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:auto!important;
    min-width:0!important;
    max-width:92px!important;
    height:30px!important;
    min-height:30px!important;
    max-height:30px!important;
    margin:0!important;
    padding:0 8px!important;
    border-radius:999px!important;
    font-size:.6rem!important;
    line-height:1!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
  html body .topbar .rp-mobile-header__name{
    display:block!important;
    min-width:0!important;
    max-width:100%!important;
    margin:0!important;
    color:var(--text)!important;
    font:950 .82rem/1.1 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
}

@media (max-width:390px){
  html body .topbar .rp-mobile-header{padding:8px 9px 10px!important;gap:8px!important;}
  html body .topbar .rp-mobile-header__top{grid-template-columns:42px minmax(0,1fr) 70px!important;gap:7px!important;}
  html body .topbar .rp-mobile-header__menu{width:42px!important;min-width:42px!important;max-width:42px!important;height:42px!important;min-height:42px!important;max-height:42px!important;}
  html body .topbar .rp-mobile-header__brand{min-height:42px!important;grid-template-columns:25px minmax(0,1fr) auto!important;gap:5px!important;padding-inline:6px!important;}
  html body .topbar .rp-mobile-header__logo,
  html body .topbar .rp-mobile-header__logo img{width:25px!important;min-width:25px!important;max-width:25px!important;height:25px!important;min-height:25px!important;max-height:25px!important;}
  html body .topbar .rp-mobile-header__product{font-size:.57rem!important;letter-spacing:.045em!important;}
  html body .topbar .rp-mobile-header__version{min-width:48px!important;max-width:64px!important;padding-inline:5px!important;font-size:.56rem!important;}
  html body .topbar .rp-mobile-header__logout,
  html body .topbar .rp-mobile-header__logout .btn{width:70px!important;min-width:70px!important;max-width:70px!important;height:42px!important;min-height:42px!important;max-height:42px!important;font-size:.73rem!important;}
  html body .topbar .rp-mobile-header__department{gap:7px!important;padding-left:9px!important;}
  html body .topbar .rp-mobile-header__department>span{font-size:.58rem!important;letter-spacing:.075em!important;}
  html body .topbar .rp-mobile-header__department select,
  html body .topbar .rp-mobile-header__department strong{font-size:.82rem!important;}
  html body .topbar .rp-mobile-header__bottom{grid-template-columns:112px minmax(0,1fr)!important;gap:7px!important;}
  html body .topbar .rp-mobile-header__theme{width:112px!important;min-width:112px!important;max-width:112px!important;}
  html body .topbar .rp-mobile-header__theme .theme-dot{width:28px!important;min-width:28px!important;max-width:28px!important;}
  html body .topbar .rp-mobile-header__theme .theme-dot.auto{width:47px!important;min-width:47px!important;max-width:47px!important;}
  html body .topbar .rp-mobile-header__account{gap:5px!important;padding-inline:5px!important;}
  html body .topbar .rp-mobile-header__account .topbar-role-badge{max-width:78px!important;padding-inline:6px!important;font-size:.54rem!important;}
  html body .topbar .rp-mobile-header__name{font-size:.76rem!important;}
}

/* Final mobile placement reset against legacy named grid areas and orders. */
@media (max-width:760px){
  html body .app-shell .main > .topbar .rp-mobile-header__top{
    grid-template-columns:44px minmax(0,1fr) 76px!important;
    grid-template-rows:44px!important;
    grid-auto-columns:0!important;
    grid-auto-rows:0!important;
    min-height:44px!important;
    max-height:44px!important;
  }
  html body .app-shell .main > .topbar .rp-mobile-header__menu{
    grid-column:1!important;grid-row:1!important;order:0!important;justify-self:stretch!important;align-self:stretch!important;
  }
  html body .app-shell .main > .topbar .rp-mobile-header__brand{
    grid-column:2!important;grid-row:1!important;order:0!important;justify-self:stretch!important;align-self:stretch!important;
    width:100%!important;height:44px!important;min-height:44px!important;max-height:44px!important;
  }
  html body .app-shell .main > .topbar .rp-mobile-header__logo{grid-column:1!important;grid-row:1!important;order:0!important;}
  html body .app-shell .main > .topbar .rp-mobile-header__product{grid-column:2!important;grid-row:1!important;order:0!important;}
  html body .app-shell .main > .topbar .rp-mobile-header__version{grid-column:3!important;grid-row:1!important;order:0!important;}
  html body .app-shell .main > .topbar form.rp-mobile-header__logout{
    grid-column:3!important;grid-row:1!important;grid-area:auto!important;order:0!important;justify-self:stretch!important;align-self:stretch!important;
    width:76px!important;height:44px!important;min-height:44px!important;max-height:44px!important;
  }
  html body .app-shell .main > .topbar .rp-mobile-header__context{
    grid-column:1!important;grid-row:auto!important;order:0!important;width:100%!important;
  }
  html body .app-shell .main > .topbar .rp-mobile-header__department{
    grid-template-columns:auto minmax(0,1fr)!important;
    grid-template-rows:38px!important;
    grid-auto-columns:0!important;
    grid-auto-rows:0!important;
    width:100%!important;height:48px!important;min-height:48px!important;max-height:48px!important;
  }
  html body .app-shell .main > .topbar .rp-mobile-header__department>span{grid-column:1!important;grid-row:1!important;order:0!important;align-self:center!important;}
  html body .app-shell .main > .topbar .rp-mobile-header__department>select,
  html body .app-shell .main > .topbar .rp-mobile-header__department>strong{grid-column:2!important;grid-row:1!important;order:0!important;align-self:center!important;}
  html body .app-shell .main > .topbar .rp-mobile-header__bottom{
    grid-template-columns:118px minmax(0,1fr)!important;
    grid-template-rows:40px!important;
    grid-auto-columns:0!important;
    grid-auto-rows:0!important;
    min-height:40px!important;max-height:40px!important;
  }
  html body .app-shell .main > .topbar form.rp-mobile-header__theme{
    grid-column:1!important;grid-row:1!important;grid-area:auto!important;order:0!important;justify-self:stretch!important;align-self:stretch!important;
    width:118px!important;height:40px!important;min-height:40px!important;max-height:40px!important;
  }
  html body .app-shell .main > .topbar .rp-mobile-header__account{
    grid-column:2!important;grid-row:1!important;grid-area:auto!important;order:0!important;justify-self:stretch!important;align-self:stretch!important;
    grid-template-columns:auto minmax(0,1fr)!important;
    grid-template-rows:32px!important;
    grid-auto-columns:0!important;
    grid-auto-rows:0!important;
    width:100%!important;height:40px!important;min-height:40px!important;max-height:40px!important;
  }
  html body .app-shell .main > .topbar .rp-mobile-header__account .topbar-role-badge{
    grid-column:1!important;grid-row:1!important;grid-area:auto!important;order:0!important;justify-self:start!important;align-self:center!important;
  }
  html body .app-shell .main > .topbar .rp-mobile-header__name{
    grid-column:2!important;grid-row:1!important;grid-area:auto!important;order:0!important;justify-self:stretch!important;align-self:center!important;
  }
  html body .app-shell .main > .topbar .rp-mobile-header__account:not(:has(.topbar-role-badge)) .rp-mobile-header__name{grid-column:1/-1!important;}
}
@media (max-width:390px){
  html body .app-shell .main > .topbar .rp-mobile-header__top{grid-template-columns:42px minmax(0,1fr) 70px!important;grid-template-rows:42px!important;min-height:42px!important;max-height:42px!important;}
  html body .app-shell .main > .topbar .rp-mobile-header__brand{height:42px!important;min-height:42px!important;max-height:42px!important;}
  html body .app-shell .main > .topbar form.rp-mobile-header__logout{width:70px!important;height:42px!important;min-height:42px!important;max-height:42px!important;}
  html body .app-shell .main > .topbar .rp-mobile-header__bottom{grid-template-columns:112px minmax(0,1fr)!important;}
  html body .app-shell .main > .topbar form.rp-mobile-header__theme{width:112px!important;min-width:112px!important;max-width:112px!important;}
}
