/* =========================================================
   MONTEIO WORKSPACE v4.5.2
   Fixed logo wall + safe status area + rounded attached bottom nav
   ========================================================= */

@media (max-width:800px){

  html.mw-mobile-shell-enabled{
    --mw-status-safe:max(31px, env(safe-area-inset-top));
    --mw-brand-row:38px;
    --mw-search-row:48px;
    --mw-top-wall-height:calc(var(--mw-brand-row) + var(--mw-search-row));
    min-height:100%;
    background:#0d0f14;
    scroll-padding-top:calc(var(--mw-status-safe) + var(--mw-top-wall-height));
  }

  html.mw-mobile-shell-enabled body.workspace-body{
    min-height:100dvh;
    margin:0!important;
    background:#0d0f14!important;
  }

  /* Solid shield behind the phone clock, network, Wi-Fi and battery icons. */
  html.mw-mobile-shell-enabled body.workspace-body::before{
    content:"";
    position:fixed;
    top:0;
    left:0;
    right:0;
    height:var(--mw-status-safe);
    background:#0d1117;
    z-index:1900;
    pointer-events:none;
  }

  html.mw-mobile-shell-enabled .workspace-body .app{
    min-height:100dvh;
    padding:0!important;
    background:var(--bg,#f6f7f9);
  }

  /* Disable the desktop entrance transform so fixed mobile bars stay viewport-fixed. */
  html.mw-mobile-shell-enabled .workspace-body .main-shell{
    width:100%!important;
    min-width:0!important;
    min-height:100dvh!important;
    margin:0!important;
    padding-top:calc(var(--mw-status-safe) + var(--mw-top-wall-height))!important;
    border:0!important;
    border-radius:0!important;
    overflow:visible!important;
    background:var(--bg,#f6f7f9);
    box-shadow:none!important;
    animation:none!important;
    transform:none!important;
  }

  /* The opaque wall sits below Android's status bar and never scrolls away. */
  html.mw-mobile-shell-enabled .mw-mobile-top-wall{
    position:fixed;
    top:var(--mw-status-safe);
    left:0;
    right:0;
    width:100%;
    height:var(--mw-top-wall-height);
    display:grid;
    grid-template-rows:var(--mw-brand-row) var(--mw-search-row);
    box-sizing:border-box;
    overflow:hidden;
    background:
      radial-gradient(circle at 88% -70%,rgba(255,122,0,.25),transparent 45%),
      linear-gradient(105deg,#141820 0%,#090c11 100%);
    border-bottom:1px solid rgba(255,255,255,.08);
    box-shadow:0 10px 26px rgba(0,0,0,.27);
    z-index:1800;
  }

  html.mw-mobile-shell-enabled .mw-mobile-brand-row{
    display:flex;
    align-items:center;
    justify-content:flex-start;
    min-width:0;
    padding:6px 12px 2px;
    box-sizing:border-box;
  }

  html.mw-mobile-shell-enabled .mw-mobile-brand-row img{
    display:block;
    width:auto;
    max-width:148px;
    height:27px;
    max-height:27px;
    object-fit:contain;
    object-position:left center;
  }

  /* Existing search/theme controls become the second row of the fixed wall. */
  html.mw-mobile-shell-enabled .mw-mobile-top-wall .topbar{
    position:static!important;
    top:auto!important;
    left:auto!important;
    right:auto!important;
    width:100%!important;
    min-width:0!important;
    height:var(--mw-search-row)!important;
    margin:0!important;
    padding:4px 8px 8px!important;
    gap:6px!important;
    box-sizing:border-box!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    box-shadow:none!important;
    z-index:auto!important;
  }

  html.mw-mobile-shell-enabled .mw-mobile-top-wall .icon-btn{
    display:none!important;
  }

  html.mw-mobile-shell-enabled .mw-mobile-top-wall .search-wrap{
    flex:1 1 auto!important;
    min-width:0!important;
    max-width:none!important;
    height:35px!important;
    min-height:35px!important;
    margin:0!important;
    padding:0 10px!important;
    gap:6px!important;
    border-radius:12px!important;
    border:1px solid rgba(255,255,255,.12)!important;
    background:rgba(255,255,255,.97)!important;
    box-shadow:none!important;
  }

  html.mw-mobile-shell-enabled .mw-mobile-top-wall .search-wrap input{
    height:34px!important;
    min-height:34px!important;
    padding:0!important;
    font-size:10.5px!important;
  }

  html.mw-mobile-shell-enabled .mw-mobile-top-wall .top-actions{
    flex:0 0 auto!important;
    gap:5px!important;
  }

  html.mw-mobile-shell-enabled .mw-mobile-top-wall .theme-toggle,
  html.mw-mobile-shell-enabled .mw-mobile-top-wall .mw-mobile-notification-btn{
    width:34px!important;
    min-width:34px!important;
    height:34px!important;
    min-height:34px!important;
    padding:0!important;
    border-radius:11px!important;
  }

  html.mw-mobile-shell-enabled .mw-mobile-top-wall .top-actions>.avatar{
    width:33px!important;
    min-width:33px!important;
    height:33px!important;
    min-height:33px!important;
    border-radius:11px!important;
  }

  html.mw-mobile-shell-enabled .workspace-body .view-container{
    min-height:calc(100dvh - var(--mw-status-safe) - var(--mw-top-wall-height))!important;
    padding:
      12px
      8px
      calc(76px + env(safe-area-inset-bottom))!important;
  }

  /* Attached bottom navigation with generous curved top edges. */
  html.mw-mobile-shell-enabled .workspace-body .mw-mobile-nav{
    position:fixed!important;
    left:6px!important;
    right:6px!important;
    bottom:0!important;
    width:auto!important;
    height:calc(62px + env(safe-area-inset-bottom))!important;
    margin:0!important;
    padding:
      6px
      7px
      calc(6px + env(safe-area-inset-bottom))!important;
    box-sizing:border-box!important;
    border:1px solid rgba(255,255,255,.10)!important;
    border-bottom:0!important;
    border-radius:30px 30px 0 0!important;
    background:#0b0d12!important;
    box-shadow:0 -10px 30px rgba(0,0,0,.30)!important;
    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;
    z-index:1850!important;
  }

  html.mw-mobile-shell-enabled .workspace-body .mw-mobile-nav-btn{
    min-height:45px!important;
    border-radius:16px!important;
  }

  html.mw-mobile-shell-enabled .workspace-body .view-container> :last-child{
    margin-bottom:12px!important;
  }

  html.mw-mobile-shell-enabled .workspace-body .mw-mobile-sheet,
  html.mw-mobile-shell-enabled .workspace-body .mw-notification-sheet{
    left:0!important;
    right:0!important;
    bottom:0!important;
    margin:0!important;
    border-radius:28px 28px 0 0!important;
    padding-bottom:calc(16px + env(safe-area-inset-bottom))!important;
  }
}

@media (max-width:360px){
  html.mw-mobile-shell-enabled{
    --mw-status-safe:max(29px, env(safe-area-inset-top));
    --mw-brand-row:36px;
    --mw-search-row:46px;
  }

  html.mw-mobile-shell-enabled .mw-mobile-brand-row{
    padding-left:10px;
  }

  html.mw-mobile-shell-enabled .mw-mobile-brand-row img{
    max-width:136px;
    height:25px;
  }

  html.mw-mobile-shell-enabled .mw-mobile-top-wall .topbar{
    padding-left:6px!important;
    padding-right:6px!important;
  }

  html.mw-mobile-shell-enabled .workspace-body .mw-mobile-nav{
    left:4px!important;
    right:4px!important;
    border-radius:27px 27px 0 0!important;
  }
}
