/* Retter-Portal v1.3.44
   DEV-Kennzeichnung im mobilen Header entkoppelt und mobile Doppelrahmen bereinigt. */

@media(max-width:760px){
  /* Mobiler Header: feste, konfliktfreie Zeilenstruktur. */
  html body .app-shell .main > .topbar .rp-mobile-header,
  html body .topbar .rp-mobile-header{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    grid-auto-rows:auto!important;
    gap:8px!important;
    width:100%!important;
    min-width:0!important;
    padding:9px 10px 10px!important;
    overflow:visible!important;
  }

  html body .app-shell .main > .topbar .rp-mobile-header__top,
  html body .topbar .rp-mobile-header__top{
    display:grid!important;
    grid-template-columns:44px minmax(0,1fr) 76px!important;
    grid-template-rows:44px!important;
    align-items:stretch!important;
    gap:8px!important;
    width:100%!important;
    min-width:0!important;
    min-height:44px!important;
    max-height:none!important;
  }

  html body .app-shell .main > .topbar .rp-mobile-header__menu,
  html body .topbar .rp-mobile-header__menu{
    grid-column:1!important;
    grid-row:1!important;
    width:44px!important;
    min-width:44px!important;
    max-width:44px!important;
    height:44px!important;
    min-height:44px!important;
    max-height:44px!important;
    align-self:stretch!important;
    justify-self:stretch!important;
  }

  html body .app-shell .main > .topbar .rp-mobile-header__brand,
  html body .topbar .rp-mobile-header__brand{
    grid-column:2!important;
    grid-row:1!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    grid-template-rows:42px!important;
    align-items:center!important;
    gap:8px!important;
    width:100%!important;
    min-width:0!important;
    height:44px!important;
    min-height:44px!important;
    max-height:44px!important;
    padding:0 8px 0 12px!important;
    overflow:hidden!important;
  }

  html body .app-shell .main > .topbar .rp-mobile-header__product,
  html body .topbar .rp-mobile-header__product{
    grid-column:1!important;
    grid-row:1!important;
    min-width:0!important;
    max-width:100%!important;
    margin:0!important;
    padding:0!important;
    color:var(--text)!important;
    font-size:.74rem!important;
    line-height:1!important;
    font-weight:950!important;
    letter-spacing:.095em!important;
    text-transform:uppercase!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }

  html body .app-shell .main > .topbar .rp-mobile-header__version,
  html body .topbar .rp-mobile-header__version{
    grid-column:2!important;
    grid-row:1!important;
    min-width:58px!important;
    max-width:72px!important;
    height:30px!important;
    padding:0 8px!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    border-radius:11px!important;
    white-space:nowrap!important;
    font-size:.7rem!important;
    line-height:1!important;
  }

  html body .app-shell .main > .topbar form.rp-mobile-header__logout,
  html body .topbar form.rp-mobile-header__logout{
    grid-column:3!important;
    grid-row:1!important;
    width:76px!important;
    min-width:76px!important;
    max-width:76px!important;
    height:44px!important;
    min-height:44px!important;
    max-height:44px!important;
    align-self:stretch!important;
    justify-self:stretch!important;
  }
  html body .topbar form.rp-mobile-header__logout .btn{
    width:100%!important;
    height:100%!important;
    min-height:44px!important;
  }

  /* DEV-Status erhält eine eigene Zeile und kann deshalb nichts mehr überlagern. */
  html body .rp-mobile-header__dev{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:100%!important;
    min-width:0!important;
    min-height:34px!important;
    margin:0!important;
    padding:0 10px!important;
    border:1px solid rgba(251,113,133,.24)!important;
    border-radius:12px!important;
    background:linear-gradient(90deg,rgba(225,29,72,.105),rgba(30,64,175,.055))!important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.025)!important;
    overflow:hidden!important;
  }
  html body .rp-mobile-header__dev .dev-organization-chip--mobile{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:auto!important;
    max-width:100%!important;
    min-height:0!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    box-shadow:none!important;
    color:#fda4af!important;
    font-size:.68rem!important;
    line-height:1!important;
    font-weight:950!important;
    letter-spacing:.12em!important;
    text-transform:uppercase!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }

  html body .app-shell .main > .topbar .rp-mobile-header__context,
  html body .topbar .rp-mobile-header__context,
  html body .app-shell .main > .topbar .rp-mobile-header__bottom,
  html body .topbar .rp-mobile-header__bottom{
    grid-column:1!important;
    grid-row:auto!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
  }

  /* Tabellen-/Listencontainer mobil nur einmal einfassen. */
  html body .content :is(.card.table-wrap,.table-wrap,.data-table-card,.checks-table-wrap),
  html body .content .card > :is(.table-wrap,.data-table-card,.checks-table-wrap){
    overflow:visible!important;
  }

  html body .content :is(.card.table-wrap,.table-wrap,.data-table-card,.checks-table-wrap):not(:has(> .card-head)),
  html body .content .card > :is(.table-wrap,.data-table-card,.checks-table-wrap){
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    outline:0!important;
    background:transparent!important;
    background-image:none!important;
    box-shadow:none!important;
    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;
  }

  html body .content :is(.card.table-wrap,.table-wrap,.data-table-card,.checks-table-wrap)::before,
  html body .content :is(.card.table-wrap,.table-wrap,.data-table-card,.checks-table-wrap)::after,
  html body .content .card > :is(.table-wrap,.data-table-card,.checks-table-wrap)::before,
  html body .content .card > :is(.table-wrap,.data-table-card,.checks-table-wrap)::after{
    display:none!important;
    content:none!important;
  }

  html body .content table.responsive-table,
  html body .content table.responsive-table :is(tbody){
    width:100%!important;
    min-width:0!important;
    border:0!important;
    outline:0!important;
    background:transparent!important;
    box-shadow:none!important;
  }

  html body .content table.responsive-table tbody tr{
    margin:0!important;
    border:1px solid rgba(148,163,184,.18)!important;
    border-radius:16px!important;
    outline:0!important;
    box-shadow:0 10px 26px rgba(1,7,18,.14)!important;
    overflow:hidden!important;
  }

  html body .content table.responsive-table tbody tr::before,
  html body .content table.responsive-table tbody tr::after{
    display:none!important;
    content:none!important;
  }

  html body .content table.responsive-table tbody td{
    border:0!important;
    border-bottom:1px solid rgba(148,163,184,.105)!important;
    border-radius:0!important;
    outline:0!important;
    box-shadow:none!important;
    background:transparent!important;
  }
  html body .content table.responsive-table tbody td:last-child{
    border-bottom:0!important;
  }

  /* Leere Tabellenzustände ohne äußeren und inneren Doppelrahmen. */
  html body .content table.responsive-table tbody tr:has(> td.mobile-full-row),
  html body .content table.responsive-table tbody tr:has(> td.empty[colspan]){
    display:block!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    box-shadow:none!important;
    overflow:visible!important;
  }
  html body .content table.responsive-table td.mobile-full-row,
  html body .content table.responsive-table td.empty[colspan]{
    display:block!important;
    width:100%!important;
    min-height:0!important;
    margin:0!important;
    padding:18px 14px!important;
    border:0!important;
    border-radius:12px!important;
    outline:0!important;
    background:rgba(148,163,184,.045)!important;
    box-shadow:none!important;
    color:var(--muted)!important;
    text-align:center!important;
  }
  html body .content table.responsive-table td.mobile-full-row::before,
  html body .content table.responsive-table td.empty[colspan]::before{
    display:none!important;
    content:none!important;
  }

  /* Häufig verschachtelte Listenflächen nicht noch einmal umranden. */
  html body .content .card > .empty,
  html body .content .card > .empty-state,
  html body .content .card > .list-empty{
    border:0!important;
    outline:0!important;
    background:transparent!important;
    box-shadow:none!important;
  }
}

@media(max-width:390px){
  html body .app-shell .main > .topbar .rp-mobile-header__top,
  html body .topbar .rp-mobile-header__top{
    grid-template-columns:42px minmax(0,1fr) 70px!important;
    grid-template-rows:42px!important;
    min-height:42px!important;
  }
  html body .app-shell .main > .topbar .rp-mobile-header__menu,
  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 .app-shell .main > .topbar .rp-mobile-header__brand,
  html body .topbar .rp-mobile-header__brand{
    height:42px!important;
    min-height:42px!important;
    max-height:42px!important;
    padding-left:9px!important;
    padding-right:6px!important;
    gap:5px!important;
  }
  html body .app-shell .main > .topbar form.rp-mobile-header__logout,
  html body .topbar form.rp-mobile-header__logout{
    width:70px!important;
    min-width:70px!important;
    max-width:70px!important;
    height:42px!important;
    min-height:42px!important;
    max-height:42px!important;
  }
  html body .topbar form.rp-mobile-header__logout .btn{min-height:42px!important;}
  html body .app-shell .main > .topbar .rp-mobile-header__product,
  html body .topbar .rp-mobile-header__product{font-size:.65rem!important;letter-spacing:.075em!important;}
  html body .app-shell .main > .topbar .rp-mobile-header__version,
  html body .topbar .rp-mobile-header__version{min-width:52px!important;max-width:60px!important;padding-inline:5px!important;font-size:.62rem!important;}
}

body[data-theme="light"] .rp-mobile-header__dev{
  border-color:rgba(225,29,72,.20)!important;
  background:linear-gradient(90deg,rgba(255,228,235,.88),rgba(239,246,255,.88))!important;
  box-shadow:none!important;
}
body[data-theme="light"] .rp-mobile-header__dev .dev-organization-chip--mobile{
  color:#be123c!important;
}
body[data-theme="light"] .content table.responsive-table td.mobile-full-row,
body[data-theme="light"] .content table.responsive-table td.empty[colspan]{
  background:rgba(226,232,240,.48)!important;
  color:#526176!important;
}
